/* MindfulNotes - Unified CSS File */
/* Contains all styles consolidated from individual HTML files */

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #334155;
    line-height: 1.6;
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    animation: fadeInLeft 0.3s ease;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.logo {
    padding: 24px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
    flex: 1;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    transform: translateX(4px);
    background: rgba(59, 130, 246, 0.05);
    color: #3b82f6;
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.1);
    border-right: 3px solid #3b82f6;
    color: #3b82f6;
}

.nav-link.active .nav-icon {
    filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.3));
    transform: scale(1.05);
}

.nav-icon {
    font-size: 16px;
    transition: all 0.2s ease;
}

.nav-link:hover .nav-icon {
    transform: scale(1.1);
}

.user-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status {
    font-size: 12px;
    color: #059669;
    font-weight: 500;
}

.user-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #059669;
    margin-right: 6px;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.9);
    }
}

.user-menu-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
    font-size: 16px;
    font-weight: bold;
}

.user-menu-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #374151;
}

.user-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-bottom: 8px;
    overflow: hidden;
    animation: slideUp 0.2s ease;
}

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

.user-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
}

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

.user-dropdown-item:hover {
    background: #f8fafc;
    color: #1e293b;
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ===== DASHBOARD CONTAINER & LAYOUT ===== */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER STYLES ===== */
.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Search Container */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 2;
}

.search-input {
    padding: 10px 16px 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    width: 300px;
    background: white;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Income Display */
.income-display {
    text-align: right;
}

.income-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.income-amount {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
}

/* Settings Header */
.settings-header-icon {
    font-size: 24px;
    margin-right: 12px;
}

.settings-page-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* ===== BREADCRUMB STYLES ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
}

.breadcrumb-separator {
    color: #64748b;
}

/* ===== CONTENT AREA ===== */
.content-area {
    flex: 1;
    overflow: auto;
    padding: 24px 32px;
}

/* ===== BUTTON STYLES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-outline {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

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

.add-client-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

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

.add-appointment-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.full-width {
    width: 100%;
}

/* ===== PAGE HEADER STYLES ===== */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 32px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.page-subtitle {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 32px;
}

.welcome-title {
    font-size: 28px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 16px;
    color: #64748b;
}

/* ===== CLIENTS SUMMARY ===== */
.clients-summary {
    display: flex;
    gap: 32px;
    margin-top: 16px;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #3b82f6;
}

.summary-stat span:last-child {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ===== FILTER CONTROLS ===== */
.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filter-left {
    display: flex;
    gap: 24px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.view-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}

.view-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.view-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: #374151;
}

