/* public/assets/css/style.css */
/* Modern, Premium Design System for Multi-Tenant Doctor Appointment Booking SaaS */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

html {
    scroll-behavior: smooth;
}

/* --- 1. Design System Tokens --- */
:root {
    /* Fonts */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

    /* Platform (SaaS) Colors - Indigo & Emerald */
    --saas-primary: #4f46e5;
    --saas-primary-hover: #4338ca;
    --saas-primary-light: #e0e7ff;
    --saas-accent: #10b981;
    --saas-accent-hover: #059669;
    --saas-bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);

    /* Clinic Portal Colors - Medical Blue & Teal */
    --clinic-primary: #0ea5e9;
    --clinic-primary-hover: #0284c7;
    --clinic-primary-light: #e0f2fe;
    --clinic-accent: #0d9488;
    --clinic-accent-light: #ccfbf1;
    
    /* Neutral Colors */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Status Colors */
    --status-success: #10b981;
    --status-success-bg: #d1fae5;
    --status-warning: #f59e0b;
    --status-warning-bg: #fef3c7;
    --status-error: #ef4444;
    --status-error-bg: #fee2e2;

    /* Layout Elements */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 2. Global Resets & Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- 3. Reusable Component Layouts --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Glassmorphism card */
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    gap: 8px;
}

.btn-primary-saas {
    background: var(--saas-primary);
    color: white;
}
.btn-primary-saas:hover {
    background: var(--saas-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-primary-clinic {
    background: var(--clinic-primary);
    color: white;
}
.btn-primary-clinic:hover {
    background: var(--clinic-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.btn-secondary {
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.table-action-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    width: auto;
    text-align: center;
    gap: 4px;
    min-width: 80px;
}

.compact-btn {
    min-height: 30px;
}

.table-action-btn.btn-secondary {
    background: white;
    color: var(--text-secondary);
    border: 1px solid #d1d5db;
}

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

.table-action-btn.btn-primary-saas {
    background: var(--saas-primary);
    color: white;
    border: 1px solid transparent;
}

.table-action-btn.btn-primary-saas:hover {
    background: var(--saas-primary-hover);
}

.table-action-btn.btn-danger {
    background: #ef4444;
    color: white;
    border: 1px solid transparent;
}

.table-action-btn.btn-danger:hover {
    background: #dc2626;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
    min-width: 0;
}

.filter-form {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    margin: 12px 0;
    width: 100%;
    overflow-x: visible;
    padding-bottom: 4px;
}

.filter-form .form-control {
    min-width: 0;
}

.filter-form .form-control.wide {
    flex: 1 1 auto;
    min-width: 220px;
}

.filter-form .form-control.sm {
    flex: 0 0 120px;
}

.filter-form .btn {
    flex: 0 0 auto;
}

.filter-form .form-control.sm {
    flex: 0 0 140px;
}

.filter-form .btn {
    flex: 0 0 auto;
}
.form-control:focus {
    border-color: var(--saas-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.clinic-focus:focus {
    border-color: var(--clinic-primary) !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1) !important;
}

/* Badge Styling */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: capitalize;
}
.badge-success { background: var(--status-success-bg); color: #065f46; }
.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-warning { background: var(--status-warning-bg); color: #92400e; }
.badge-danger { background: var(--status-error-bg); color: #991b1b; }
.badge-info { background: var(--saas-primary-light); color: #3730a3; }

/* --- 4. SaaS Landing Page --- */
.saas-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}
.saas-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-text img,
.logo-text svg {
    display: inline-block;
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: contain;
    vertical-align: middle;
}
.logo-text span {
    color: var(--saas-primary);
}
.logo-clinic span {
    color: var(--clinic-primary);
}

.saas-hero {
    background: radial-gradient(circle at 10% 20%, rgba(243, 244, 246, 0.5) 0%, rgba(229, 231, 235, 0.5) 90%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.saas-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    z-index: 0;
}
.saas-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}
.saas-hero h1 {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: -0.025em;
}
.saas-hero h1 mark {
    background: transparent;
    color: var(--saas-primary);
}
.saas-hero p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 35px;
}

/* Search Bar (Hero) */
.search-container {
    background: white;
    padding: 10px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto 50px auto;
    border: 1px solid var(--border-color);
}
.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 15px;
    font-size: 16px;
}

/* Feature Grid */
.saas-features {
    padding: 80px 0;
    background: white;
}
.section-title {
    text-align: center;
    margin-bottom: 50px;
}
.section-title h2 {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 12px;
}
.section-title p {
    color: var(--text-secondary);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.feature-card {
    padding: 30px;
    border-radius: var(--radius-md);
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--saas-primary-light);
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--saas-primary-light);
    color: var(--saas-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

/* Step tracker */
.workflow-section {
    padding: 80px 0;
    background: #f1f5f9;
}
.workflow-steps {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}
.workflow-steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #cbd5e1;
    z-index: 0;
}
.step-item {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}
.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: 3px solid #cbd5e1;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    transition: all var(--transition-normal);
}
.step-item:hover .step-number {
    border-color: var(--saas-primary);
    background: var(--saas-primary);
    color: white;
    transform: scale(1.1);
}
.step-item h3 {
    font-size: 16px;
    margin-bottom: 6px;
}
.step-item p {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 0 10px;
}

/* Lead Generation Split Layout */
.saas-cta-split {
    padding: 80px 0;
    background: white;
}
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.split-text h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
}
.split-text p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 16px;
}
.benefit-list {
    list-style: none;
}
.benefit-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 500;
}
.benefit-list li::before {
    content: '✓';
    color: var(--saas-accent);
    font-weight: 700;
}

/* Clinic Search Results */
.clinic-results {
    padding: 40px 0 80px 0;
}
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
    margin-top: 30px;
}
.clinic-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.clinic-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--saas-primary-light);
}
.clinic-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}
.clinic-card-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.clinic-card-link {
    margin-top: 15px;
    width: 100%;
}

