/* Сучасний дизайн хостинг платформи */
:root {
    /* Кольорова палітра */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;
    
    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-200: #e2e8f0;
    --secondary-300: #cbd5e1;
    --secondary-400: #94a3b8;
    --secondary-500: #64748b;
    --secondary-600: #475569;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    --secondary-900: #0f172a;
    
    --success-50: #f0fdf4;
    --success-100: #dcfce7;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --success-700: #15803d;
    
    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    
    --error-50: #fef2f2;
    --error-100: #fee2e2;
    --error-500: #ef4444;
    --error-600: #dc2626;
    --error-700: #b91c1c;
    
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-border: #334155;
    
    /* Тіні */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --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);
    
    /* Радіуси */
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Анімації */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
    /* Фіксована світла тема */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --border: #e2e8f0;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: background-color var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Сучасний контейнер */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 72px 1fr;
    grid-template-areas:
        "sidebar header"
        "sidebar main";
    min-height: 100vh;
    background-color: var(--bg-secondary);
}

.app-container.sidebar-collapsed {
    grid-template-columns: 80px 1fr;
}

.app-container.mobile {
    grid-template-columns: 1fr;
    grid-template-areas:
        "header"
        "main";
}

/* Сучасний хедер */
.header {
    grid-area: header;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 100;
    transition: all var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition);
}

.logo:hover {
    color: var(--primary-700);
}

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

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.support-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
}

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

.support-tg-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
}

.support-tg-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

 .support-tg-link svg {
     width: 18px;
     height: 18px;
     display: block;
 }

.header-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 0.75rem;
    flex-wrap: wrap;
}

.header-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    background: transparent;
    transition: all var(--transition);
}

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

.header-link.active {
    background: var(--primary-50);
    color: var(--primary-700);
}

.notifications {
    position: relative;
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

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

.notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background-color: var(--error-500);
    color: #fff;
    border-radius: 9999px;
    border: 2px solid var(--bg-primary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.05rem 0.35rem;
    min-width: 18px;
    text-align: center;
}

.notifications-wrapper {
    position: relative;
}

.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.user-menu-trigger:hover {
    background: var(--bg-tertiary);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 180px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all var(--transition);
    z-index: 1000;
    overflow: hidden;
}

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

.user-dropdown a {
    display: block;
    padding: 0.7rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.user-dropdown a:hover {
    background: var(--bg-tertiary);
}

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

.support-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1200;
}

.support-modal.open {
    display: flex;
}

.support-modal-content {
    width: min(520px, 92vw);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}

.support-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.support-modal-body {
    padding: 1.25rem;
}

.support-modal-body textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
}

.support-chat {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    padding: 0.75rem;
    max-height: 260px;
    overflow-y: auto;
    margin-bottom: 0.75rem;
}

.support-msg {
    max-width: 92%;
    padding: 0.6rem 0.75rem;
    border-radius: 0.75rem;
    margin-bottom: 0.6rem;
    border: 1px solid var(--border);
    background: var(--bg-primary);
}

.support-msg-user {
    margin-left: auto;
    border-color: rgba(59, 130, 246, 0.25);
    background: rgba(59, 130, 246, 0.08);
}

.support-msg-admin {
    margin-right: auto;
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.08);
}

