/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Landing page inspired colors - DARK MODE */
    --primary-color: #00d4ff;
    --primary-gradient: linear-gradient(45deg, #00d4ff, #8a2be2);
    --secondary-color: #8a2be2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ff6b6b;
    --danger-color: #ff6b6b;
    
    /* Dark theme backgrounds */
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f1419;
    --bg-dark: #0c0c0c;
    --bg-sidebar: #0f1419;
    --bg-card: rgba(255, 255, 255, 0.05);
    
    /* Text colors - IMPROVED CONTRAST */
    --text-primary: #f0f4f8;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --text-muted: #6b7280;
    
    /* Border and shadows */
    --border-color: rgba(138, 43, 226, 0.3);
    --border-color-light: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(138, 43, 226, 0.2);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
    
    --sidebar-width: 260px;
}

/* Light theme option */
[data-theme="light"] {
    --primary-color: #0ea5e9;
    --primary-gradient: linear-gradient(45deg, #0ea5e9, #7c3aed);
    --secondary-color: #7c3aed;
    
    /* Light backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #e2e8f0;
    --bg-sidebar: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    
    /* Light theme text */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    
    /* Light theme borders */
    --border-color: rgba(124, 58, 237, 0.2);
    --border-color-light: rgba(0, 0, 0, 0.1);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Light mode body background */
body[data-theme="light"] {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
}

/* Override body styles when landing page is active */
body.landing-active {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

/* Landing page container */
#landing-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: width 0.3s ease, transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Collapsed sidebar on desktop */
.admin-sidebar.collapsed {
    width: 80px;
}

/* Adjust main content when sidebar is collapsed */
.admin-main {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
}

.admin-sidebar.collapsed ~ .admin-main {
    margin-left: 80px;
}

/* Hide text in collapsed mode */
.admin-sidebar.collapsed .sidebar-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
}

/* Center icons in collapsed mode */
.admin-sidebar.collapsed .nav-item,
.admin-sidebar.collapsed .sidebar-collapse-btn {
    justify-content: center;
}

/* Rotate collapse icon when collapsed */
.admin-sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

/* Collapsed sidebar footer elements */
.admin-sidebar.collapsed .sidebar-api-status,
.admin-sidebar.collapsed .sidebar-user-info,
.admin-sidebar.collapsed .sidebar-theme-toggle {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.admin-sidebar.collapsed .sidebar-footer {
    align-items: center;
}

.admin-sidebar.collapsed .sidebar-api-status,
.admin-sidebar.collapsed .sidebar-user-info,
.admin-sidebar.collapsed .sidebar-theme-toggle,
.admin-sidebar.collapsed .sidebar-collapse-btn {
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.admin-sidebar.collapsed .sidebar-user-info .btn-icon {
    margin: 0;
}

.admin-sidebar.collapsed .sidebar-api-status .status-indicator {
    margin: 0;
}

.admin-sidebar.collapsed .sidebar-user-info {
    flex-direction: column;
}

.admin-sidebar.collapsed .sidebar-user-details {
    display: none;
}

/* Mobile overlay backdrop */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
}

/* Light mode sidebar */
[data-theme="light"] .admin-sidebar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
    height: 73px; /* Match exact height of admin-header */
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* Light mode sidebar header */
[data-theme="light"] .sidebar-header {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    overflow: visible; /* Prevent icon cropping */
}

.sidebar-header h2 i {
    font-size: 1.25rem;
    transition: font-size 0.3s ease;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Center just the icon when collapsed */
.admin-sidebar.collapsed .sidebar-header {
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
}

.admin-sidebar.collapsed .sidebar-header h2 {
    justify-content: center;
}

.admin-sidebar.collapsed .sidebar-header h2 i {
    margin: 0;
    font-size: 1.5rem;
}

/* Sidebar text transitions */
.sidebar-text {
    transition: opacity 0.3s ease, width 0.3s ease;
    white-space: nowrap;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Sidebar API Status */
.sidebar-api-status {
    display: flex;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.85rem;
    align-items: center;
    gap: 0.5rem;
}

/* Sidebar User Info */
.sidebar-user-info {
    display: flex;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

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

.sidebar-user-info .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info .user-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info .btn-icon {
    flex-shrink: 0;
}

/* Sidebar Theme Toggle */
.sidebar-theme-toggle {
    display: flex;
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-theme-toggle:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.sidebar-theme-toggle i {
    font-size: 1.1rem;
}

/* Sidebar Collapse Button */
.sidebar-collapse-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-collapse-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.sidebar-collapse-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.nav-menu {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-item {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.nav-item i {
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
    transition: font-size 0.3s ease;
}

/* Larger icons when collapsed */
.admin-sidebar.collapsed .nav-item i {
    font-size: 1.3rem;
}

/* Tooltip on hover when collapsed */
.admin-sidebar.collapsed .nav-item:hover::after {
    content: attr(data-section);
    position: absolute;
    left: 100%;
    margin-left: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.85rem;
    z-index: 1000;
    pointer-events: none;
    text-transform: capitalize;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Light mode nav items */
[data-theme="light"] .nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-item.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    box-shadow: inset 0 0 20px rgba(0, 212, 255, 0.1);
}

/* Light mode active nav item */
[data-theme="light"] .nav-item.active {
    background: rgba(14, 165, 233, 0.1);
    box-shadow: inset 0 0 20px rgba(14, 165, 233, 0.1);
}

.nav-item i {
    width: 20px;
}

/* Main content */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
}

/* Light mode main background */
[data-theme="light"] .admin-main {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
}

/* Header */
.admin-header {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Light mode header */
[data-theme="light"] .admin-header {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.header-left h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sidebar toggle (hamburger) - Hidden on desktop */
#sidebar-toggle {
    display: none;
}

@media (max-width: 768px) {
    #sidebar-toggle {
        display: flex;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid var(--border-color-light);
        color: var(--text-primary);
    }
    
    #sidebar-toggle:hover {
        background: rgba(0, 212, 255, 0.2);
        color: var(--primary-color);
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Hide header elements that are now in sidebar */
.header-right .theme-toggle,
.header-right .user-info,
.header-right .api-status {
    display: none;
}

/* User info styling - toned down */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    border: 1px solid var(--border-color-light);
}

.user-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.user-email {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Theme toggle button */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color-light);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.theme-toggle i {
    font-size: 1rem;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--secondary-color);
}

.status-indicator.connected {
    background-color: var(--success-color);
}

.status-indicator.error {
    background-color: var(--error-color);
}

/* Content sections */
.content-section {
    display: none;
    padding: 2rem 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

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

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color-light);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.2);
    border-color: var(--primary-color);
}

.stat-card-link {
    cursor: pointer;
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00d4ff, #8a2be2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    flex-shrink: 0;
    min-width: 70px;
    min-height: 70px;
    aspect-ratio: 1 / 1;
}

.stat-content h3 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color-light);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(138, 43, 226, 0.5);
}

.dashboard-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.recent-list, .performance-list {
    space-y: 0.75rem;
}

.recent-item, .performance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.recent-item strong, .performance-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.recent-item small, .performance-item small {
    color: var(--text-secondary);
}

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

/* Section headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

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

.filter-input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

/* Tables */
.table-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color-light);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.data-table th,
.data-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color-light);
}