/* --- 5. Clinic Portals --- */
.clinic-header-banner {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: left;
    position: relative;
}
.clinic-profile {
    display: flex;
    align-items: center;
    gap: 24px;
}
.clinic-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    background: var(--clinic-primary);
    color: white;
    font-size: 36px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}
.clinic-title-area h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}
.clinic-hours-badge {
    background: white;
    padding: 4px 12px;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.clinic-content {
    padding: 50px 0;
}
.doctor-list-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 8px;
}
.doctor-list-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--clinic-primary);
    border-radius: 9999px;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
}
.doctor-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--clinic-primary-light);
}
.doctor-photo-area {
    background: #f1f5f9;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 48px;
    border-bottom: 1px solid var(--border-color);
}
.doctor-info-area {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.doctor-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}
.doctor-specialty {
    color: var(--clinic-primary);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
}
.doctor-bio {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}
.doctor-fee {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}
.doctor-book-btn {
    width: 100%;
}

/* --- 6. Booking Wizard & Date Slider --- */
.booking-container {
    max-width: 750px;
    margin: 0 auto;
}
.booking-header-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Progressive Wizard Steps */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    background: white;
    padding: 15px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.wizard-step-item {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.wizard-step-item.active {
    color: var(--clinic-primary);
}
.wizard-step-item.active .wizard-step-number {
    background: var(--clinic-primary);
    color: white;
}
.wizard-step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Calendar Date Slider */
.date-slider-wrapper {
    margin-bottom: 30px;
}
.date-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0 15px 0;
    scroll-behavior: smooth;
}
/* Hide scrollbar for slider */
.date-slider::-webkit-scrollbar {
    display: none;
}
.date-card {
    flex: 0 0 75px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 5px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.date-card:hover {
    border-color: var(--clinic-primary);
    transform: translateY(-2px);
}
.date-card.selected {
    background: var(--clinic-primary);
    border-color: var(--clinic-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25);
}
.date-card-day {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-muted);
}
.date-card.selected .date-card-day {
    color: rgba(255,255,255,0.8);
}
.date-card-num {
    font-size: 20px;
    font-weight: 700;
    margin: 4px 0;
}
.date-card-month {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Slot Selection Display */
.slots-wrapper {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 30px;
}
.slots-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Simple availability view */
.simple-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}
.simple-slot-btn {
    padding: 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
}
.simple-slot-btn:hover:not(.disabled) {
    border-color: var(--clinic-primary);
    background: var(--clinic-primary-light);
    color: var(--clinic-primary-hover);
}
.simple-slot-btn.selected {
    background: var(--clinic-primary);
    border-color: var(--clinic-primary);
    color: white;
}
.simple-slot-btn.disabled {
    background: #f1f5f9;
    color: var(--text-muted);
    border-color: #e2e8f0;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Pictorial slots view */
.pictorial-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.pictorial-slot-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
}
.pictorial-slot-card:hover:not(.disabled) {
    border-color: var(--clinic-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.pictorial-slot-card.selected {
    border-color: var(--clinic-primary);
    background: #f0f9ff;
    box-shadow: 0 0 0 2px var(--clinic-primary);
}
.pictorial-slot-card.disabled {
    background: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
}
.pictorial-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
}
.pictorial-slot-capacity-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: auto;
}
.pictorial-box {
    aspect-ratio: 1;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    transition: all var(--transition-fast);
}
.pictorial-box.booked {
    background: var(--clinic-primary);
    border-color: var(--clinic-primary);
}
.pictorial-slot-card.selected .pictorial-box:not(.booked) {
    border-color: var(--clinic-primary-hover);
    background: white;
}
.pictorial-slot-card.disabled .pictorial-box.booked {
    background: #94a3b8;
    border-color: #94a3b8;
}
.pictorial-slot-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 500;
}