.support-msg-meta {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.support-msg-body {
    white-space: pre-wrap;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.support-close {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-tertiary);
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 320px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all var(--transition);
    z-index: 1000;
    overflow: hidden;
}

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

.notification-header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.notification-list {
    max-height: 280px;
    overflow-y: auto;
}

.notification-item {
    display: block;
    padding: 0.75rem 1rem;
    padding-right: 2.25rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    transition: background var(--transition);
    position: relative;
}

.notification-item:hover {
    background: var(--bg-tertiary);
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.notification-dismiss {
    position: absolute;
    top: 0.35rem;
    right: 0.5rem;
    width: 1.35rem;
    height: 1.35rem;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 999px;
    padding: 0;
}

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

.notification-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.selection-box {
    position: fixed;
    border: 1px dashed var(--primary-500);
    background: rgba(14, 165, 233, 0.12);
    z-index: 9999;
    pointer-events: none;
}

.chat-box {
    max-height: 260px;
    overflow-y: auto;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    margin-bottom: 1rem;
}

.chat-message {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.chat-message-system {
    border-left: 3px solid var(--primary-500);
}

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

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
}

.user-menu:hover {
    background-color: var(--bg-tertiary);
}

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

.user-avatar.has-image {
    background-size: cover;
    background-position: center;
    color: transparent;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1;
}

.mobile-menu-toggle {
    display: none;
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
}

@media (max-width: 768px) {
    .header-links {
        gap: 0.35rem;
        margin-right: 0.5rem;
    }

    .header-link {
        padding: 0.35rem 0.55rem;
        font-size: 0.78rem;
    }
    
    .user-info {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

/* Сучасна бічна панель */
.sidebar {
    grid-area: sidebar;
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}

.nav-link:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

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

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-600);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.nav-badge {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    background-color: var(--primary-100);
    color: var(--primary-700);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

/* Сучасний основний контент */
.main-content {
    grid-area: main;
    background-color: var(--bg-secondary);
    overflow-y: auto;
}

.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.page-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
}

/* Сучасні кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgb(14 165 233 / 0.1);
}

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

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

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-700);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-300);
}

.btn-success {
    background-color: var(--success-600);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: var(--success-700);
}

.btn-danger {
    background-color: var(--error-600);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: var(--error-700);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-600);
    border: 1px solid var(--primary-600);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--primary-600);
    color: white;
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

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

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

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius);
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

/* Сучасні форми */
.form {
    max-width: 600px;
}

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

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

.form-label.required::after {
    content: ' *';
    color: var(--error-600);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgb(14 165 233 / 0.1);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

.form-control.error {
    border-color: var(--error-500);
    box-shadow: 0 0 0 3px rgb(239 68 68 / 0.1);
}

.form-error {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--error-600);
}

.form-hint {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

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

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-suffix {
    padding: 0.75rem 1rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Auth pages */
.auth-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 10%, #e0f2fe 0%, transparent 45%),
        radial-gradient(circle at 90% 90%, #dbeafe 0%, transparent 40%),
        #f8fafc;
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: -20%;
    pointer-events: none;
    background:
        radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.22) 0%, transparent 55%),
        radial-gradient(circle at 70% 70%, rgba(99, 102, 241, 0.18) 0%, transparent 58%);
    animation: authBgFloat 18s ease-in-out infinite;
    transform: translate3d(0, 0, 0);
}

@keyframes authBgFloat {
    0% { transform: translate3d(-2%, -2%, 0) scale(1); }
    50% { transform: translate3d(2%, 1%, 0) scale(1.02); }
    100% { transform: translate3d(-1%, 2%, 0) scale(1); }
}

.auth-layout {
    width: min(980px, 100%);
    min-height: 600px;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 420px);
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.auth-brand {
    background: linear-gradient(145deg, #0284c7 0%, #0369a1 55%, #075985 100%);
    color: #e0f2fe;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #f0f9ff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
}

.auth-logo-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
}

.auth-brand h1 {
    font-size: clamp(1.5rem, 2vw, 2rem);
    line-height: 1.3;
}

.auth-brand p {
    color: #bae6fd;
    max-width: 34ch;
}

.auth-panel {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card {
    background-color: var(--bg-primary);
}

.auth-title {
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.auth-form {
    margin-top: 0.5rem;
}

.auth-card .alert ul {
    margin: 0;
    padding-left: 1rem;
}

.auth-footer {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.auth-footer a,
.back-link a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover,
.back-link a:hover {
    text-decoration: underline;
}

/* Сучасні карточки */
.card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background-color: var(--bg-secondary);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Статистичні карточки */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

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

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-change.positive {
    color: var(--success-600);
}

.stat-change.negative {
    color: var(--error-600);
}

/* Сучасні сповіщення */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideInDown 0.3s ease;
}

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

.alert-success {
    background-color: var(--success-50);
    border-color: var(--success-200);
    color: var(--success-800);
}

.alert-warning {
    background-color: var(--warning-50);
    border-color: var(--warning-200);
    color: var(--warning-800);
}

.alert-error {
    background-color: var(--error-50);
    border-color: var(--error-200);
    color: var(--error-800);
}

.alert-info {
    background-color: var(--primary-50);
    border-color: var(--primary-200);
    color: var(--primary-800);
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-message {
    font-size: 0.875rem;
    line-height: 1.5;
}

.alert-close {
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.alert-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Таблиці */
.table-container {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.table th {
    background-color: var(--bg-tertiary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background-color: var(--bg-secondary);
}

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

/* Пустий стан */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Прогрес бари */
.progress {
    width: 100%;
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.progress-sm {
    height: 4px;
}

.progress-lg {
    height: 12px;
}

/* Бейджі */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    border: none;
    outline: none;
}

.badge-primary {
    background-color: var(--primary-100);
    color: var(--primary-700);
}

.badge-success {
    background-color: var(--success-100);
    color: var(--success-700);
}

.badge-warning {
    background-color: var(--warning-100);
    color: var(--warning-700);
}

.badge-error {
    background-color: var(--error-100);
    color: var(--error-700);
}

.badge-secondary {
    background-color: var(--secondary-100);
    color: var(--secondary-700);
}

/* Стилі для головної сторінки */
.hero-section {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
    border-radius: var(--radius-xl);
    margin-bottom: 4rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--warning-500), var(--warning-600));
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-600);
    margin-bottom: 0.5rem;
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Секції */
.features-section {
    margin-bottom: 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
    transform: scaleX(0);
    transition: transform var(--transition);
}

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

.feature-card:hover::before {
    transform: scaleX(1);
}

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

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.feature-list li::before {
    content: '✓';
    color: var(--success-600);
    font-weight: 600;
}

/* CTA секція */
.cta-section {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    border-radius: var(--radius-xl);
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

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

.cta-actions .btn {
    backdrop-filter: blur(10px);
}

.cta-actions .btn-outline {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.cta-actions .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.cta-features {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Сітки сайтів */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.site-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition);
}

.site-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.site-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.site-info {
    margin-bottom: 1rem;
}

.site-info p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.site-actions {
    display: flex;
    gap: 0.5rem;
}

/* Адаптивність */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cta-section {
        padding: 3rem 1.5rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-features {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .cta-section {
        padding: 2rem 1rem;
    }
}

/* Панель керування */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2rem;
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: #1f2937;
}

.stat-info p {
    color: #6b7280;
    font-size: 0.875rem;
}

.actions-section {
    text-align: center;
    margin-bottom: 2rem;
}

.sites-section h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.site-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.site-header h4 {
    margin: 0;
    color: #1f2937;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background-color: #dcfce7;
    color: #16a34a;
}

.status-inactive {
    background-color: #fef2f2;
    color: #dc2626;
}

.site-info p {
    margin-bottom: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.site-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-top: 1rem;
}
.site-actions .btn {
    flex: 1 1 0;
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 480px) {
    .site-actions {
        flex-wrap: wrap;
    }
    .site-actions .btn {
        flex: 1 1 100%;
    }
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Файловий менеджер */
.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.breadcrumb {
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.fm-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.fm-action-group {
    display: flex;
    align-items: center;
}

.fm-form-inline {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.fm-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.fm-table th,
.fm-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.fm-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.fm-table tr:hover {
    background-color: #f9fafb;
}

.fm-folder {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.fm-folder:hover {
    text-decoration: underline;
}

.fm-up {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
}

.fm-up:hover {
    color: #374151;
}

.fm-actions-inline {
    display: flex;
    gap: 0.5rem;
}

.fm-empty {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.fm-footer {
    margin-top: 2rem;
}

/* Адміністрування */
.admin-section {
    margin-bottom: 3rem;
}

.admin-section h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}


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

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.admin-table tr:hover {
    background-color: #f9fafb;
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.role-admin {
    background-color: #fef3c7;
    color: #d97706;
}

.role-user {
    background-color: #dbeafe;
    color: #2563eb;
}

.site-link {
    color: #667eea;
    text-decoration: none;
}

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

.domain-type {
    font-size: 0.875rem;
    color: #6b7280;
}

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

.admin-footer {
    margin-top: 2rem;
}

/* Модальні вікна */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    color: #1f2937;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Допоміжні стилі */
.text-muted {
    color: #6b7280;
    font-size: 0.875rem;
}

.back-link {
    text-align: center;
    margin-top: 2rem;
}

.back-link a {
    color: #667eea;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

small {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    display: block;
}

/* Адаптивність */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
    }
    
    .fm-actions {
        flex-direction: column;
    }
    
    .fm-form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .admin-table {
        min-width: 600px;
    }

    .auth-page {
        padding: 1rem;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-brand,
    .auth-panel {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .auth-card, .form-card {
        padding: 1.5rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

/* Form validation error state */
.form-control.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Toast notification animations */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

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

/* File loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Dark theme overrides (toggled via JS) */
.dark-theme {
    background-color: #1f2937;
    color: #f9fafb;
}

.dark-theme .header {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.dark-theme .sidebar,
.dark-theme .auth-card,
.dark-theme .form-card,
.dark-theme .site-card,
.dark-theme .stat-card,
.dark-theme .feature,
.dark-theme .table-container,
.dark-theme .fm-table-container,
.dark-theme .modal-content {
    background-color: #374151;
    color: #f9fafb;
}

.dark-theme .form-control {
    background-color: #4b5563;
    border-color: #6b7280;
    color: #f9fafb;
}

.dark-theme .nav-link {
    color: #d1d5db;
}

.dark-theme .nav-link:hover {
    background-color: #4b5563;
    color: #f9fafb;
}

/* ==================== Domain Type Selector ==================== */
.domain-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}
.domain-type-option {
    position: relative;
}
.domain-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.domain-type-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}
.domain-type-label:hover {
    border-color: #667eea;
    background: #f8f7ff;
}
.domain-type-option input[type="radio"]:checked + .domain-type-label {
    border-color: #667eea;
    background: linear-gradient(135deg, #f5f3ff, #eff6ff);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}
.domain-type-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}
.domain-type-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.domain-type-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}
.domain-type-desc {
    font-size: 0.8rem;
    color: #94a3b8;
}
@media (max-width: 640px) {
    .domain-type-selector {
        grid-template-columns: 1fr;
    }
}
