/* Dark Modern Theme - SCRA Member Database with Authentication */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #ffffff;
    padding: 1.5rem;
}

.login-box {
    background: #ffffff;
    border-radius: 0;
    padding: 2rem;
    box-shadow: none;
    border: none;
    max-width: 300px;
    width: 100%;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-form label {
    font-size: 1rem;
    font-weight: normal;
    color: #000000;
    font-family: Arial, sans-serif;
}

.login-form input {
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 0;
    color: #000000;
    font-size: 1rem;
    font-family: Arial, sans-serif;
}

.login-form input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: none;
}

.login-btn {
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-size: 1rem;
    font-weight: normal;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: none;
    margin-top: 0;
}

.login-btn:hover {
    transform: none;
    box-shadow: none;
    background: #333333;
}

.login-btn:active {
    transform: none;
}

.error-message {
    background: #ffffff;
    border: 1px solid #000000;
    color: #000000;
    padding: 0.75rem;
    border-radius: 0;
    font-size: 1rem;
    font-family: Arial, sans-serif;
    text-align: center;
}

/* Main App Container */
.main-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: white;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100;
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.header h1:hover {
    transform: scale(1.02);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    color: #ccc;
    font-size: 0.8rem;
    font-weight: 500;
}

.logout-btn {
    background: rgba(220, 53, 69, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(220, 53, 69, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.5);
}

/* Password Change Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 2rem;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.large-modal {
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #333;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.password-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.password-form label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #ccc;
}

.password-form input {
    padding: 0.6rem 0.8rem;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.password-form input:focus {
    outline: none;
    border-color: #8C1515;
    box-shadow: 0 0 0 3px rgba(140, 21, 21, 0.1);
}

/* Screen reader only class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Member Details View */
.member-details-view {
    max-height: 70vh;
    overflow-y: auto;
}

.member-info-display {
    margin-bottom: 1.5rem;
}

.member-info-display h4 {
    color: #8C1515;
    font-size: 1rem;
    font-weight: 600;
    margin: 1.2rem 0 0.6rem 0;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #333;
}

.member-info-display h4:first-child {
    margin-top: 0;
}

.member-info-display p {
    margin: 0.4rem 0;
    color: #ccc;
    line-height: 1.4;
}

.member-info-display strong {
    color: #fff;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.btn-secondary {
    background: #444;
    color: #ccc;
    border: 1px solid #555;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #555;
    color: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(140, 21, 21, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #000;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    align-items: center;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 0 1.5rem;
    gap: 0.4rem;
    flex-shrink: 0;
}

.nav-tab {
    padding: 0.6rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: #888;
    transition: all 0.3s ease;
    border-radius: 5px 5px 0 0;
    position: relative;
}

.nav-tab:hover {
    background: #2a2a2a;
    color: #fff;
}

.nav-tab.active {
    background: #2d2d2d;
    color: #ffffff;
    border-bottom: 3px solid #ffffff;
}

.main-tab {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
    border-bottom: 3px solid #8C1515;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.main-tab:hover {
    background: linear-gradient(135deg, #3a3a3a, #4a4a4a);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.main-tab.active {
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    color: #ffffff;
    border-bottom: 3px solid #ffffff;
    box-shadow: 0 3px 12px rgba(140, 21, 21, 0.4);
}

.secondary-nav {
    display: flex;
    margin-left: auto;
    gap: 0.5rem;
}

.secondary-tab {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    border-left: 1px solid #333;
}

.add-member-btn {
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    color: white;
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(140, 21, 21, 0.3);
}

.add-member-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(140, 21, 21, 0.4);
}

/* Main Content Area */
.content {
    flex: 1;
    display: flex;
    background: #0f0f0f;
    overflow: hidden;
    height: calc(100vh - 140px); /* Account for header and nav tabs */
}

/* Welcome Screen Container */
#welcomeScreen {
    align-items: center;
    justify-content: center;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: #1a1a1a;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 0.75rem 1.2rem;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.filter-toggle-btn {
    display: none; /* Hidden on desktop */
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.filter-toggle-btn:hover {
    color: #8C1515;
}

.filter-toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.filter-toggle-btn.expanded .filter-toggle-icon {
    transform: rotate(180deg);
}

/* Filter Controls */
.filter-controls {
    flex: 1;
    padding: 0.8rem;
    overflow-y: auto;
}

.filter-group {
    margin-bottom: 1.2rem;
}

.filter-label {
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
    margin-bottom: 0.4rem;
    display: block;
}

.filter-select {
    width: 100%;
    padding: 0.5rem;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #8C1515;
    box-shadow: 0 0 0 3px rgba(140, 21, 21, 0.1);
}

.filter-actions {
    padding: 0.8rem;
    border-top: 1px solid #333;
    display: flex;
    gap: 0.4rem;
}

.filter-btn {
    flex: 1;
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #3a3a3a;
    border-color: #555;
}

.clear-filters:hover {
    background: #8C1515;
    border-color: #8C1515;
}

.active-filters {
    padding: 0 1rem 1rem;
    border-top: 1px solid #333;
}

.filter-tag {
    background: #2a2a2a;
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #444;
    margin: 0.2rem;
}

.filter-tag button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.filter-tag button:hover {
    background: #ff6b6b;
    color: #fff;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: calc(100vh - 140px); /* Account for header and nav tabs */
}

/* Search and Stats Row */
.top-controls {
    padding: 0.8rem 1.2rem;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
}

.search-box {
    flex: 1;
    max-width: 350px;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.search-input::placeholder {
    color: #888;
    font-style: italic;
}

.search-input:focus {
    outline: none;
    border-color: #8C1515;
    box-shadow: 0 0 0 3px rgba(140, 21, 21, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stats {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.stat-item {
    text-align: center;
    padding: 0.6rem 1.2rem;
    background: #2a2a2a;
    border-radius: 6px;
    border: 1px solid #444;
    min-width: 80px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.stat-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
    display: block;
}

.stat-label {
    font-size: 0.7rem;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Member List */
.member-list {
    flex: 1;
    overflow-y: auto;
    background: #0f0f0f;
    min-height: 0; /* Important for flex child to shrink */
    max-height: calc(100vh - 200px); /* Ensure it doesn't exceed viewport */
}

.member-list::-webkit-scrollbar {
    width: 8px;
}

.member-list::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.member-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.member-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #0f0f0f;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    color: inherit;
}

.member-item:hover,
.member-item:focus {
    background: #1a1a1a;
}

.member-item::before {
    display: none;
}

.member-item.selected {
    background: #1a1a1a;
    border-left: 4px solid #8C1515;
}

.member-item.selected::before {
    display: none;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.member-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    min-width: 180px;
}

.member-status {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.status-current {
    background: rgba(46, 213, 115, 0.2);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.3);
}

.status-resigned {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.status-emeritus {
    background: rgba(255, 165, 2, 0.2);
    color: #ffa502;
    border: 1px solid rgba(255, 165, 2, 0.3);
}

.status-special {
    background: rgba(116, 125, 136, 0.2);
    color: #747d88;
    border: 1px solid rgba(116, 125, 136, 0.3);
}

.status-loa {
    background: rgba(55, 66, 250, 0.2);
    color: #3742fa;
    border: 1px solid rgba(55, 66, 250, 0.3);
}

.status-swim {
    background: rgba(0, 184, 148, 0.2);
    color: #00b894;
    border: 1px solid rgba(0, 184, 148, 0.3);
}

.status-extended {
    background: rgba(162, 155, 254, 0.2);
    color: #a29bfe;
    border: 1px solid rgba(162, 155, 254, 0.3);
}

.member-spouse {
    font-size: 0.75rem;
    color: #888;
    font-style: italic;
    min-width: 100px;
}

.member-email {
    font-size: 0.75rem;
    color: #aaa;
    word-break: break-all;
    flex: 1;
}

.member-payment {
    font-size: 0.75rem;
    color: #aaa;
    min-width: 100px;
}

/* Welcome Screen */
.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    gap: 1.5rem;
    padding: 1.5rem;
}

.welcome-icon {
    margin-bottom: 0.75rem;
}

.welcome-icon img {
    max-width: 160px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.welcome-content h2 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
}

.enter-btn {
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(140, 21, 21, 0.3);
}

.enter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(140, 21, 21, 0.4);
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-size: 1rem;
}

/* Result Count */
.result-count {
    background: #1a1a1a;
    color: #888;
    padding: 0.6rem 1.2rem;
    font-size: 0.75rem;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

/* Legacy Modal - Deprecated */
.legacy-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1a1a1a;
    margin: 2% auto;
    border: 1px solid #333;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: #2a2a2a;
    padding: 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 2rem;
}

.modal-field {
    margin-bottom: 1rem;
}

.modal-label {
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.modal-value {
    color: #fff;
    font-size: 1rem;
    line-height: 1.5;
    word-break: break-word;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid #333;
    background: #2a2a2a;
    border-radius: 0 0 12px 12px;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.move-btn {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
}

.move-btn:hover {
    background: #3a3a3a;
    border-color: #555;
}

.delete-btn {
    background: #ff4757;
    color: white;
}

.delete-btn:hover {
    background: #ff3742;
    transform: translateY(-2px);
}

.close {
    color: #888;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #fff;
    background: #333;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Form Row - for side-by-side form groups */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

/* Responsive form row */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.form-group label {
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #8C1515;
    box-shadow: 0 0 0 3px rgba(140, 21, 21, 0.1);
}

.form-group textarea:focus {
    outline: none;
    border-color: #8C1515;
    box-shadow: 0 0 0 3px rgba(140, 21, 21, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(140, 21, 21, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(140, 21, 21, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.cancel-btn {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #3a3a3a;
    border-color: #555;
}

/* Form Sections */
.form-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: #444;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.form-section h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #444;
}

.form-section h4 {
    color: #8C1515;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #333;
    padding-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    border-radius: 2px;
}

/* Children Section */
.children-section {
    margin-top: 1rem;
}

.children-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.children-header h5 {
    color: #ccc;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.btn-add-child {
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(140, 21, 21, 0.3);
}

.btn-add-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(140, 21, 21, 0.4);
}

.btn-add-child span {
    font-size: 1.2rem;
    font-weight: bold;
}

.children-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.child-field {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 1.2rem;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.child-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.child-field-title {
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
}

.remove-child-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-child-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

.child-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.child-name-input,
.child-dob-input {
    padding: 0.75rem;
    background: #1a1a1a;
    border: 1px solid #555;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.child-name-input:focus,
.child-dob-input:focus {
    outline: none;
    border-color: #8C1515;
    box-shadow: 0 0 0 3px rgba(140, 21, 21, 0.1);
}

.child-name-input::placeholder,
.child-dob-input::placeholder {
    color: #666;
}

.add-child-btn:hover {
    background: #B81D3E;
    transform: translateY(-1px);
}

/* Modal Sections */
.modal-section {
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-section h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #444;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.modal-grid .full-width {
    grid-column: 1 / -1;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #8C1515;
    border-left: 4px solid #B81D3E;
}

.toast.error {
    background: linear-gradient(135deg, #ff4757, #ff3742);
}

.toast.info {
    background: linear-gradient(135deg, #3742fa, #2f3542);
}

/* Menu Toggle Button */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 25px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    position: relative;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle:hover span {
    background: #8C1515;
}

/* Menu Sidebar */
.menu-dropdown {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: #1a1a1a;
    border-left: 1px solid #444;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 2000; /* Higher than sidebar (1000) to appear on top */
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.menu-dropdown.show {
    right: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #2a2a2a;
    border-bottom: 1px solid #444;
    min-height: 60px;
}

.menu-title {
    color: white;
    font-size: 22px;
    font-weight: 600;
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-close {
    background: none;
    border: none;
    color: #ccc;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.menu-close:hover {
    background: #8C1515;
    color: white;
    transform: scale(1.1);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #333;
    font-size: 16px;
    font-weight: 500;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: #8C1515;
}

.menu-icon {
    margin-right: 12px;
    font-size: 18px;
}

/* Overlay for sidebar */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999; /* Just below menu-dropdown (2000) but above sidebar (1000) */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Download Page */
#downloadPage {
    background: #1a1a1a;
    min-height: 100vh;
    padding: 20px;
}

.download-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.download-header h2 {
    color: white;
    margin: 0;
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.back-btn {
    background: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.back-btn:hover {
    background: #8C1515;
    transform: translateY(-1px);
}

.download-content {
    max-width: 800px;
    margin: 0 auto;
}

.export-options {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.option-group {
    margin-bottom: 30px;
}

.option-group h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #8C1515;
    padding-bottom: 8px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: white;
    font-size: 16px;
    padding: 8px 0;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #666;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #8C1515;
    background: #8C1515;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.field-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.field-category {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #8C1515;
}

.field-category h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 16px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: white;
    font-size: 14px;
    padding: 6px 0;
    margin-bottom: 8px;
}

.checkbox-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #666;
    border-radius: 3px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom {
    border-color: #8C1515;
    background: #8C1515;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.export-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
}

.export-btn {
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(140, 21, 21, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(140, 21, 21, 0.4);
}

.export-icon {
    font-size: 18px;
}

/* Sub-group filtering styles */
.sub-group-filters {
    margin-top: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-row.compact {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-label {
    font-size: 0.75rem;
    color: #aaa;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 0.4rem 0.6rem;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: #555;
}

.filter-info {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.member-count {
    font-size: 0.8rem;
    color: #8C1515;
    font-weight: 500;
    font-style: italic;
}

@media (max-width: 768px) {
    .filter-row.compact {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        transform: none;
        margin-bottom: 1rem;
    }
    
    .filter-toggle-btn {
        display: block; /* Show toggle button on mobile */
    }
    
    .filter-controls,
    .filter-actions,
    .active-filters {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease, border 0.3s ease;
    }
    
    .filter-controls {
        padding: 0 0.8rem;
    }
    
    .filter-controls.expanded {
        max-height: 1000px; /* Large enough to show all filters */
        padding: 0.8rem;
    }
    
    .filter-actions {
        padding: 0 0.8rem;
        border-top: none;
    }
    
    .filter-actions.expanded {
        max-height: 200px;
        padding: 0.8rem;
        border-top: 1px solid #333;
    }
    
    .active-filters {
        padding: 0 1rem;
    }
    
    .active-filters.expanded {
        max-height: 500px;
        padding: 0 1rem 1rem;
    }
    
    .member-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .member-name,
    .member-spouse,
    .member-email,
    .member-payment {
        min-width: auto;
    }
    
    .top-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .stats {
        justify-content: space-around;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .child-inputs {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .remove-child-btn {
        align-self: center;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .secondary-nav {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        justify-content: center;
    }
    
    .add-member-btn {
        margin-left: 0;
        width: 100%;
    }

    .field-selection {
        grid-template-columns: 1fr;
    }
    
    .download-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .export-options {
        padding: 20px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.member-item {
    animation: fadeIn 0.3s ease;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Backups Tab Styles */
.backups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: white;
    border-radius: 10px;
    margin: 0 1rem 2rem 1rem;
    border: 1px solid #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.backups-header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.clear-all-backups-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.clear-all-backups-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.clear-all-backups-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(220, 53, 69, 0.3);
}

.backups-header h2 {
    margin: 0 0 1rem 0;
    font-size: 2.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.backups-header p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.backups-content {
    padding: 0 1rem;
}

.backups-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.backups-stats .stat-item {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 120px;
    border: 1px solid #333;
}

.backups-stats .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #8C1515;
    margin-bottom: 0.5rem;
}

.backups-stats .stat-label {
    color: #ccc;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.backups-list {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid #333;
}

.backup-empty {
    padding: 3rem;
    text-align: center;
    color: #888;
    font-style: italic;
}

.backup-item {
    border-bottom: 1px solid #333;
    transition: all 0.2s ease;
    cursor: pointer;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
}

.backup-item:hover {
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
}

.backup-item:last-child {
    border-bottom: none;
}

.backup-item:last-child {
    border-bottom: none;
}

.backup-item:hover {
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
}

.backup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.backup-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.backup-main-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.backup-action {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.backup-action.create {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.backup-action.update {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #000;
}

.backup-action.delete {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.backup-action.revert {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

/* Specific revert action styles */
.backup-action.revert_delete {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.backup-action.revert_create {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.backup-action.revert_update {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.backup-action.revert_create_failed {
    background: linear-gradient(135deg, #6f42c1, #5a2d91);
    color: white;
}

.backup-description {
    font-weight: 500;
    color: #fff;
    flex: 1;
    font-size: 1rem;
}

.backup-timestamp {
    color: #888;
    font-size: 0.9rem;
    white-space: nowrap;
}

.backup-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.backup-user {
    color: #8C1515;
    font-weight: 500;
    font-size: 0.9rem;
}

.backup-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.backup-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toggle-icon {
    font-size: 0.8rem;
    color: #ccc;
    transition: transform 0.2s ease;
    display: inline-block;
}

.backup-item.expanded .toggle-icon {
    transform: rotate(180deg);
}

.backup-details-dropdown {
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
    border-top: 1px solid #333;
    overflow: hidden;
    transition: all 0.3s ease;
}

.backup-details-content {
    padding: 1.5rem;
}

.backup-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.backup-affected {
    color: #888;
    font-size: 0.9rem;
}

.backup-revert-btn {
    background: linear-gradient(135deg, #8C1515, #B81D3E);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.backup-revert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(140, 21, 21, 0.3);
}

.backup-revert-btn:disabled {
    background: #444;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.backup-revert-btn.reverted {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.backup-revert-btn.reverted:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.backup-changes {
    margin-top: 1rem;
}

.change-section {
    margin-bottom: 1.5rem;
}

.change-section h6 {
    margin: 0 0 0.5rem 0;
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 600;
}

.change-data {
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.4;
    color: #fff;
}

.change-data.old-data {
    border-left: 4px solid #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    color: #ff6b6b;
}

.change-data.new-data {
    border-left: 4px solid #28a745;
    background-color: rgba(40, 167, 69, 0.1);
    color: #51cf66;
}

.change-data.old-data::before {
    content: "Previous Data";
    display: block;
    font-weight: 600;
    color: #ff6b6b;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.change-data.new-data::before {
    content: "New Data";
    display: block;
    font-weight: 600;
    color: #51cf66;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* New styles for changed data display */
.change-data.changed-data {
    border-left: 4px solid #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
    color: #fff;
}

.change-data.changed-data::before {
    content: "Changed Fields";
    display: block;
    font-weight: 600;
    color: #ffc107;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-changes {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.field-change {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

.field-change:last-child {
    margin-bottom: 0;
}

.field-change strong {
    color: #ffc107;
    font-weight: 600;
}

.old-value {
    color: #ff6b6b;
    background: rgba(220, 53, 69, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    margin-right: 0.5rem;
}

.new-value {
    color: #51cf66;
    background: rgba(40, 167, 69, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .backups-header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }
    
    .backups-header-controls {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .clear-all-backups-btn {
        width: 100%;
        justify-content: center;
    }
    
    .backups-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .backup-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .backup-main-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .backup-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .backup-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
