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

body {
    font-family: 'Montserrat', sans-serif;
    background: #F9F9F9;
    color: #444444;
    min-height: 100vh;
    padding: 20px;
}

:root {
    --primary-gold: #AC996C;
    --primary-gold-dark: #8b7355;
    --primary-gold-medium: rgba(172, 153, 108, 0.4);
    --primary-gold-light: rgba(172, 153, 108, 0.1);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 30px rgba(136, 136, 136, 0.15);
    overflow: hidden;
}

.header {
    background: white;
    border-bottom: 1px solid rgba(136, 136, 136, 0.2);
    padding: 40px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: -1px;
    color: #AC996C;
}

.header p {
    font-size: 1.1em;
    color: rgba(136, 136, 136, 0.8);
    font-weight: 400;
}

/* Login Modal */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.login-modal.hidden {
    display: none;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-box h2 {
    color: #AC996C;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 400;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    font-size: 1em;
    font-family: 'Montserrat', sans-serif;
    background: #fafafa;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #AC996C;
    background: white;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: #AC996C;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-login:hover {
    background: #AC996C;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
    font-size: 0.9em;
}

/* Main Content */
.content {
    padding: 40px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

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

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    font-size: 1em;
    background: #fafafa;
}

.search-box input:focus {
    outline: none;
    border-color: #AC996C;
    background: white;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    border: 1px solid #e9ecef;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    color: #666;
}

.filter-btn.active {
    background: #AC996C;
    color: white !important;
    border-color: #AC996C;
    box-shadow: 0 4px 10px rgba(172, 153, 108, 0.3);
}

.filter-btn:hover {
    border-color: #AC996C;
    background: rgba(172, 153, 108, 0.05);
}

#syncAllBtn {
    background: white !important;
    color: var(--primary-gold) !important;
    border: 1px solid var(--primary-gold) !important;
    padding: 10px 25px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
}

#syncAllBtn:hover {
    background: var(--primary-gold) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(172, 153, 108, 0.3) !important;
}

.sync-btn {
    background: white !important;
    color: var(--primary-gold) !important;
    border: 1px solid var(--primary-gold) !important;
    filter: grayscale(0) !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
}

.sync-btn:hover {
    background: var(--primary-gold) !important;
    color: #333 !important;
    /* Dark color for the circle arrow icon on gold background */
}

/* Patients Table */
.patients-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.table-header {
    background: #f8f9fa;
    padding: 20px;
    font-weight: 600;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 2fr 1.5fr;
    gap: 15px;
    color: #666;
}

.patient-row {
    padding: 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 2fr 1.5fr;
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid rgba(172, 153, 108, 0.15);
    transition: all 0.3s ease;
}

.patient-row:hover {
    background: rgba(172, 153, 108, 0.05);
    transform: translateX(5px);
}

.patient-row.loyalty-active {
    border-left: 4px solid #AC996C;
    background: linear-gradient(90deg, rgba(172, 153, 108, 0.05) 0%, transparent 100%);
}

.patient-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.patient-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(136, 136, 136, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: 400;
    font-size: 1.1em;
    border: 1px solid #e9ecef;
}

.patient-name {
    font-weight: 500;
    color: #AC996C;
    margin-bottom: 3px;
}

.patient-id {
    font-size: 0.85em;
    color: rgba(136, 136, 136, 0.8);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e9ecef;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    filter: grayscale(1);
    opacity: 0.6;
}

.action-btn:hover {
    background: #AC996C;
    border-color: #AC996C;
    filter: grayscale(0);
    opacity: 1;
    transform: translateY(-2px);
}

.action-btn.delete:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(136, 136, 136, 0.8);
}

.empty-state img {
    width: 200px;
    opacity: 0.5;
    margin-bottom: 20px;
}

/* Modal for password confirmation / actions */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.confirm-modal.show {
    display: flex;
}

.confirm-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 100%;
}

.confirm-box h3 {
    color: #AC996C;
    margin-bottom: 20px;
}

.password-inputs {
    margin-bottom: 20px;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-cancel {
    padding: 10px 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: rgba(136, 136, 136, 0.2);
}

.btn-confirm {
    padding: 10px 20px;
    background: #AC996C;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.btn-confirm:hover {
    background: #AC996C;
}

@media (max-width: 1024px) {

    .table-header,
    .patient-row {
        grid-template-columns: 2fr 1fr 2fr;
    }

    .patient-row> :nth-child(3),
    .patient-row> :nth-child(4),
    .table-header> :nth-child(3),
    .table-header> :nth-child(4) {
        display: none;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 20px;
    }

    .toolbar {
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
    }
}