/**
 * Vetsycare - Premium Veterinary Practice Management System
 * Brand Colors: #2F5855 (Primary Teal) & #C98572 (Accent Coral)
 */

/* ===== CSS Variables ===== */
:root {
    /* Primary Brand Colors */
    --primary: #2F5855;
    --primary-dark: #234442;
    --primary-light: #3d6f6b;
    --primary-lighter: #e8f0ef;
    --primary-rgb: 47, 88, 85;

    /* Accent Brand Colors */
    --accent: #C98572;
    --accent-dark: #b5725f;
    --accent-light: #d9a090;
    --accent-lighter: #fdf5f3;
    --accent-rgb: 201, 133, 114;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;

    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--white);
    overflow-x: hidden;
}

/* Add padding for fixed header on logged-in pages */
body.logged-in {
    padding-top: 70px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(var(--primary-rgb), 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(var(--primary-rgb), 0.5);
    color: var(--white);
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(var(--accent-rgb), 0.4);
}

.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-lighter);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-100);
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    color: var(--white);
    font-size: 1.25rem;
}

.brand-text {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-lighter);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-lighter);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-toggle {
    display: none;
    padding: 0.5rem;
    color: var(--gray-700);
    font-size: 1.5rem;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    z-index: 100;
    margin-top: 0.5rem;
    padding: 0.5rem;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-600);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--primary-lighter);
    color: var(--primary);
}

.dropdown-item i {
    width: 1.25rem;
    text-align: center;
    color: var(--gray-400);
}

.dropdown-item:hover i {
    color: var(--primary);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.user-toggle:hover {
    background: var(--gray-100);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-name {
    font-weight: 500;
    color: var(--gray-700);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 240px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    margin-top: 0.5rem;
    padding: 0.5rem;
}

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

.user-info {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 0.5rem;
}

.user-info strong {
    display: block;
    color: var(--gray-900);
}

.user-info small {
    color: var(--gray-500);
}

.user-dropdown hr {
    display: none;
}

/* ===== Notifications Bell ===== */
.notification-bell {
    position: relative;
}

.bell-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: var(--gray-600);
    font-size: 1.125rem;
    transition: all var(--transition-fast);
    position: relative;
}

.bell-toggle:hover {
    background: var(--primary-lighter);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--error);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 420px;
    max-height: calc(100vh - 90px);
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    border: 1px solid var(--gray-100);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.notification-panel.active {
    display: block;
    animation: slideDown 0.2s ease;
}

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

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
}