/* ===== CLIENTS GRID ===== */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.client-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.client-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.client-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.client-main-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.client-avatar-large {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.client-details {
    min-width: 0;
    flex: 1;
}

.client-name-large {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.client-id {
    font-size: 13px;
    color: #64748b;
}

.status-badge-large {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge-large.status-active {
    background: #dcfdf7;
    color: #065f46;
}

.status-badge-large.status-draft {
    background: #f1f5f9;
    color: #475569;
}

.status-badge-large.status-sent {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge-large.status-paid {
    background: #dcfce7;
    color: #166534;
}

.status-badge-large.status-unpaid {
    background: #fef3c7;
    color: #92400e;
}

.status-badge-large.status-overdue {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge-large.status-voided {
    background: #f3f4f6;
    color: #9ca3af;
    text-decoration: line-through;
}

.status-badge-large.status-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.status-badge-large.status-prospective {
    background: #e0e7ff;
    color: #3730a3;
}

.client-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.contact-link {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #2563eb;
}

.appointment-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.appointment-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.appointment-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.appointment-date {
    font-size: 14px;
    font-weight: 500;
}

.appointment-date.last-appointment {
    color: #374151;
}

.appointment-date.next-appointment {
    color: #059669;
}

.appointment-date.no-appointment {
    color: #f59e0b;
    font-style: italic;
}

.payer-info-card {
    margin-bottom: 20px;
}

.payer-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.payer-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.client-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.action-btn-card {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-btn-card:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.action-btn-card.action-btn-primary {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.action-btn-card.action-btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* ===== CLIENTS LIST VIEW ===== */
.clients-list {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.list-table {
    width: 100%;
    border-collapse: collapse;
}

.list-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.list-header th {
    padding: 16px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.list-row {
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-row:hover {
    background: #f8fafc;
    transform: translateX(4px);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.list-row:last-child {
    border-bottom: none;
}

.list-cell {
    padding: 16px 20px;
    font-size: 14px;
    color: #374151;
}

.list-client-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-client-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.list-client-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.list-client-id {
    font-size: 12px;
    color: #64748b;
}

.list-contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.list-phone {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.list-email {
    font-size: 13px;
    color: #64748b;
}

.list-appointment-date {
    font-weight: 500;
}

.list-last-appt {
    color: #374151;
}

.list-next-appt {
    color: #059669;
}

.list-no-appt {
    color: #f59e0b;
    font-style: italic;
}

.list-payer {
    font-weight: 500;
    color: #374151;
}

.list-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.list-actions {
    display: flex;
    gap: 8px;
}

.list-action-btn {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.list-action-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.list-action-btn.list-action-primary {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.list-action-btn.list-action-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* ===== CALENDAR STYLES ===== */
.calendar-schedule-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin-bottom: 32px;
    max-width: 100%;
    overflow: hidden;
}

.calendar-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    min-width: 0;
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-controls-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calendar-controls {
    display: flex;
    gap: 8px;
}

.calendar-nav {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.calendar-nav:hover {
    background: #e2e8f0;
    color: #374151;
}

.calendar-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.calendar-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: white;
}

.day-header {
    background: #f8fafc;
    padding: 16px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}

.day-cell {
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    min-height: 120px;
    padding: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.day-cell:hover {
    background: #f8fafc;
}

.day-cell.today {
    background: #eff6ff;
    border: 2px solid #3b82f6;
}

.day-cell.other-month {
    background: #f8fafc;
    opacity: 0.5;
}

.day-number {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.appointment-block {
    background: #dcfdf7;
    color: #065f46;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 4px;
    border-left: 3px solid #10b981;
    cursor: pointer;
}

.appointment-block.pending {
    background: #fef3c7;
    color: #92400e;
    border-left-color: #f59e0b;
}

.appointment-block.cancelled {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: #ef4444;
    text-decoration: line-through;
}

.appointment-block.confirmed {
    background: #dcfdf7;
    color: #065f46;
    border-left-color: #10b981;
}

.appointment-time {
    font-size: 10px;
    font-weight: 600;
}

.appointment-patient {
    font-size: 11px;
    margin-top: 2px;
}

.more-appointments {
    font-size: 10px;
    color: #64748b;
    font-style: italic;
    margin-top: 4px;
}

.calendar-legend {
    padding: 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-confirmed {
    background: #10b981;
}

.legend-pending {
    background: #f59e0b;
}

.legend-cancelled {
    background: #ef4444;
}

/* Calendar Page Header */
.month-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: #e2e8f0;
    color: #374151;
}

.current-month {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    min-width: 140px;
    text-align: center;
}

/* Today's Schedule */
.todays-schedule {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

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

.schedule-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.schedule-date {
    background: #eff6ff;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.appointment-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    margin-bottom: 20px;
}

.appointment-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.appointment-item:hover {
    background: #f1f5f9;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.appointment-item.break-item {
    background: #fef3c7;
    border-color: #fbbf24;
}

.appointment-item.break-item:hover {
    background: #fef0c7;
}

.appointment-time {
    font-size: 13px;
    font-weight: 600;
    color: #3b82f6;
    min-width: 70px;
    flex-shrink: 0;
}

.appointment-details {
    flex: 1;
    margin-left: 12px;
    min-width: 0;
    overflow: hidden;
}

.appointment-patient {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.appointment-type {
    font-size: 12px;
    color: #64748b;
}

.appointment-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-confirmed {
    background: #dcfdf7;
    color: #065f46;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.schedule-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.schedule-actions .btn {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
}

/* ===== BILLING STYLES ===== */
.billing-page-header {
    margin-bottom: 32px;
}

.billing-page-title {
    font-size: 32px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.billing-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 32px;
}

.billing-tab {
    background: none;
    border: none;
    padding: 16px 0;
    margin-right: 32px;
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.billing-tab:hover {
    color: #3b82f6;
}

.billing-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    font-weight: 500;
}

.billing-tab-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.billing-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.date-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: border-color 0.2s ease;
}

.date-picker:hover {
    border-color: #3b82f6;
}

.calendar-icon {
    font-size: 16px;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.export-btn:hover {
    background: #2563eb;
}

.download-icon {
    font-size: 16px;
}

.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    text-align: center;
}

.empty-message {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

/* ===== CLIENT PROFILE STYLES ===== */
.client-profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-header-main {
    display: flex;
    align-items: center;
    gap: 24px;
}

.client-avatar-xl {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 28px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.client-profile-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.client-profile-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 16px;
    opacity: 0.9;
}

.client-status-badge.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.client-contact-quick {
    display: flex;
    gap: 24px;
    font-size: 14px;
    opacity: 0.9;
}

.client-header-actions {
    display: flex;
    gap: 12px;
}

.action-btn-header {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn-header:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 32px;
    overflow-x: auto;
}

.profile-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.profile-tab.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-tab:hover:not(.active) {
    background: #e2e8f0;
    color: #374151;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Profile Layout */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 32px;
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Profile Sections */
.profile-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.edit-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.edit-btn:hover {
    background: #f1f5f9;
}

/* Patient Comments */
.patient-comments {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    font-style: italic;
}

/* Quick Notes */
.quick-note-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quick-note-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.note-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.note-date, .note-time {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.add-note-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* Dropdown Styles */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

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

.dropdown-item:hover {
    background: #f9fafb;
    color: #1f2937;
}

.dropdown-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Timeline */
.timeline-filters {
    display: flex;
    gap: 12px;
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-item {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.timeline-date {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
}

.timeline-content {
    flex: 1;
}

.timeline-type {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.timeline-details {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.timeline-time {
    font-size: 12px;
    color: #9ca3af;
}

.billing-code {
    background: #f3f4f6;
    color: #374151;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.timeline-action {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
}

.timeline-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.progress-note {
    background: #f8fafc;
    padding: 12px;
    border-radius: 6px;
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.5;
}

.read-more {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
}

.diagnosis-info {
    background: #fef3c7;
    padding: 12px;
    border-radius: 6px;
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.5;
    border-left: 4px solid #f59e0b;
}

/* Sidebar Cards */
.sidebar-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.card-action {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.card-action:hover {
    background: #f1f5f9;
}

/* Next Appointment Card */
.next-appointment-card {
    padding: 20px;
    text-align: center;
}

.appointment-date-large {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

/* Billing Summary */
.billing-summary {
    padding: 20px;
}

.billing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.billing-item:last-child {
    margin-bottom: 16px;
}

.billing-label {
    font-size: 14px;
    color: #64748b;
}

.billing-amount {
    font-weight: 600;
    color: #374151;
}

.billing-amount.negative {
    color: #dc2626;
}

/* Client Info List */
.client-info-list {
    padding: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
}

/* Communication Settings */
.communication-settings {
    padding: 20px;
}

.comm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.comm-item:last-child {
    margin-bottom: 0;
}

.comm-label {
    font-size: 14px;
    color: #64748b;
}

.comm-value {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.comm-value.enabled {
    color: #059669;
}

/* Recent Files */
.recent-files {
    padding: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.file-icon {
    font-size: 20px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
}

.file-date {
    font-size: 12px;
    color: #64748b;
}

/* ===== APPOINTMENT MODAL STYLES ===== */
.appointment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.appointment-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.appointment-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.appointment-modal-overlay.active .appointment-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.appointment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.appointment-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.appointment-modal-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.appointment-modal-close:hover {
    background: #e2e8f0;
    color: #374151;
}

/* Modal Content */
.appointment-modal-content {
    padding: 0;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

/* Appointment Tabs */
.appointment-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    margin: 20px 24px 0;
    border-radius: 8px;
    gap: 2px;
}

.appointment-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.appointment-tab.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.appointment-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: #374151;
}

/* Tab Content */
.appointment-tab-content {
    display: none;
    padding: 24px;
}

.appointment-tab-content.active {
    display: block;
}

/* Appointment Type Selection */
.appointment-type-section {
    margin-bottom: 24px;
}

.appointment-type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.appointment-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.appointment-type-option:hover {
    border-color: #3b82f6;
    background: #f1f5f9;
}

.appointment-type-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.type-icon {
    margin-bottom: 8px;
}

.icon-avatars {
    display: flex;
    position: relative;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 2px solid white;
}

.group-avatars .avatar:not(:first-child) {
    margin-left: -8px;
}

.type-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-align: center;
}

/* Form Sections */
.form-section {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

/* Client Search */
.client-search-container {
    display: flex;
    gap: 12px;
}

.client-search-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.client-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.create-client-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.create-client-button:hover {
    background: #2563eb;
}

.plus-icon {
    font-size: 16px;
    font-weight: bold;
}

.client-info {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}

.client-search-results {
    margin-top: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
}

/* Appointment Name */
.appointment-name-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.appointment-name-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* All Day Option */
.all-day-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.checkbox-input {
    width: 16px;
    height: 16px;
}

.checkbox-label {
    font-size: 14px;
    color: #374151;
    margin: 0;
}

/* Date and Time */
.datetime-container {
    transition: opacity 0.2s ease;
}

.datetime-container.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.date-input-group {
    margin-bottom: 12px;
}

.date-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.time-inputs-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.time-input-group {
    flex: 1;
    min-width: 120px;
}

.time-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.time-separator {
    color: #64748b;
    font-size: 14px;
    margin: 0 4px;
}

.duration-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.duration-input {
    width: 80px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.duration-unit {
    font-size: 14px;
    color: #64748b;
}

/* Location Row */
.location-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.location-select {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.recurring-option {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Service Row */
.service-row {
    display: flex;
    gap: 12px;
}

.service-select {
    flex: 2;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.fee-input {
    flex: 1;
    min-width: 100px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

/* Service Note */
.service-note {
    margin-top: 12px;
    padding: 12px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
}

.service-note-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #92400e;
}

.service-note-close {
    background: none;
    border: none;
    color: #92400e;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.service-note-close:hover {
    background: rgba(146, 64, 14, 0.1);
}

/* Placeholder Content */
.placeholder-content {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.placeholder-content h3 {
    margin: 0 0 8px 0;
    color: #374151;
}

/* Modal Footer */
.appointment-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.btn-cancel {
    padding: 10px 16px;
    background: transparent;
    color: #64748b;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #f1f5f9;
    color: #374151;
    border-color: #9ca3af;
}

.btn-save {
    padding: 10px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-save:hover {
    background: #2563eb;
}

/* Search Results */
.search-results-container {
    max-height: 200px;
    overflow-y: auto;
}

.client-search-result {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.client-search-result:last-child {
    border-bottom: none;
}

.client-search-result:hover {
    background: #f8fafc;
}

.client-result-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
}

.client-result-email {
    font-size: 12px;
    color: #64748b;
}

/* ===== FORM STYLES (NEW CLIENT) ===== */
.form-container {
    max-width: 1000px;
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section.comments-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid #e2e8f0;
}

.section-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
}

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

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

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

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-label.required::after {
    content: ' *';
    color: #ef4444;
}

.form-input, .form-select, .form-textarea {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.radio-group {
    display: flex;
    gap: 16px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
}

.radio-input {
    margin: 0;
}

.radio-label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

/* Phone Group */
.phone-group {
    display: flex;
    gap: 8px;
}

.phone-input {
    flex: 2;
}

.phone-settings {
    flex: 1;
    min-width: 140px;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

/* Alert */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert.alert-info {
    background: #eff6ff;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

/* Notification Groups */
.notification-group {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.toggle-switch {
    position: relative;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    display: block;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease;
}

.toggle-label::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.toggle-input:checked + .toggle-label {
    background: #3b82f6;
}

.toggle-input:checked + .toggle-label::after {
    transform: translateX(20px);
}

.notification-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.help-icon {
    width: 16px;
    height: 16px;
    background: #9ca3af;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: help;
}

.new-badge {
    background: #10b981;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.manage-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    margin-left: auto;
}

.notification-settings {
    padding: 16px;
    display: none;
}

.notification-settings.active {
    display: block;
}

.notification-select {
    width: 100%;
}

.phone-notification-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phone-options {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.radio-option-inline {
    display: flex;
    align-items: center;
    gap: 4px;
}

.radio-label-small {
    font-size: 12px;
    color: #374151;
    cursor: pointer;
}

.phone-type-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    margin-top: 32px;
}

/* ===== REPORTS STYLES ===== */
.reports-header {
    margin-bottom: 40px;
}

.reports-title {
    font-size: 32px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.reports-subtitle {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.report-category {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-header {
    background: #f8fafc;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
}

.report-list {
    padding: 0;
}

.report-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.report-item:hover {
    background: #f8fafc;
}

.report-info {
    flex: 1;
}

.report-name {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.report-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.generate-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.generate-btn:hover {
    background: #2563eb;
}

.generate-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.report-filters {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.filters-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
}

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

.recent-reports {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recent-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.recent-list {
    padding: 0;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
}

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

.recent-info {
    flex: 1;
}

.recent-name {
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.recent-date {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.download-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.download-btn:hover {
    background: #059669;
}

/* ===== RESOURCES STYLES ===== */
.category-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 32px;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    background: #e2e8f0;
    color: #374151;
}

.resources-filters {
    margin-bottom: 32px;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.document-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.document-icon {
    font-size: 32px;
    margin-bottom: 16px;
    text-align: center;
}

.document-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.document-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.document-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.document-category {
    background: #eff6ff;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.document-age {
    background: #f0fdf4;
    color: #166534;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.document-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.document-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.document-access {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.document-access.clinical {
    background: #fef3c7;
    color: #92400e;
}

.document-access.administrative {
    background: #e0e7ff;
    color: #3730a3;
}

.document-access.billing {
    background: #f3e8ff;
    color: #6b21a8;
}

.document-actions {
    display: flex;
    gap: 8px;
}

.doc-action-btn {
    background: none;
    border: 1px solid #d1d5db;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-action-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.documents-list {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.list-document-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-doc-icon {
    font-size: 20px;
    width: 32px;
    text-align: center;
}

.list-doc-name {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 2px;
}

.list-doc-desc {
    font-size: 12px;
    color: #64748b;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.empty-description {
    color: #64748b;
    font-size: 14px;
}

/* ===== SETTINGS STYLES ===== */
.settings-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    max-height: calc(100vh - 140px);
    overflow: hidden;
}

.settings-sidebar {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.settings-nav {
    display: flex;
    flex-direction: column;
}

.settings-nav-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.settings-nav-item:hover {
    background: #f8fafc;
    color: #374151;
}

.settings-nav-item.active {
    background: #eff6ff;
    color: #3b82f6;
    border-right: 3px solid #3b82f6;
}

.settings-nav-icon {
    font-size: 16px;
}

.settings-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    height: fit-content;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.settings-content-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.settings-content-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.settings-content-description {
    font-size: 14px;
    color: #64748b;
}

.settings-content-body {
    padding: 32px;
}

.settings-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.settings-section-description {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}

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

.settings-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.settings-form-input,
.settings-form-select,
.settings-form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

.settings-form-input:focus,
.settings-form-select:focus,
.settings-form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.settings-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.settings-form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.settings-form-checkbox input {
    width: 16px;
    height: 16px;
}

.settings-form-checkbox label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 24px 32px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* Team Management Styles */
.team-member-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.team-member-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.team-member-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.team-member-info {
    flex: 1;
}

.team-member-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.team-member-role {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 4px;
}

.team-member-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.team-member-status.active {
    background: #dcfdf7;
    color: #065f46;
}

.team-member-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.team-member-actions {
    display: flex;
    gap: 8px;
}

.team-action-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.team-action-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.team-action-btn.danger {
    color: #dc2626;
    border-color: #fecaca;
}

.team-action-btn.danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.settings-section-content {
    display: block;
}

.settings-section-content.hidden {
    display: none;
}

/* ===== DASHBOARD SPECIFIC STYLES ===== */
.bottom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.kpi-item {
    text-align: center;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.kpi-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.kpi-trend {
    font-size: 11px;
    color: #059669;
    font-weight: 500;
}

.activity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.activity-icon {
    font-size: 16px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: #374151;
    margin-bottom: 2px;
}

.activity-time {
    font-size: 12px;
    color: #64748b;
}

.pending-tasks-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.progress-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.progress-count {
    font-weight: 600;
    color: #10b981;
}

.progress-bar {
    background: #f0f0f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(45deg, #10b981, #059669);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.pending-alert {
    background: #fef3c7;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.alert-header {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 8px;
}

.alert-content {
    font-size: 14px;
    color: #78350f;
    line-height: 1.5;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1400px) {
    .calendar-schedule-layout {
        grid-template-columns: 1fr 280px;
        gap: 20px;
    }
    
    .profile-layout {
        grid-template-columns: 1fr 300px;
    }
}

@media (max-width: 1200px) {
    .calendar-schedule-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .todays-schedule {
        order: -1;
    }
    
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar {
        order: -1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .settings-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .settings-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 16px 20px;
    }
    
    .header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .header-left {
        order: 2;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .header-right {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .welcome-title {
        font-size: 24px;
    }
    
    .clients-summary {
        justify-content: space-around;
        gap: 16px;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .filter-left {
        flex-direction: column;
        gap: 16px;
    }
    
    .clients-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .client-profile-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .client-header-main {
        flex-direction: column;
        gap: 16px;
    }
    
    .client-header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .profile-tabs {
        overflow-x: auto;
        padding: 4px;
    }
    
    .profile-tab {
        flex-shrink: 0;
        padding: 10px 16px;
    }
    
    .timeline-item {
        flex-direction: column;
        gap: 8px;
    }
    
    .timeline-filters {
        flex-direction: column;
        gap: 8px;
    }
    
    .note-form-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .calendar-controls-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .appointment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
    
    .appointment-details {
        margin-left: 0;
    }
    
    .schedule-actions {
        flex-direction: column;
    }
    
    .calendar-schedule-layout {
        gap: 16px;
    }
    
    .bottom-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .phone-group {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .appointment-type-options {
        grid-template-columns: 1fr;
    }
    
    .client-search-container {
        flex-direction: column;
    }
    
    .time-inputs-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .time-separator {
        text-align: center;
        margin: 8px 0;
    }
    
    .location-row,
    .service-row {
        flex-direction: column;
    }
    
    .appointment-modal-footer {
        flex-direction: column-reverse;
    }
    
    .btn-cancel,
    .btn-save {
        width: 100%;
    }
    
    .appointment-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .report-item {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .recent-item {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .category-tabs {
        overflow-x: auto;
        padding: 4px;
    }
    
    .tab-btn {
        flex-shrink: 0;
        padding: 10px 16px;
    }
}

/* ===== FOCUS STYLES ===== */
.client-search-input:focus,
.appointment-name-input:focus,
.date-input:focus,
.time-input:focus,
.duration-input:focus,
.location-select:focus,
.service-select:focus,
.fee-input:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== LOADING AND ERROR STATES ===== */
.btn-save.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-save.loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.form-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

.form-success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.client-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.client-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #3b82f6;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 16px;
    display: none;
}

.no-results.show {
    display: block;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.text-sm {
    font-size: 14px;
}

.text-xs {
    font-size: 12px;
}

.text-lg {
    font-size: 18px;
}

.text-xl {
    font-size: 20px;
}

.text-2xl {
    font-size: 24px;
}

.text-3xl {
    font-size: 30px;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-start { justify-content: flex-start; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.rounded { border-radius: 4px; }
.rounded-md { border-radius: 6px; }
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 16px; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1); }

.border { border: 1px solid #e2e8f0; }
.border-t { border-top: 1px solid #e2e8f0; }
.border-b { border-bottom: 1px solid #e2e8f0; }
.border-l { border-left: 1px solid #e2e8f0; }
.border-r { border-right: 1px solid #e2e8f0; }

.bg-white { background-color: white; }
.bg-gray-50 { background-color: #f8fafc; }
.bg-gray-100 { background-color: #f1f5f9; }
.bg-gray-200 { background-color: #e2e8f0; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-blue-600 { background-color: #2563eb; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-green-500 { background-color: #10b981; }
.bg-red-50 { background-color: #fef2f2; }
.bg-yellow-50 { background-color: #fefcbf; }

.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-green-500 { color: #10b981; }
.text-green-600 { color: #059669; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-yellow-600 { color: #d97706; }

.hover\:bg-gray-50:hover { background-color: #f8fafc; }
.hover\:bg-gray-100:hover { background-color: #f1f5f9; }
.hover\:bg-blue-600:hover { background-color: #2563eb; }
.hover\:text-blue-600:hover { color: #2563eb; }
.hover\:text-gray-700:hover { color: #374151; }

.transition { transition: all 0.2s ease; }
.transition-colors { transition: color 0.2s ease, background-color 0.2s ease; }
.transition-transform { transition: transform 0.2s ease; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.select-none { user-select: none; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

.whitespace-nowrap { white-space: nowrap; }
.truncate { 
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .sidebar,
    .btn,
    .dropdown-menu,
    .appointment-modal-overlay {
        display: none !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
    
    .content-area {
        padding: 0 !important;
    }
    
    .client-card,
    .card,
    .profile-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .client-card,
    .card,
    .profile-section,
    .sidebar-card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background: #000;
        color: #fff;
        border: 2px solid #000;
    }
    
    .btn-outline {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
    
    .search-input,
    .form-input,
    .form-select,
    .form-textarea {
        border: 2px solid #000;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .client-card:hover,
    .appointment-item:hover,
    .btn:hover {
        transform: none !important;
    }
}

/* ===== DASHBOARD SETTINGS STYLES ===== */

/* Widget Toggle Switches */
.widget-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.widget-toggle-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.widget-toggle-item:hover {
    background: #f1f5f9;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #3b82f6;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.widget-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-toggle-icon {
    font-size: 20px;
}

.widget-toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

/* Dashboard Preview Area */
.dashboard-preview {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    min-height: 200px;
}

.preview-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

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

.preview-row-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.preview-row-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.preview-widget {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
}

.preview-widget:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.preview-widget:active {
    cursor: grabbing;
}

.preview-widget.disabled {
    opacity: 0.4;
    background: #f1f5f9;
}

.preview-widget.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.preview-widget.drop-before::before,
.preview-widget.drop-after::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #3b82f6;
    border-radius: 2px;
}

.preview-widget.drop-before::before {
    left: -8px;
}

.preview-widget.drop-after::after {
    right: -8px;
}

.preview-row.drop-target {
    background: rgba(59, 130, 246, 0.1);
    border: 2px dashed #3b82f6;
    border-radius: 8px;
    min-height: 60px;
}

.preview-icon {
    font-size: 20px;
}

.preview-label {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.drag-handle {
    color: #94a3b8;
    font-size: 14px;
    letter-spacing: 2px;
    cursor: grab;
}

.preview-hint {
    text-align: center;
    color: #64748b;
    font-size: 13px;
    margin-top: 16px;
}

/* Settings Actions */
.settings-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-primary:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Card Subtitle */
.card-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

/* Notification Toast */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

.notification-message {
    font-size: 14px;
    color: #1e293b;
}

.notification-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.notification-close:hover {
    color: #64748b;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Widget Hidden State (for dashboard) */
.widget-hidden {
    display: none !important;
}

/* Settings Navigation Enhancements */
.settings-nav-section {
    margin-bottom: 8px;
}

.settings-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
}

.settings-nav-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-toggle {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: transform 0.2s ease;
}

.section-toggle.active {
    transform: rotate(180deg);
}

.settings-nav-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.settings-nav-group.collapsed {
    max-height: 0;
    opacity: 0;
}

.settings-nav-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.settings-nav-item:hover {
    background: #f1f5f9;
}

.settings-nav-item.active {
    background: #eff6ff;
}

.nav-item-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.nav-item-content {
    flex: 1;
    min-width: 0;
}

.nav-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.nav-item-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.4;
}

.settings-nav-item.active .nav-item-title {
    color: #3b82f6;
}

/* Settings Content Styles */
.section-header {
    margin-bottom: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.section-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 8px 0 0 0;
}

.help-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #3b82f6;
    text-decoration: none;
    margin-top: 12px;
}

.help-link:hover {
    text-decoration: underline;
}

.settings-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.settings-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.settings-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.settings-card .card-content {
    padding: 20px;
}

.edit-btn,
.manage-btn {
    background: none;
    border: 1px solid #e2e8f0;
    color: #3b82f6;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-btn:hover,
.manage-btn:hover {
    background: #eff6ff;
    border-color: #3b82f6;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #64748b;
    font-size: 14px;
}

/* Responsive Dashboard Preview */
@media (max-width: 768px) {
    .preview-row-top,
    .preview-row-bottom {
        grid-template-columns: 1fr;
    }

    .settings-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* ===== DIAGNOSIS TAB STYLES ===== */
.diagnosis-overview {
    padding: 24px;
}

.diagnosis-overview .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.diagnosis-overview .section-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.diagnosis-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.diagnosis-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: box-shadow 0.2s ease;
}

.diagnosis-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.diagnosis-card.active-diagnosis {
    border-left: 4px solid #10b981;
}

.diagnosis-card.resolved-diagnosis {
    border-left: 4px solid #94a3b8;
    opacity: 0.8;
}

.diagnosis-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.diagnosis-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.diagnosis-date {
    font-size: 13px;
    color: #64748b;
}

.diagnosis-code {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.diagnosis-name {
    font-size: 18px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 12px;
}

.diagnosis-notes {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

/* ===== TREATMENT PLAN TAB STYLES ===== */
.treatment-plan-overview {
    padding: 24px;
}

.treatment-plan-overview .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.treatment-plan-overview .section-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.treatment-plan-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.treatment-plan-card.current-plan {
    border-left: 4px solid #3b82f6;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.plan-status {
    display: flex;
    align-items: center;
    gap: 16px;
}

.plan-dates {
    font-size: 14px;
    color: #64748b;
}

.plan-actions {
    display: flex;
    gap: 8px;
}

.plan-section {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.plan-section:last-child {
    border-bottom: none;
}

.plan-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.plan-section ul {
    margin: 0;
    padding-left: 20px;
    color: #475569;
    line-height: 1.8;
}

.plan-section p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.goal-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.goal-item:last-child {
    margin-bottom: 0;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.goal-number {
    font-weight: 600;
    color: #3b82f6;
    font-size: 14px;
}

.goal-progress {
    font-size: 13px;
    color: #64748b;
}

.goal-item p {
    margin: 0 0 12px 0;
    color: #334155;
}

.goal-item .progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.goal-item .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.status-badge.resolved {
    background: #f1f5f9;
    color: #64748b;
}

/* ===== DIAGNOSIS MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-container {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.show .modal-container {
    transform: translateY(0);
}

.modal-container.modal-large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #1e293b;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group.half {
    flex: 1;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Search Input Container */
.search-input-container {
    position: relative;
}

.search-input-container .form-input {
    padding-right: 40px;
}

.search-icon-input {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.5;
}

/* Diagnosis Categories */
.diagnosis-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.category-chip {
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: white;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-chip:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.category-chip.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Diagnosis Select List */
.diagnosis-select-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.diagnosis-option {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.diagnosis-option:last-child {
    border-bottom: none;
}

.diagnosis-option:hover {
    background: #f8fafc;
}

.diagnosis-option.selected {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
}

.diagnosis-option-code {
    font-size: 14px;
    font-weight: 700;
    color: #3b82f6;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    min-width: 65px;
}

.diagnosis-option-info {
    flex: 1;
}

.diagnosis-option-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.diagnosis-option-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

/* Selected Diagnosis Display */
.selected-diagnosis-section {
    margin-bottom: 20px;
}

.selected-diagnosis-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #3b82f6;
    border-radius: 8px;
}

.selected-diagnosis-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selected-code {
    font-size: 16px;
    font-weight: 700;
    color: #3b82f6;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.selected-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.remove-selection {
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.remove-selection:hover {
    color: #ef4444;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: white;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1100;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Button Styles (ensure they're defined) */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2563eb;
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* ===== TREATMENT PLAN MODAL STYLES ===== */
.modal-container.modal-xl {
    max-width: 900px;
}

.treatment-plan-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.form-helper {
    font-size: 13px;
    color: #64748b;
    margin: -8px 0 16px 0;
}

.form-group.third {
    flex: 1;
}

/* Checkbox Items */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"]:checked + .checkbox-label {
    color: #1e293b;
    font-weight: 500;
}

.checkbox-label {
    font-size: 14px;
    color: #475569;
    cursor: pointer;
}

.checkbox-label strong {
    color: #3b82f6;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.diagnoses-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.interventions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

@media (max-width: 600px) {
    .interventions-grid {
        grid-template-columns: 1fr;
    }
}

/* Dynamic List Items */
.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.dynamic-list-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dynamic-list-item .form-input {
    flex: 1;
}

.remove-item-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-item-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

.remove-item-btn.small {
    width: 28px;
    height: 28px;
    font-size: 16px;
}

.add-item-btn {
    background: none;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 10px 16px;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
}

.add-item-btn:hover {
    background: #eff6ff;
    border-color: #3b82f6;
}

.add-item-btn.small {
    padding: 6px 12px;
    font-size: 13px;
    width: auto;
    display: inline-block;
}

/* Goals Form Items */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 12px;
}

.goal-form-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
}

.goal-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.goal-form-number {
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6;
}

/* Objectives */
.objectives-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.objective-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.objective-item .form-input {
    flex: 1;
}

/* Button Outline variant */
.btn-outline {
    background: white;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.btn-outline:hover {
    background: #eff6ff;
}

/* ===== RESOURCES PAGE STYLES ===== */

/* Delete button styling */
.doc-action-btn.delete-btn {
    color: #dc2626;
}

.doc-action-btn.delete-btn:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.list-action-btn.delete-btn {
    color: #dc2626;
}

.list-action-btn.delete-btn:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* List view table styling */
.documents-list {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.list-table {
    width: 100%;
    border-collapse: collapse;
}

.list-header {
    background: #f8fafc;
}

.list-header th {
    text-align: left;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.list-row {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.list-row:hover {
    background: #f8fafc;
}

.list-row:last-child {
    border-bottom: none;
}

.list-cell {
    padding: 14px 16px;
    vertical-align: middle;
}

.list-document-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-doc-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.list-doc-details {
    min-width: 0;
}

.list-doc-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}

.list-doc-desc {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}

.list-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.list-action-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.list-action-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Document access badges in list view */
.list-cell .document-access {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.list-cell .document-access.clinical {
    background: #dbeafe;
    color: #1e40af;
}

.list-cell .document-access.administrative {
    background: #f3e8ff;
    color: #7c3aed;
}

.list-cell .document-access.billing {
    background: #dcfce7;
    color: #166534;
}

/* Responsive list view */
@media (max-width: 1024px) {
    .list-doc-name,
    .list-doc-desc {
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    .documents-list {
        overflow-x: auto;
    }

    .list-table {
        min-width: 800px;
    }
}

/* ===== AI PROGRESS NOTES ===== */
.ai-generated-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-badge {
    background: #2563eb;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ai-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 300px;
}

.ai-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: aiSpin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes aiSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.ai-loading-subtext {
    font-size: 14px;
    color: #64748b;
}

.progress-note-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

/* ===================== Integrations Page ===================== */

.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.integration-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.integration-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
}

.integration-card[data-connected="true"] {
    border-color: #bbf7d0;
}

.integration-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.integration-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.integration-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.integration-status.connected {
    background: #dcfce7;
    color: #15803d;
}

.integration-status.disconnected {
    background: #f1f5f9;
    color: #64748b;
}

.integration-info {
    flex: 1;
}

.integration-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px;
}

.integration-category-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: #6366f1;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.integration-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.integration-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid #f1f5f9;
}

.connect-btn {
    flex: 1;
    padding: 8px 16px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.connect-btn:hover {
    background: #4338ca;
}

.configure-btn {
    flex: 1;
    padding: 8px 16px;
    background: #fff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.configure-btn:hover {
    background: #eef2ff;
}

.disconnect-btn {
    padding: 8px 16px;
    background: none;
    color: #ef4444;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
}

.disconnect-btn:hover {
    background: #fef2f2;
}

.integration-summary {
    font-size: 14px;
    font-weight: 600;
    color: #15803d;
    background: #dcfce7;
    padding: 6px 14px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .integrations-grid {
        grid-template-columns: 1fr;
    }
}