.data-table th {
    background: rgba(138, 43, 226, 0.1);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

.data-table tbody tr.selected {
    background: rgba(0, 212, 255, 0.15);
    box-shadow: inset 4px 0 0 var(--primary-color);
}

.data-table tbody tr.selected:hover {
    background: rgba(0, 212, 255, 0.2);
}

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

/* Status badges */
.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.active {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.status-badge.inactive {
    background: rgba(107, 114, 128, 0.3);
    color: var(--text-secondary);
    border: 1px solid var(--border-color-light);
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 50px;
    font-weight: 600;
}

.btn-edit {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-edit:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.btn-delete {
    background-color: var(--error-color);
    color: white;
    border: none;
}

/* Forms */
/* Form grid inside modals - ADD PADDING HERE! */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    padding: 3rem;
    margin: 0;
}

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

/* Full-width form groups that appear outside the grid */
form > .form-group.full-width {
    padding: 0 3rem;
    margin-bottom: 1.5rem;
}

/* First full-width group after form-grid needs top spacing */
.form-grid + .form-group.full-width {
    padding-top: 1.5rem;
}

/* Form sections (like Hand-off Policy) */
.form-section {
    padding: 0 3rem 1.5rem 3rem;
    margin: 0;
}

.form-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Nested form-grid inside form-section should NOT have extra padding */
.form-section .form-grid {
    padding: 0;
}

/* Agent Tools list (tool name + toggle) */
.agent-tools-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.agent-tool-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
}

.agent-tool-row .agent-tool-name {
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

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

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color-light);
    border-radius: 10px;
    font-size: 1rem; /* Prevent iOS zoom on focus - minimum 16px */
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    cursor: not-allowed;
    opacity: 0.85;
}