.notification-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.archive-all-btn {
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: none;
    font-size: 0.8125rem;
    color: var(--primary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.archive-all-btn:hover {
    background: var(--primary-lighter);
}

.notification-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.notification-tabs::-webkit-scrollbar {
    display: none;
}

.notification-tabs .tab-btn {
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.notification-tabs .tab-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.notification-tabs .tab-btn.active {
    background: var(--primary);
    color: white;
}

.notification-tabs .tab-count {
    margin-left: 0.25rem;
    padding: 0.125rem 0.375rem;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
}

.notification-tabs .tab-btn:not(.active) .tab-count {
    background: var(--gray-200);
}

.notification-section {
    border-bottom: 1px solid var(--gray-100);
}

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

.section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    padding: 0.75rem 1.25rem 0.5rem;
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.notification-item {
    display: flex;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.notification-item:hover {
    background: var(--gray-50);
}

.notification-item.unread {
    background: var(--primary-lighter);
    border-left-color: var(--primary);
}

.notification-item.attention {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.notification-icon.appointment {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.notification-icon.payment {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.notification-icon.message {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.notification-icon.alert {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.notification-icon.reminder {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.notification-icon.task {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

.notification-icon.system {
    background: var(--gray-100);
    color: var(--gray-500);
}

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

.notification-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-message {
    font-size: 0.8125rem;
    color: var(--gray-600);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.notification-meta .category {
    padding: 0.125rem 0.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.notification-dismiss {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--gray-400);
    opacity: 0;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.notification-item:hover .notification-dismiss {
    opacity: 1;
}

.notification-dismiss:hover {
    background: var(--gray-200);
    color: var(--gray-600);
}

.notification-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--gray-400);
}

.notification-empty i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.notification-empty p {
    font-size: 0.875rem;
}

/* Tablet notification panel - prevent overflow */
@media (max-width: 768px) {
    .notification-panel {
        width: calc(100vw - 20px);
        max-width: 420px;
        right: -60px;
    }
}

/* Mobile notification panel */
@media (max-width: 480px) {
    .notification-panel {
        position: fixed;
        top: 70px;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 70px);
        border-radius: 0;
    }

    .notification-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .notification-tabs::-webkit-scrollbar {
        display: none;
    }

    .notification-tabs .tab-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    background: linear-gradient(180deg, var(--primary-lighter) 0%, var(--white) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(var(--primary-rgb), 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--accent-lighter);
    color: var(--accent-dark);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
}

.hero-badge i {
    font-size: 0.875rem;
}

.hero-title {
    font-size: clamp(2.75rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    color: var(--primary);
    position: relative;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 0.1em;
    left: 0;
    right: 0;
    height: 0.3em;
    background: var(--accent);
    opacity: 0.3;
    z-index: -1;
    border-radius: 2px;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.stat {
    text-align: left;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* Hero Visual */
.hero-image {
    position: relative;
}

.hero-graphic {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    min-height: 500px;
    box-shadow: var(--shadow-2xl);
}

.floating-card {
    position: absolute;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.125rem;
}

.floating-card span {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.9375rem;
}

.card-1 {
    top: 15%;
    left: -10%;
    animation-delay: 0s;
}

.card-1 i {
    background: var(--primary-lighter);
    color: var(--primary);
}

.card-2 {
    top: 40%;
    right: -15%;
    animation-delay: 2s;
}

.card-2 i {
    background: var(--accent-lighter);
    color: var(--accent);
}

.card-3 {
    bottom: 20%;
    left: 5%;
    animation-delay: 4s;
}

.card-3 i {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== Sections ===== */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3rem;
}

.section-label {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: var(--primary-lighter);
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Features Section ===== */
.features {
    padding: 6rem 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    position: relative;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-xl);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-lighter), var(--white));
    border-radius: var(--radius-lg);
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-card:nth-child(even) .feature-icon {
    background: linear-gradient(135deg, var(--accent-lighter), var(--white));
    color: var(--accent);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* ===== Services Section ===== */
.services {
    padding: 6rem 0;
    background: var(--gray-50);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid var(--gray-100);
    transition: all var(--transition-normal);
}

.service-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.service-card:nth-child(even) i {
    color: var(--accent);
}

.service-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.service-card p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* ===== CTA Section ===== */
.cta {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    text-align: center;
}

.cta h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== Contact Section ===== */
.contact {
    padding: 6rem 0;
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    padding-right: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item i {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-lighter);
    color: var(--primary);
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
    color: var(--gray-900);
}

.contact-item p {
    color: var(--gray-600);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-lighter);
}

/* ===== Footer ===== */
.footer {
    padding: 4rem 0 2rem;
    background: var(--gray-900);
    color: var(--gray-400);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.footer-brand .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-2xl);
    animation: modalIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    color: var(--gray-500);
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Modal responsiveness - prevent horizontal scroll */
@media (max-width: 768px) {
    .modal {
        padding: 1rem;
    }
    .modal-content {
        max-width: calc(100vw - 2rem) !important;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
        padding: 1.5rem;
        margin: 0;
    }
    .modal-content h2 {
        font-size: 1.25rem;
        padding-right: 2rem;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 0.5rem;
    }
    .modal-content {
        max-width: calc(100vw - 1rem) !important;
        padding: 1rem;
        border-radius: var(--radius-lg);
    }
    .modal-content .form-group {
        margin-bottom: 0.75rem;
    }
}

.modal h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal > p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* Modal Components - Universal Design Pattern */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h2 i {
    color: var(--primary);
    font-size: 1.25rem;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-md);
    color: var(--gray-500);
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.modal-body {
    padding: 0;
    margin-bottom: 1.5rem;
}

.modal-actions,
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gray-100);
}

.modal-actions button,
.modal-footer button {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-actions .btn-secondary,
.modal-footer .btn-cancel {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-actions .btn-secondary:hover,
.modal-footer .btn-cancel:hover {
    background: var(--gray-200);
}

.modal-actions .btn-primary,
.modal-footer .btn-primary {
    background: var(--primary);
    color: white;
}

.modal-actions .btn-primary:hover,
.modal-footer .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ===== Data Tables - Universal Design Pattern ===== */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.data-table thead {
    background: linear-gradient(135deg, #2F5855 0%, #3a6b66 100%);
}

.data-table thead tr th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.data-table thead tr th:first-child {
    border-top-left-radius: 8px;
}

.data-table thead tr th:last-child {
    border-top-right-radius: 8px;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: #f8fffe;
    box-shadow: inset 0 0 0 1px rgba(47, 88, 85, 0.1);
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody td {
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    color: var(--gray-700);
    vertical-align: middle;
}

.data-table tbody td strong {
    color: var(--gray-900);
    font-weight: 600;
}

/* Action buttons in tables */
.data-table tbody td button {
    margin-right: 0.375rem;
}

.data-table tbody td button:last-child {
    margin-right: 0;
}

.data-table tbody td .btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

/* Empty state */
.data-table tbody tr td[colspan] {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-400);
    font-size: 0.9375rem;
}

/* Timeline tags / badges in tables */
.timeline-tag,
.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

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

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Responsive tables */
@media (max-width: 768px) {
    .data-table {
        font-size: 0.875rem;
    }

    .data-table thead tr th,
    .data-table tbody td {
        padding: 0.75rem 1rem;
    }

    .data-table tbody td button {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* ===== Forms ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-lighter);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.text-link {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
}

.text-link:hover {
    color: var(--primary-dark);
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
}

/* ===== Dashboard ===== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    margin-top: 70px;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.dashboard-header p {
    color: var(--gray-600);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    color: var(--gray-700);
    transition: all var(--transition-normal);
}

.quick-action:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
    transform: translateY(-2px);
}

.quick-action i {
    font-size: 1.5rem;
    color: var(--primary);
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.widget {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.widget.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 1rem;
    color: var(--gray-500);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.5rem;
    background: var(--gray-900);
    color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s ease;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--error); }

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

/* ===== Utilities ===== */
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--error) !important; }
.text-muted { color: var(--gray-500) !important; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        display: none;
    }

    .features-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1rem;
        flex-direction: column;
        border-bottom: 1px solid var(--gray-100);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        width: 100%;
    }

    .features-grid,
    .services-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    /* Dashboard responsive */
    .main-content {
        padding: 1rem;
    }

    .dashboard-header h1 {
        font-size: 1.375rem;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .quick-action {
        padding: 1rem;
        font-size: 0.8125rem;
    }

    .quick-action i {
        font-size: 1.25rem;
    }

    /* Toast responsive */
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .toast {
        width: 100%;
    }

    /* User menu responsive */
    .user-name {
        display: none;
    }

    .nav-container {
        padding: 0.75rem 1rem;
    }

    .nav-brand {
        font-size: 1.25rem;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    body.logged-in {
        padding-top: 60px;
    }

    .nav-container {
        padding: 0.5rem 0.75rem;
    }

    .nav-brand {
        font-size: 1.125rem;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }

    .brand-text {
        display: none;
    }

    .bell-toggle {
        width: 36px;
        height: 36px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .quick-action {
        padding: 0.875rem;
        font-size: 0.75rem;
    }

    .main-content {
        padding: 0.75rem;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 1rem;
    }

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

    .hero-actions .btn {
        width: 100%;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 0.75rem 1.25rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .feature-card,
    .service-card {
        padding: 1.25rem;
    }

    .cta {
        padding: 3rem 0;
    }

    .cta h2 {
        font-size: 1.5rem;
    }

    .cta p {
        font-size: 1rem;
    }
}