/* Wizard step sections */
.wizard-step-section {
    display: none;
}
.wizard-step-section.active {
    display: block;
    animation: fadeIn var(--transition-normal);
}

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

/* Confirmation overlay/card */
.confirmation-card {
    text-align: center;
    padding: 40px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}
.success-icon-circle {
    width: 72px;
    height: 72px;
    background: var(--status-success-bg);
    color: var(--status-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px auto;
}

/* --- 7. Admin Dashboards --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}
.admin-sidebar {
    width: 260px;
    background: #0f172a;
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
}
.admin-sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #1e293b;
}
.admin-sidebar-nav {
    padding: 20px 0;
    list-style: none;
    flex: 1;
}
.admin-nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: #94a3b8;
    font-weight: 500;
    transition: all var(--transition-fast);
}
.admin-nav-item.active a, .admin-nav-item a:hover {
    color: white;
    background: #1e293b;
    border-left: 4px solid var(--saas-primary);
}
.clinic-nav.active a, .clinic-nav a:hover {
    border-left-color: var(--clinic-primary) !important;
}

.admin-main {
    flex: 1;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
}
.admin-header {
    background: white;
    padding: 16px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-content {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stats-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.stats-card-title {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
}
.stats-card-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

/* Data Tables */
.table-wrapper {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: auto;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    min-width: 0;
}
.table-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}
.table-title {
    font-size: 18px;
    font-weight: 700;
}
/* stronger, single-line top filter row */
.filter-form {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: visible;
}
.filter-form .form-control.wide {
    flex: 1 1 auto;
    min-width: 220px;
}
.filter-form .form-control.sm {
    flex: 0 0 120px;
}
.filter-form .btn { white-space: nowrap; }
@media (max-width: 860px) {
    .filter-form {
        padding-left: 16px;
        padding-right: 16px;
    }
}
.data-table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    text-align: left;
}
.table-wrapper .filter-form {
    padding-left: 24px;
    padding-right: 24px;
    margin: 0 0 8px 0;
    box-sizing: border-box;
    width: auto;
}

.table-wrapper .filter-form .form-control.wide {
    flex: 1 1 180px;
    min-width: 120px;
    max-width: 320px;
    box-sizing: border-box;
}

.table-wrapper .filter-form .form-control.sm {
    flex: 0 0 96px;
    min-width: 72px;
}
.data-table th:nth-child(1) { width: 25%; }
.data-table th:nth-child(2) { width: 30%; }
.data-table th:nth-child(3) { width: 20%; }
.data-table th:nth-child(4) { width: 25%; }
.data-table td:nth-child(3) { white-space: nowrap; text-align: center; }
.data-table th {
    background: #f8fafc;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid rgba(0,0,0,0.04);
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    vertical-align: top;
    word-break: break-word;
}
.data-table th, .data-table td { border: 1px solid rgba(0,0,0,0.04); }
.data-table th, .data-table td {
    min-width: 10px;
}
.data-table tr:last-child td {
    border-bottom: none;
}
.data-table tr:hover td {
    background: #f8fafc;
}