[data-theme="light"] .form-group input:disabled,
[data-theme="light"] .form-group select:disabled,
[data-theme="light"] .form-group textarea:disabled {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-secondary);
    opacity: 0.75;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* CodeMirror editor styling */
.CodeMirror {
    width: 100%;
    border: 1px solid var(--border-color-light);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
}

.CodeMirror-focused {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.CodeMirror-gutters {
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--border-color-light);
}

[data-theme="dark"] .CodeMirror {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
}

[data-theme="dark"] .CodeMirror-gutters {
    background: rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .CodeMirror-line,
[data-theme="dark"] .CodeMirror-line span,
[data-theme="dark"] .CodeMirror-line pre {
    color: var(--text-secondary) !important;
}

.CodeMirror-linenumber {
    color: var(--text-light);
}

.CodeMirror-cursor {
    border-left: 1px solid var(--text-primary);
}

/* CodeMirror selection - dark mode: ensure selected text is readable */
[data-theme="dark"] .CodeMirror-selected {
    background: rgba(0, 212, 255, 0.25) !important;
}

[data-theme="dark"] .CodeMirror-focused .CodeMirror-selected {
    background: rgba(0, 212, 255, 0.3) !important;
}

[data-theme="light"] .CodeMirror {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .CodeMirror-gutters {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .code-editor-readonly {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .code-editor-readonly .CodeMirror-gutters {
    background: rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .code-editor-readonly .CodeMirror-line {
    color: var(--text-secondary);
}

.form-group small {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 0.375rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    cursor: pointer;
}

.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: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color-light);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(45deg, #00d4ff, #8a2be2);
    border-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background-color: white;
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

[data-theme="light"] .toggle-slider {
    background-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .toggle-slider:before {
    background-color: var(--text-primary);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 2rem 3rem 3rem 3rem;
    margin: 0;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 20px 20px;
}

/* Light mode form actions */
[data-theme="light"] .form-actions {
    background: rgba(0, 0, 0, 0.02);
}

.agent-hand-off-add-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0;
    margin-top: 0.75rem;
    background: transparent;
    border: 0;
}

.hand-off-add-btn {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--border-color);
}

[data-theme="light"] .hand-off-add-btn {
    background: rgba(0, 0, 0, 0.02);
}

/* Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.analytics-card {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.analytics-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.analytics-card canvas {
    width: 100% !important;
    height: 300px !important;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.settings-card {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.settings-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.setting-item label {
    font-weight: 500;
    min-width: 120px;
}

.setting-item input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
}

/* Modals */
/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(138, 43, 226, 0.2);
}

/* Light mode modal */
[data-theme="light"] .modal-content {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(124, 58, 237, 0.2);
}

.modal-content.large-modal {
    max-width: 900px;
}

.modal-content.small-modal {
    max-width: 450px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
    border-radius: 20px 20px 0 0;
}

/* Light mode modal header */
[data-theme="light"] .modal-header {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(14, 165, 233, 0.04) 100%);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    color: var(--error-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 3rem;
}

/* Add spacing between form and modal edges */
.modal-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    padding: 0;
    margin: 0;
}

.modal-form.single-column {
    grid-template-columns: 1fr;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 2rem 2.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 20px 20px;
}

/* Light mode modal actions */
[data-theme="light"] .modal-actions {
    background: rgba(0, 0, 0, 0.02);
}

/* Button styles */
.btn-primary, .btn-secondary, .btn-danger, .btn-icon {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(45deg, #00d4ff, #8a2be2);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color-light);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.btn-danger {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.4);
}

.btn-icon {
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
}

.btn-icon:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive design */
/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablet and below (768px) */
@media (max-width: 768px) {
    /* Enable momentum scrolling on mobile */
    .admin-main,
    .table-container,
    .conversation-messages {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Sidebar - Hidden by default, slides in from left */
    .admin-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        width: var(--sidebar-width) !important; /* Always full width on mobile */
    }
    
    /* Force expanded mode on mobile */
    .admin-sidebar.collapsed {
        width: var(--sidebar-width) !important;
    }
    
    .admin-sidebar.collapsed .sidebar-text {
        opacity: 1;
        width: auto;
    }
    
    /* Hide collapse button on mobile */
    .sidebar-footer {
        display: flex; /* Show on mobile */
    }

    /* Show sidebar footer elements on mobile */
    .sidebar-api-status,
    .sidebar-user-info,
    .sidebar-theme-toggle {
        display: flex;
    }

    /* Hide collapse button on mobile */
    .sidebar-collapse-btn {
        display: none;
    }

    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    }

    /* Main content takes full width */
    .admin-main {
        margin-left: 0;
    }

    /* Header adjustments */
    .admin-header {
        padding: 1rem 1.5rem;
    }

    .header-left h1 {
        font-size: 1.25rem;
    }

    .header-right {
        gap: 0.75rem;
    }

    .theme-toggle {
        padding: 0.5rem;
        width: 40px;
        height: 40px;
        justify-content: center;
    }

    /* User info - Stack vertically */
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.5rem 0.75rem;
    }

    .user-name, .user-email {
        font-size: 0.8rem;
    }

    /* Content sections - Reduce padding */
    .content-section {
        padding: 1.5rem 1rem;
    }

    /* Stats grid - Single column */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Dashboard grid - Single column */
    .dashboard-grid,
    .analytics-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    /* Section headers - Stack */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    /* Filters - Wrap */
    .filters {
        flex-wrap: wrap;
        width: 100%;
    }

    .filters select,
    .filters input {
        min-width: 120px;
        flex: 1;
    }

    /* Form grid - Single column */
    .form-grid {
        grid-template-columns: 1fr !important;
        padding: 2rem 1.5rem;
        gap: 1rem;
    }

    /* Full-width form groups - Reduce padding */
    form > .form-group.full-width {
        padding: 0 1.5rem;
    }

    /* Form sections - Reduce padding */
    .form-section {
        padding: 0 1.5rem 1rem 1.5rem;
    }

    /* Form actions - Reduce padding */
    .form-actions {
        padding: 1.5rem;
        flex-direction: column-reverse;
    }

    .form-actions button {
        width: 100%;
    }

    /* Modal adjustments */
    .modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }

    .modal-content.large-modal {
        max-width: 95%;
    }

    .modal-header {
        padding: 1.5rem;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-actions {
        padding: 1.5rem;
    }

    /* Tables - Horizontal scroll */
    .table-container {
        overflow-x: auto;
        border-radius: 15px;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    .data-table {
        min-width: 600px;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Action buttons in tables - Make more touch-friendly */
    .data-table .btn-icon {
        min-width: 40px;
        min-height: 40px;
        padding: 0.6rem;
    }
    
    /* Status badges - Better sizing */
    .status-badge {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }

    /* Buttons - Make more touch-friendly */
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }

    /* Cards - Adjust spacing */
    .stat-card,
    .dashboard-card {
        padding: 1.5rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        min-width: 50px;
        min-height: 50px;
        aspect-ratio: 1 / 1;
    }

    .stat-content h3 {
        font-size: 1.75rem;
    }

    /* Conversation messages - Better for mobile */
    .conversation-messages {
        max-height: 60vh;
        padding: 0.75rem;
    }
    
    .message-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .message-role {
        font-size: 0.75rem;
    }
    
    /* Benefits grid (landing page) - Single column */
    #landing-page .benefits-grid {
        grid-template-columns: 1fr;
    }

    #landing-page .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #landing-page .hero {
        flex-direction: column;
        text-align: center;
        padding: 100px 20px 40px;
    }

    #landing-page .hero-buttons {
        justify-content: center;
    }
}

/* Conversation details */
.conversation-modal-body {
    padding: 2rem 2.5rem 2.5rem;
}

.conversation-messages {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 1rem;
}

.message-item {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background-color: var(--bg-tertiary);
}

.message-item.user {
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--text-primary);
}

.message-item.assistant {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color-light);
    color: var(--text-primary);
}

.message-role {
    font-weight: 700;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
}

.message-item.user .message-role {
    color: var(--primary-color);
}

.message-content {
    line-height: 1.6;
    color: var(--text-primary);
}

#conversation-details a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

[data-theme="dark"] #conversation-details a {
    color: var(--text-primary);
}

#conversation-details a:hover {
    opacity: 0.85;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(20, 24, 40, 0.95);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    font-size: 0.9rem;
    font-weight: 500;
    transform: translateY(-6px);
    opacity: 0;
    animation: toast-in 200ms ease-out forwards;
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.35);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.35);
}

.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
    font-size: 0.9rem;
}

.toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error-color);
}

[data-theme="light"] .toast {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(124, 58, 237, 0.15);
    color: var(--text-primary);
}

[data-theme="light"] .toast.success {
    border-color: rgba(34, 197, 94, 0.25);
}

[data-theme="light"] .toast.error {
    border-color: rgba(239, 68, 68, 0.25);
}