/* Switch Toggle (Active/Disabled status) */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--saas-accent);
}
input:checked + .slider:before {
    transform: translateX(20px);
}

/* Login Card Centered */
.login-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1) 0%, rgba(248, 250, 252, 1) 70%);
    padding: 20px;
}
.login-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}

/* Alert notifications */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-danger {
    background: var(--status-error-bg);
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.alert-success {
    background: var(--status-success-bg);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Simulated Notification Log Banner */
.notification-simulate-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #92400e;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.notification-simulate-header {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}


/* ====================================================================
   8. VISUAL ENHANCEMENT — Animations, Effects & Scroll Triggers
   ==================================================================== */

/* --- Keyframe Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-18px) rotate(1deg); }
    66% { transform: translateY(8px) rotate(-1deg); }
}

@keyframes floatReverse {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(12px) rotate(-1.5deg); }
    66% { transform: translateY(-15px) rotate(1.5deg); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(79, 70, 229, 0.15); }
    50% { box-shadow: 0 0 40px rgba(79, 70, 229, 0.3); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(79, 70, 229, 0.2); }
    50% { border-color: rgba(79, 70, 229, 0.5); }
}

@keyframes lineGrow {
    from { width: 0; }
    to { width: 80%; }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5); }
    70% { transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- Scroll-triggered animation utility --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.animate-scale {
    transform: scale(0.92);
}
.animate-on-scroll.animate-scale.visible {
    transform: scale(1);
}

.animate-on-scroll.animate-left {
    transform: translateX(-40px);
}
.animate-on-scroll.animate-left.visible {
    transform: translateX(0);
}

.animate-on-scroll.animate-right {
    transform: translateX(40px);
}
.animate-on-scroll.animate-right.visible {
    transform: translateX(0);
}

/* Stagger delay classes */
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }
.delay-5 { transition-delay: 0.5s !important; }

/* --- Enhanced Header --- */
.saas-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: fadeInDown 0.6s ease-out;
}

.saas-nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.saas-nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
    transition: color 0.25s ease;
}

.saas-nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--saas-primary);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.saas-nav-links a:hover {
    color: var(--saas-primary);
}

.saas-nav-links a:hover::after {
    width: 100%;
}

/* --- Enhanced Hero Section --- */
.saas-hero {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 25%, #f0f9ff 50%, #ede9fe 75%, #faf5ff 100%);
    background-size: 300% 300%;
    animation: gradientShift 12s ease infinite;
    padding: 100px 0 110px;
    position: relative;
    overflow: hidden;
}

.saas-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 50%);
    z-index: 0;
}

/* Floating decorative orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.hero-orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.1));
    top: -60px;
    right: -80px;
    animation: float 8s ease-in-out infinite;
}

.hero-orb-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.1));
    bottom: -40px;
    left: -50px;
    animation: floatReverse 10s ease-in-out infinite;
}

.hero-orb-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.2), rgba(251, 146, 60, 0.1));
    top: 30%;
    left: 15%;
    animation: float 12s ease-in-out infinite 2s;
}

/* Hero text animations */
.saas-hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.saas-hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.saas-hero h1 mark {
    background: transparent;
    background-image: linear-gradient(135deg, var(--saas-primary), #7c3aed, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.saas-hero p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Enhanced Search Bar */
.search-container {
    background: white;
    padding: 8px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.08), 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    gap: 8px;
    max-width: 620px;
    margin: 0 auto;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-container:focus-within {
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.15), 0 0 0 4px rgba(79, 70, 229, 0.06);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 12px;
    background: transparent;
}

/* --- Section Label Tag --- */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--saas-primary);
    background: var(--saas-primary-light);
    border-radius: 9999px;
    margin-bottom: 16px;
}

/* --- Enhanced Feature Cards --- */
.saas-features {
    padding: 100px 0;
    background: white;
    position: relative;
}