[data-theme="light"] .toast-icon {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-color);
}

[data-theme="light"] .toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error-color);
}

@keyframes toast-in {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toast-out {
    to {
        transform: translateY(-6px);
        opacity: 0;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

/* Dark theme adjustments */
[data-theme="dark"] .stat-icon {
    background-color: var(--primary-color);
}

[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .analytics-card,
[data-theme="dark"] .settings-card {
    background-color: var(--bg-primary);
}

/* Test Agent Modal Styles */
.test-agent-info {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-tertiary);
    border-radius: 0.5rem;
}

.test-chat-area {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.test-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem 0.5rem 0 0;
    background-color: var(--bg-primary);
    margin-bottom: 1rem;
}

.test-chat-input {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.test-chat-input input {
    flex: 1;
}


/* Global Loading Overlay */
.global-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top, rgba(45, 24, 90, 0.95) 0%, rgba(8, 10, 28, 0.98) 55%, rgba(3, 5, 16, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
    overflow: hidden;
}

.global-loading-overlay::before,
.global-loading-overlay::after {
    content: '';
    position: absolute;
    inset: -10%;
    pointer-events: none;
    z-index: 0;
}

.global-loading-overlay::before {
    background:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.9), transparent 60%),
        radial-gradient(1.5px 1.5px at 70% 20%, rgba(255, 255, 255, 0.7), transparent 60%),
        radial-gradient(1px 1px at 80% 70%, rgba(255, 255, 255, 0.6), transparent 60%),
        radial-gradient(1.5px 1.5px at 35% 80%, rgba(255, 255, 255, 0.8), transparent 60%),
        radial-gradient(1px 1px at 55% 55%, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(1px 1px at 15% 65%, rgba(255, 255, 255, 0.6), transparent 60%),
        radial-gradient(1.5px 1.5px at 90% 45%, rgba(255, 255, 255, 0.7), transparent 60%),
        radial-gradient(1px 1px at 45% 15%, rgba(255, 255, 255, 0.5), transparent 60%);
    opacity: 0.8;
    animation: twinkle 4s ease-in-out infinite;
}

.global-loading-overlay::after {
    background:
        radial-gradient(circle at 20% 20%, rgba(138, 43, 226, 0.25), transparent 45%),
        radial-gradient(circle at 80% 30%, rgba(0, 212, 255, 0.2), transparent 50%),
        radial-gradient(circle at 40% 75%, rgba(147, 51, 234, 0.2), transparent 55%);
    opacity: 0.9;
    animation: drift 12s ease-in-out infinite;
}
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.loading-content h3 {
    margin: 1rem 0 0.5rem 0;
    font-size: 1.25rem;
}

.loading-content p {
    margin: 0;
    opacity: 0.8;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes drift {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); }
    50% { transform: translateY(-10px) translateX(15px) scale(1.03); }
}

.global-loading-overlay.hidden {
    display: none;
}

/* Print styles */
@media print {
    .admin-sidebar,
    .admin-header,
    .btn,
    .modal,
    .global-loading-overlay {
        display: none !important;
    }

    .content-section {
        display: block !important;
    }
}


/* User management styles */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-tertiary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    padding: 0.125rem 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.user-role[data-role="SUPER_ADMIN"] {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.user-role[data-role="ADMIN"] {
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
}

.user-role[data-role="COMPANY_USER"] {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.user-role[data-role="limited"] {
    background-color: var(--warning-color);
}

/* Login modal styles */
.login-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-tertiary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.login-info h4 {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.login-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-info li {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.login-info strong {
    color: var(--text-primary);
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 0.375rem;
}

/* User permission styles */
#agent-permissions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.agent-permission-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.agent-permission-item:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.agent-permission-item input[type="checkbox"] {
    margin: 0;
}

/* ============================================
   LANDING PAGE STYLES
   ============================================ */

/* Landing page uses Inter font from the HTML */
#landing-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Landing page base override */
#landing-page body,
#landing-page {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Landing Header */
#landing-page .header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
    z-index: 1000;
}

#landing-page .nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
}

#landing-page .nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #00d4ff;
}

#landing-page .nav-brand i {
    color: #ffffff;
}

#landing-page .nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

#landing-page .nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

#landing-page .nav-links a:hover {
    color: #00d4ff;
}

/* Mobile menu toggle - Hidden by default */
#landing-page .mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    #landing-page .mobile-menu-toggle {
        display: block;
    }
    
    #landing-page .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        width: 250px;
        padding: 2rem;
        gap: 1.5rem;
        border-left: 1px solid rgba(138, 43, 226, 0.3);
        transition: right 0.3s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
        align-items: flex-start;
    }
    
    #landing-page .nav-links.open {
        right: 0;
    }
    
    #landing-page .nav-links a {
        font-size: 1.1rem;
    }
}

/* Landing Hero Section */
#landing-page .hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 120px 20px 60px;
    position: relative;
    overflow: hidden;
}

#landing-page .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

#landing-page .hero-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

#landing-page .hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

#landing-page .highlight {
    background: linear-gradient(45deg, #00d4ff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#landing-page .hero-subtitle {
    font-size: 1.25rem;
    color: #b8c5d1;
    margin-bottom: 2rem;
    max-width: 600px;
    line-height: 1.6;
}

#landing-page .hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

#landing-page .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

#landing-page .btn-small {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

#landing-page .btn-primary {
    background: linear-gradient(45deg, #00d4ff, #8a2be2);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

#landing-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

#landing-page .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

#landing-page .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Hero Stars */
#landing-page .hero-stars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

#landing-page .star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

#landing-page .star-1 { width: 3px; height: 3px; top: 20%; left: 10%; animation-delay: 0s; }
#landing-page .star-2 { width: 2px; height: 2px; top: 40%; left: 70%; animation-delay: 1s; }
#landing-page .star-3 { width: 4px; height: 4px; top: 60%; left: 30%; animation-delay: 2s; }
#landing-page .star-4 { width: 2px; height: 2px; top: 80%; left: 80%; animation-delay: 0.5s; }
#landing-page .star-5 { width: 3px; height: 3px; top: 30%; left: 50%; animation-delay: 1.5s; }
#landing-page .star-6 { width: 2px; height: 2px; top: 15%; left: 75%; animation-delay: 2.5s; }
#landing-page .star-7 { width: 4px; height: 4px; top: 70%; left: 15%; animation-delay: 0.8s; }
#landing-page .star-8 { width: 3px; height: 3px; top: 50%; left: 85%; animation-delay: 3.2s; }
#landing-page .star-9 { width: 2px; height: 2px; top: 85%; left: 40%; animation-delay: 1.2s; }
#landing-page .star-10 { width: 3px; height: 3px; top: 10%; left: 45%; animation-delay: 0.3s; }
#landing-page .star-11 { width: 2px; height: 2px; top: 65%; left: 90%; animation-delay: 2.8s; }
#landing-page .star-12 { width: 4px; height: 4px; top: 35%; left: 20%; animation-delay: 1.8s; }
#landing-page .star-13 { width: 2px; height: 2px; top: 75%; left: 60%; animation-delay: 0.6s; }
#landing-page .star-14 { width: 3px; height: 3px; top: 5%; left: 25%; animation-delay: 3.5s; }
#landing-page .star-15 { width: 2px; height: 2px; top: 90%; left: 70%; animation-delay: 2.2s; }

/* Contact Section Stars */
#landing-page .contact-stars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

#landing-page .star-contact-1 { width: 3px; height: 3px; top: 10%; left: 20%; animation-delay: 0s; }
#landing-page .star-contact-2 { width: 2px; height: 2px; top: 30%; left: 80%; animation-delay: 1.5s; }
#landing-page .star-contact-3 { width: 4px; height: 4px; top: 50%; left: 15%; animation-delay: 3s; }
#landing-page .star-contact-4 { width: 2px; height: 2px; top: 70%; left: 85%; animation-delay: 0.8s; }
#landing-page .star-contact-5 { width: 3px; height: 3px; top: 20%; left: 60%; animation-delay: 2.3s; }
#landing-page .star-contact-6 { width: 2px; height: 2px; top: 80%; left: 30%; animation-delay: 1.2s; }
#landing-page .star-contact-7 { width: 4px; height: 4px; top: 40%; left: 90%; animation-delay: 0.5s; }
#landing-page .star-contact-8 { width: 2px; height: 2px; top: 15%; left: 45%; animation-delay: 2.8s; }
#landing-page .star-contact-9 { width: 3px; height: 3px; top: 65%; left: 10%; animation-delay: 1.8s; }
#landing-page .star-contact-10 { width: 2px; height: 2px; top: 85%; left: 70%; animation-delay: 0.3s; }

/* Hero Image/Cosmic Background */
#landing-page .hero-image {
    flex: 1;
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#landing-page .cosmic-bg {
    width: 120%;
    height: 120%;
    position: absolute;
    top: -10%;
    left: -10%;
    background: radial-gradient(circle at center, rgba(138, 43, 226, 0.03) 0%, rgba(0, 212, 255, 0.03) 25%, transparent 70%);
}