.feature-card {
    padding: 36px;
    border-radius: var(--radius-md);
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.35s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    border-radius: 0 4px 4px 0;
    transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-card:hover::before {
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

/* Unique accent colors per feature */
.feature-card.accent-indigo::before { background: linear-gradient(to bottom, #6366f1, #4f46e5); }
.feature-card.accent-indigo .feature-icon { background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: #4f46e5; }

.feature-card.accent-emerald::before { background: linear-gradient(to bottom, #34d399, #10b981); }
.feature-card.accent-emerald .feature-icon { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #059669; }

.feature-card.accent-violet::before { background: linear-gradient(to bottom, #a78bfa, #7c3aed); }
.feature-card.accent-violet .feature-icon { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #7c3aed; }

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-3deg);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Enhanced Workflow / How It Works --- */
.workflow-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

.workflow-steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, #c7d2fe, #a5b4fc, #818cf8, #a5b4fc, #c7d2fe);
    background-size: 200% 100%;
    animation: gradientShift 4s ease infinite;
    z-index: 0;
    border-radius: 3px;
}

.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    border: 3px solid #c7d2fe;
    color: var(--saas-primary);
    font-weight: 800;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px auto;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

.step-item:hover .step-number {
    border-color: var(--saas-primary);
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.25);
}

.step-item h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-item p {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 0 10px;
    line-height: 1.6;
}

/* --- Enhanced CTA / Registration Section --- */
.saas-cta-split {
    padding: 100px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #1e293b 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative background orb in CTA */
.saas-cta-split::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    pointer-events: none;
    animation: float 10s ease-in-out infinite;
}

.saas-cta-split::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1), transparent 70%);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
    pointer-events: none;
    animation: floatReverse 12s ease-in-out infinite;
}

.split-text {
    position: relative;
    z-index: 1;
}

.split-text h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.2;
}

.split-text p {
    color: #94a3b8;
    margin-bottom: 28px;
    font-size: 16px;
    line-height: 1.7;
}

.benefit-list li {
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-weight: 500;
    font-size: 15px;
}

.benefit-list li::before {
    content: '✓';
    color: #34d399;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.benefit-list li code {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
}

/* Enhanced Glass Card */
.saas-cta-split .glass-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 36px;
    position: relative;
    z-index: 1;
    animation: pulseGlow 4s ease-in-out infinite;
}

.saas-cta-split .glass-card h3 {
    color: #ffffff;
}

.saas-cta-split .glass-card .form-label {
    color: #94a3b8;
}

.saas-cta-split .glass-card .form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.saas-cta-split .glass-card .form-control::placeholder {
    color: #64748b;
}

.saas-cta-split .glass-card .form-control:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.1);
}

/* Shimmer submit button */
.btn-shimmer {
    background: linear-gradient(135deg, #4f46e5, #7c3aed, #4f46e5);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: white;
    border: none;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-shimmer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}

/* --- Enhanced Footer --- */
.saas-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 50px 0;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, #4f46e5, #7c3aed, #a855f7, #10b981) 1;
    font-size: 14px;
}

.saas-footer a {
    color: #94a3b8;
    transition: color 0.25s ease, transform 0.25s ease;
    display: inline-block;
}

.saas-footer a:hover {
    color: #e2e8f0;
    transform: translateX(2px);
}

.footer-tagline {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
}

/* --- Responsive media queries --- */
@media (max-width: 768px) {
    .split-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .saas-hero h1 {
        font-size: 32px;
    }
    .saas-hero {
        padding: 70px 0 80px;
    }
    .workflow-steps {
        flex-direction: column;
        gap: 30px;
    }
    .workflow-steps::before {
        display: none;
    }
    .clinic-profile {
        flex-direction: column;
        text-align: center;
    }
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
    }
    .saas-nav-links {
        display: none;
    }
    .hero-orb {
        display: none;
    }
    .saas-features,
    .workflow-section,
    .saas-cta-split {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .saas-hero h1 {
        font-size: 28px;
    }
    .search-container {
        flex-direction: column;
    }
    .search-input {
        border-right: none !important;
        border-bottom: 1px solid var(--border-color);
    }
}