#landing-page .planet {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #8a2be2, #00d4ff);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 50px rgba(138, 43, 226, 0.5);
    animation: orbit 20s linear infinite;
    z-index: 2;
}

#landing-page .satellite {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #00d4ff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
    animation: orbit-reverse 4s linear infinite;
    z-index: 2;
}

#landing-page .orbits {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

#landing-page .orbit {
    position: absolute;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 50%;
}

#landing-page .orbit-1 {
    width: 200px;
    height: 200px;
    animation: rotate 20s linear infinite;
}

#landing-page .orbit-2 {
    width: 300px;
    height: 300px;
    animation: rotate-reverse 25s linear infinite;
}

#landing-page .orbit-3 {
    width: 400px;
    height: 400px;
    animation: rotate 30s linear infinite;
}

/* Landing Section Styles */
#landing-page section {
    padding: 100px 0;
}

#landing-page .section-header {
    text-align: center;
    margin-bottom: 4rem;
}

#landing-page .section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #00d4ff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#landing-page .section-header p {
    font-size: 1.2rem;
    color: #b8c5d1;
    max-width: 600px;
    margin: 0 auto;
}

/* Benefits Section */
#landing-page .benefits {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.5) 0%, rgba(22, 33, 62, 0.5) 100%);
    position: relative;
}

#landing-page .benefits::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(138, 43, 226, 0.05) 0%, transparent 50%);
}

#landing-page .benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

#landing-page .benefit-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    text-align: center;
}

#landing-page .benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(138, 43, 226, 0.2);
    border-color: rgba(138, 43, 226, 0.3);
}

#landing-page .benefit-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #00d4ff, #8a2be2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

#landing-page .benefit-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

#landing-page .benefit-card p {
    color: #b8c5d1;
    line-height: 1.6;
}

/* Contact Section */
#landing-page .contact {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    position: relative;
}

#landing-page .contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    position: relative;
    z-index: 2;
}

#landing-page .contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #00d4ff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#landing-page .contact-info p {
    font-size: 1.2rem;
    color: #b8c5d1;
    margin-bottom: 2rem;
    line-height: 1.6;
}

#landing-page .contact-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#landing-page .feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
}

#landing-page .feature i {
    color: #00d4ff;
    font-size: 1.2rem;
}

#landing-page .contact-form-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
}

#landing-page .form-group {
    margin-bottom: 1.5rem;
}

#landing-page .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-weight: 500;
}

#landing-page .form-group input,
#landing-page .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#landing-page .form-group input:focus,
#landing-page .form-group textarea:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

#landing-page .form-group input::placeholder,
#landing-page .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#landing-page .btn-full {
    width: 100%;
    justify-content: center;
}

/* Footer */
#landing-page .footer {
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(138, 43, 226, 0.3);
    padding: 2rem 0;
}

#landing-page .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

#landing-page .footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #00d4ff;
}

#landing-page .footer-brand i {
    color: #ffffff;
}

#landing-page .footer p {
    color: #b8c5d1;
    margin: 0;
}

.footer-link {
    color: #00d4ff;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-left: 0.5rem;
}

.footer-link:hover {
    color: #8a2be2;
    text-decoration: underline;
}

/* Privacy Policy Page Styles */
#privacy-policy-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 50%, #16213e 100%);
    color: var(--text-primary);
}

#privacy-policy-page .privacy-header {
    position: relative;
}

#privacy-policy-page .nav {
    justify-content: space-between;
}

#privacy-policy-page .cta-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.75rem 1.5rem;
}

.privacy-content {
    padding: 4rem 0 2rem;
    min-height: calc(100vh - 200px);
}

.privacy-text {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.privacy-text h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.privacy-text .last-updated {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.privacy-text h2 {
    font-size: 1.75rem;
    color: #00d4ff;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.privacy-text p {
    line-height: 1.8;
    margin-bottom: 1.25rem;
    color: var(--text-light);
}

.privacy-text ul {
    margin: 1rem 0 1.5rem 1.5rem;
    line-height: 1.8;
}

.privacy-text li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.privacy-text a {
    color: #00d4ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-text a:hover {
    color: #8a2be2;
    text-decoration: underline;
}

.privacy-text strong {
    color: var(--text-primary);
}

#privacy-policy-page .footer {
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(138, 43, 226, 0.3);
    padding: 2rem 0;
}

#privacy-policy-page .footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

#privacy-policy-page .footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #00d4ff;
}

#privacy-policy-page .footer-brand i {
    color: #ffffff;
}

#privacy-policy-page .footer p {
    color: #b8c5d1;
    margin: 0;
}

/* Responsive Privacy Policy */
@media (max-width: 768px) {
    .privacy-content {
        padding: 2rem 0;
    }

    .privacy-text {
        padding: 2rem 1.5rem;
        border-radius: 15px;
    }

    .privacy-text h1 {
        font-size: 1.875rem;
    }

    .privacy-text h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .privacy-text {
        padding: 1.5rem 1rem;
    }

    .privacy-text h1 {
        font-size: 1.5rem;
    }

    .privacy-text h2 {
        font-size: 1.25rem;
    }

    .privacy-text ul {
        margin-left: 1rem;
    }
}

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

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes orbit {
    from { transform: translate(-50%, -50%) rotate(0deg) translateX(100px); }
    to { transform: translate(-50%, -50%) rotate(360deg) translateX(100px); }
}

@keyframes orbit-reverse {
    from { transform: translate(-50%, -50%) rotate(0deg) translateX(150px); }
    to { transform: translate(-50%, -50%) rotate(-360deg) translateX(150px); }
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotate-reverse {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(-360deg); }
}

/* Landing Responsive Design */
@media (max-width: 768px) {
    #landing-page .nav-links {
        gap: 1rem;
    }

    #landing-page .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
    }

    #landing-page .hero-buttons {
        justify-content: center;
    }

    #landing-page .hero-image {
        height: 300px;
    }

    #landing-page .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #landing-page .benefits-grid {
        grid-template-columns: 1fr;
    }

    #landing-page .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
    /* Landing page */
    #landing-page .hero-title {
        font-size: 2rem;
    }

    #landing-page .section-header h2 {
        font-size: 2rem;
    }

    #landing-page .benefit-card,
    #landing-page .contact-form-wrapper {
        padding: 1.5rem;
    }
    
    /* Admin dashboard */
    .admin-header {
        padding: 1rem;
    }
    
    .header-left h1 {
        font-size: 1.1rem;
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    .btn-icon {
        width: 36px;
        height: 36px;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .user-info-pill {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .user-info-pill .user-details {
        gap: 0.15rem;
    }
    
    .user-name, .user-role {
        font-size: 0.7rem;
    }
    
    .content-section {
        padding: 1rem 0.75rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    .stat-card,
    .dashboard-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        min-width: 40px;
        min-height: 40px;
        aspect-ratio: 1 / 1;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .stat-content p {
        font-size: 0.75rem;
    }
    
    .modal-content {
        width: 98%;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .form-grid {
        padding: 1.5rem 1rem;
        gap: 0.75rem;
    }
    
    form > .form-group.full-width {
        padding: 0 1rem;
    }
    
    .form-section {
        padding: 0 1rem 0.75rem 1rem;
    }
    
    .form-actions {
        padding: 1rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}
