/* ============================================
   TemplateMo 3D Glassmorphism Dashboard
   https://templatemo.com
   CSS Stylesheet
============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES
============================================ */
:root {
    /* Primary Colors - Emerald & Gold Luxury */
    --emerald: #059669;
    --emerald-light: #34d399;
    --gold: #d4a574;
    --gold-light: #e8c9a0;
    --amber: #b45309;
    --cream: #fef3e2;
    
    /* Accent Colors */
    --coral: #e07a5f;
    --slate: #475569;
    
    /* Glass Colors */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --glass-hover: rgba(255, 255, 255, 0.08);
    
    /* Background - Deep Forest */
    --bg-dark: #0a0f0d;
    --bg-gradient-1: #0d1a14;
    --bg-gradient-2: #132419;
    --bg-gradient-3: #1a2e23;
    
    /* Text */
    --text-primary: #f5f5f4;
    --text-secondary: rgba(245, 245, 244, 0.7);
    --text-muted: rgba(245, 245, 244, 0.4);
    
    /* Status Colors */
    --success: #22c55e;
    --warning: #eab308;
    --danger: #dc2626;
    --info: #0ea5e9;
    
    /* Spacing */
    --sidebar-width: 280px;
    --navbar-height: 70px;
    --border-radius: 20px;
    --card-padding: 24px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Light Mode */
[data-theme="light"] {
    /* Glass Colors - Light */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.8);
    
    /* Background - Light */
    --bg-dark: #f5f5f0;
    --bg-gradient-1: #e8f5e9;
    --bg-gradient-2: #f1f8e9;
    --bg-gradient-3: #fefefe;
    
    /* Text - Light (slightly softer) */
    --text-primary: #1a1a1a;
    --text-secondary: rgba(26, 26, 26, 0.7);
    --text-muted: rgba(26, 26, 26, 0.5);
}

[data-theme="light"] .orb {
    opacity: 0.15;
}

[data-theme="light"] .glass-card::before {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
}

[data-theme="light"] .stat-value {
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .chart-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .activity-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
}

/* ============================================
   RESET & BASE STYLES
============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   ANIMATED BACKGROUND
============================================ */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
}

.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(120, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(0, 200, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 80%, rgba(255, 0, 200, 0.1) 0%, transparent 50%);
}

/* Floating Orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
    will-change: transform;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--emerald);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: var(--gold);
    top: 60%;
    right: 10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--coral);
    bottom: 10%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

/* ============================================
   LAYOUT STRUCTURE
============================================ */
.dashboard {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* ============================================
   MAIN CONTENT
============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
    min-width: 0;
    max-width: 100%;
}

/* ============================================
   SIDEBAR
============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 200vh;
    background: rgba(10, 15, 13, 0.92);
    border-right: 1px solid var(--glass-border);
    padding: 24px;
    z-index: 100;
    transition: all var(--transition-normal);
    overflow-y: auto;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--emerald-light);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 30px;
}

.logo {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 8px 32px rgba(5, 150, 105, 0.3);
}

.logo-animated {
    background: transparent;
    box-shadow: none;
    padding: 0;
    overflow: visible;
}

.logo-animated .logo-orbit {
    width: 44px;
    height: 44px;
    display: block;
}

.logo-orbit .logo-spin-ring-outer,
.logo-orbit .logo-spin-ring-inner,
.logo-orbit .logo-spin-sat {
    transform-origin: 20px 20px;
    transform-box: view-box;
}

.logo-spin-ring-outer {
    animation: logo-orbit-spin 7s linear infinite;
}

.logo-spin-ring-inner {
    animation: logo-orbit-spin-rev 11s linear infinite;
}

.logo-spin-sat {
    animation: logo-orbit-spin 3.2s linear infinite;
    will-change: transform;
}

.logo-sat-blob {
    filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.65));
}

.logo-orbit-star {
    transform-origin: 20px 20px;
    animation: logo-star-pulse 2.8s ease-in-out infinite;
}

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

@keyframes logo-orbit-spin-rev {
    to { transform: rotate(-360deg); }
}

@keyframes logo-star-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.92; }
}

.logo-text-brand {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--emerald-light), var(--gold), var(--cyan, #22d3ee), var(--emerald-light));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logo-text-shimmer 8s linear infinite;
}

@keyframes logo-text-shimmer {
    to { background-position: 200% center; }
}

.sidebar-brand:hover .logo-spin-sat {
    animation-duration: 1.6s;
}

.sidebar-brand:hover .logo-spin-ring-outer {
    animation-duration: 4s;
}

.sidebar-brand:hover .logo-orbit-star {
    animation-duration: 1.4s;
}

.logo-text {
    font-size: 22px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--emerald-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-section {
    margin-bottom: 25px;
    list-style: none;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 15px;
}

.nav-item {
    margin-bottom: 5px;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

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

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

.nav-icon {
    width: 22px;
    height: 22px;
    opacity: 0.8;
}

.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
    opacity: 1;
}

.nav-badge {
    margin-left: auto;
    background: linear-gradient(135deg, var(--gold), var(--amber));
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
}

/* Sidebar User Profile */
.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.user-profile:hover {
    background: var(--glass-hover);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   TOP NAVBAR
============================================ */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 20px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    min-width: 0;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
}

.search-input {
    width: 280px;
    padding: 12px 20px 12px 48px;
    background: rgba(15, 25, 20, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.nav-btn {
    width: 150px;
    height: 45px;
    background: rgba(15, 25, 20, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.nav-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.notification-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--coral);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--coral);
}

/* ============================================
   GLASS CARD BASE
============================================ */
.glass-card {
    background: rgba(15, 25, 20, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    position: relative;
    overflow: hidden;
    transition: background var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.glass-card:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 25px 50px -12px var(--glass-shadow),
        0 0 40px rgba(52, 211, 153, 0.1);
}

/* Hover Effect */
.glass-card-3d {
    transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.glass-card-3d:hover {
    transform: translateY(-4px);
}

/* ============================================
   STATS CARDS
============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    position: relative;
}

.stat-card-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-info h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-family: 'Space Mono', monospace;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
}

.stat-change.positive {
    color: var(--success);
    background: rgba(34, 197, 94, 0.15);
}

.stat-change.negative {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
}

.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.cyan {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(52, 211, 153, 0.05));
    box-shadow: 0 8px 32px rgba(52, 211, 153, 0.2);
}

.stat-icon.magenta {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), rgba(212, 165, 116, 0.05));
    box-shadow: 0 8px 32px rgba(212, 165, 116, 0.2);
}

.stat-icon.purple {
    background: linear-gradient(135deg, rgba(224, 122, 95, 0.2), rgba(224, 122, 95, 0.05));
    box-shadow: 0 8px 32px rgba(224, 122, 95, 0.2);
}

.stat-icon.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05));
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.2);
}

.stat-icon svg {
    width: 26px;
    height: 26px;
}

/* Sparkline in stat card */
.stat-sparkline {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    opacity: 0.3;
}

/* ============================================
   CONTENT GRID
============================================ */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

/* ============================================
   CHART CARD
============================================ */
.chart-card {
    min-height: 380px;
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.card-btn {
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.card-btn:hover,
.card-btn.active {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
    color: var(--text-primary);
}

/* Chart Container */
.chart-wrapper {
    overflow-x: auto;
    margin: 0 -10px;
    padding: 0 10px;
}

.chart-wrapper::-webkit-scrollbar {
    height: 8px;
}

.chart-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.chart-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--emerald), var(--gold));
    border-radius: 4px;
}

.chart-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--emerald-light), var(--gold-light));
}

.chart-container {
    height: 250px;
    position: relative;
    display: flex;
    min-width: 500px;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 0;
    padding-right: 12px;
    text-align: right;
}

.y-value {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
}

.chart-placeholder {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    padding: 20px 0;
    border-left: 1px solid var(--glass-border);
    padding-left: 12px;
}

.chart-bar-group {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.chart-bar {
    width: 100%;
    max-width: 40px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--emerald-light), var(--emerald));
    transition: all var(--transition-normal);
    position: relative;
    min-height: 10px;
}

.chart-bar.bar-emerald {
    background: linear-gradient(180deg, #6db897, #3d8b6e);
}

.chart-bar.bar-gold {
    background: linear-gradient(180deg, #c9b896, #a89068);
}

.chart-bar.bar-coral {
    background: linear-gradient(180deg, #d4a090, #b87a68);
}

.chart-bar.bar-teal {
    background: linear-gradient(180deg, #7ac4b8, #4a9e92);
}

.chart-bar.bar-amber {
    background: linear-gradient(180deg, #d4b06a, #a88542);
}

.chart-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
    border-radius: 8px 8px 0 0;
}

.chart-bar:hover {
    filter: brightness(1.15);
    transform: scaleY(1.02);
    transform-origin: bottom;
}

.chart-bar.bar-emerald:hover {
    box-shadow: 0 0 16px rgba(61, 139, 110, 0.4);
}

.chart-bar.bar-gold:hover {
    box-shadow: 0 0 16px rgba(168, 144, 104, 0.4);
}

.chart-bar.bar-coral:hover {
    box-shadow: 0 0 16px rgba(184, 122, 104, 0.4);
}

.chart-bar.bar-teal:hover {
    box-shadow: 0 0 16px rgba(74, 158, 146, 0.4);
}

.chart-bar.bar-amber:hover {
    box-shadow: 0 0 16px rgba(168, 133, 66, 0.4);
}

.chart-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   ACTIVITY FEED
============================================ */
.activity-card {
    max-height: 380px;
    display: flex;
    flex-direction: column;
}

.activity-list {
    flex: 1;
    overflow-y: auto;
    margin: 0 -10px;
    padding: 0 10px;
}

.activity-list::-webkit-scrollbar {
    width: 4px;
}

.activity-list::-webkit-scrollbar-track {
    background: transparent;
}

.activity-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--glass-border);
}

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

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

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

.activity-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.activity-text strong {
    color: var(--text-primary);
    font-weight: 500;
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   DATA TABLE
============================================ */
.table-card {
    grid-column: span 2;
}

.table-wrapper {
    overflow-x: auto;
    margin: 0 -10px;
    padding: 0 10px;
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--emerald), var(--gold));
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--emerald-light), var(--gold-light));
}

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

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
}

.data-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
}

.data-table tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--glass-hover);
}

.data-table td {
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.table-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.table-user-info {
    display: flex;
    flex-direction: column;
}

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

.table-user-email {
    font-size: 12px;
    color: var(--text-muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-badge.completed::before {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.status-badge.pending::before {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
}

.status-badge.processing {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.status-badge.processing::before {
    background: var(--info);
    box-shadow: 0 0 8px var(--info);
}

.table-amount {
    font-family: 'Space Mono', monospace;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   PROGRESS BARS
============================================ */
.progress-card {
    padding: var(--card-padding);
}

.progress-item {
    margin-bottom: 24px;
}

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

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress-label {
    font-size: 14px;
    font-weight: 500;
}

.progress-value {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent);
}

.progress-fill.cyan {
    background: linear-gradient(90deg, var(--emerald-light), var(--emerald));
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.4);
}

.progress-fill.magenta {
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
    box-shadow: 0 0 20px rgba(212, 165, 116, 0.4);
}

.progress-fill.purple {
    background: linear-gradient(90deg, var(--coral), var(--amber));
    box-shadow: 0 0 20px rgba(224, 122, 95, 0.4);
}

/* ============================================
   BOTTOM GRID
============================================ */
.bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

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

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

.calendar-nav-btn {
    width: 32px;
    height: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.calendar-nav-btn:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.calendar-nav-btn svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.calendar-day-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.calendar-day:hover {
    background: var(--glass-hover);
}

.calendar-day.other-month {
    color: var(--text-muted);
}

.calendar-day.today {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
}

/* ============================================
   DONUT CHART
============================================ */
.donut-container {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
}

.donut-chart {
    width: 140px;
    height: 140px;
    position: relative;
}

.donut-chart svg {
    transform: rotate(-90deg);
}

.donut-chart circle {
    fill: none;
    stroke-width: 20;
}

.donut-bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.donut-segment {
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-value {
    font-family: 'Space Mono', monospace;
    font-size: 28px;
    font-weight: 700;
}

.donut-label {
    font-size: 12px;
    color: var(--text-muted);
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

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

.legend-color.cyan { background: var(--emerald-light); }
.legend-color.magenta { background: var(--gold); }
.legend-color.purple { background: var(--coral); }

/* ============================================
   WEATHER WIDGET
============================================ */
.weather-main {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.weather-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(212, 165, 116, 0.2));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-icon svg {
    width: 45px;
    height: 45px;
    color: var(--emerald-light);
}

.weather-temp {
    font-family: 'Space Mono', monospace;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.weather-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.weather-detail {
    text-align: center;
    padding: 12px;
    background: var(--glass-bg);
    border-radius: 12px;
}

.weather-detail-value {
    font-family: 'Space Mono', monospace;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.weather-detail-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ============================================
   MOBILE MENU TOGGLE
============================================ */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    border: none;
    border-radius: 16px;
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(5, 150, 105, 0.3);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* ============================================
   LOGIN PAGE STYLES
============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-container {
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: rgba(15, 25, 20, 0.88);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 28px;
    margin: 0 auto 20px;
    box-shadow: 0 12px 40px rgba(5, 150, 105, 0.3);
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    transition: all var(--transition-fast);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--emerald);
}

.forgot-link {
    font-size: 14px;
    color: var(--emerald-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--gold);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    color: white;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(5, 150, 105, 0.4);
}

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

.btn-secondary:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.divider span {
    font-size: 13px;
    color: var(--text-muted);
}

.social-login {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.social-btn:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.social-btn svg {
    width: 22px;
    height: 22px;
}

.login-footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--emerald-light);
    text-decoration: none;
}

.login-footer a:hover {
    color: var(--gold);
}

/* Legal documents (offer, privacy, PD consent) */
.legal-doc {
    max-width: 860px;
    margin: 0 auto 40px;
}

.legal-doc-inner {
    padding: 28px 32px 32px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.legal-doc-inner h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px;
    line-height: 1.25;
}

.legal-doc-inner h2 {
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 10px;
}

.legal-doc-inner p,
.legal-doc-inner li {
    margin: 0 0 10px;
}

.legal-doc-inner ul {
    margin: 0 0 12px 1.1rem;
    padding: 0;
}

.legal-doc-inner a {
    color: var(--emerald-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-doc-inner a:hover {
    color: var(--gold);
}

.legal-doc-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.legal-doc-note {
    border-left: 3px solid var(--emerald);
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 0 10px 10px 0;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.legal-doc-footer-links {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    font-size: 14px;
}

/* Обратная связь (публичная форма) */
.feedback-page {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}

.feedback-intro {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 20px;
}

.feedback-card {
    padding: 24px 26px 28px;
}

.feedback-form .form-group {
    margin-bottom: 16px;
}

.feedback-actions {
    margin-top: 8px;
    margin-bottom: 0;
}

.feedback-identity-static {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.14);
    border: 1px solid var(--glass-border);
}

.feedback-identity-static .form-group:last-child {
    margin-bottom: 0;
}

.feedback-identity-static__value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
}

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

.feedback-my-threads-card {
    margin-bottom: 20px;
    padding: 18px 20px;
}

.feedback-my-threads-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feedback-my-threads-title {
    font-size: 1.05rem;
    margin: 0 0 12px;
}

.feedback-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Toast-уведомления (flash) */
.toast-stack {
    position: fixed;
    top: 88px;
    right: 16px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    pointer-events: none;
    max-width: min(380px, calc(100vw - 32px));
}

.toast-stack--has {
    pointer-events: auto;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(22, 32, 28, 0.96);
    border: 1px solid var(--glass-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
    backdrop-filter: blur(16px);
}

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

.toast--leave {
    transform: translateX(120%);
    opacity: 0;
}

.toast__body {
    flex: 1;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-primary);
    min-width: 0;
}

.toast__close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.toast__close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.toast--success { border-left: 3px solid #34d399; }
.toast--error { border-left: 3px solid #f87171; }
.toast--warning { border-left: 3px solid #fbbf24; }
.toast--info { border-left: 3px solid #38bdf8; }

@media (max-width: 768px) {
    .toast-stack {
        top: auto;
        bottom: 88px;
        right: 12px;
        left: 12px;
        max-width: none;
        align-items: stretch;
    }
    .toast--show { transform: translateY(0); }
    .toast { transform: translateY(24px); }
    .toast--leave { transform: translateY(24px); }
}

/* Плавающая поддержка + выезжающая панель */
.support-fab {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 10040;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--emerald, #059669), #047857);
    color: #fff;
    box-shadow: 0 10px 32px rgba(5, 150, 105, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}

.support-fab:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 36px rgba(5, 150, 105, 0.55);
}

.support-fab svg {
    width: 26px;
    height: 26px;
}

.support-fab--pulse {
    animation: support-fab-pulse 2.4s ease-in-out infinite;
}

@keyframes support-fab-pulse {
    0%, 100% { box-shadow: 0 10px 32px rgba(5, 150, 105, 0.45); }
    50% { box-shadow: 0 10px 40px rgba(52, 211, 153, 0.65); }
}

.support-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 10041;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.support-drawer-overlay.support-drawer-overlay--open {
    opacity: 1;
    visibility: visible;
}

.support-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(380px, 100vw);
    height: 100%;
    z-index: 10042;
    background: rgba(12, 18, 16, 0.98);
    border-left: 1px solid var(--glass-border);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
}

.support-drawer.support-drawer--open {
    transform: translateX(0);
}

.support-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--glass-border);
}

.support-drawer__head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.support-drawer__close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.support-drawer__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.support-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-drawer__new {
    display: block;
    text-align: center;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--emerald, #059669), #047857);
    transition: opacity 0.2s;
}

.support-drawer__new:hover {
    color: #fff;
    opacity: 0.92;
}

.support-drawer__hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

.support-drawer__thread {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.support-drawer__thread:hover {
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(16, 185, 129, 0.08);
}

.support-drawer__thread-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.support-drawer__thread-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Чат в стиле мессенджера (сайт + админка) */
.feedback-thread-page {
    max-width: 520px;
    margin: 0 auto;
}

.feedback-thread-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 720px);
}

.feedback-thread-head {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.feedback-thread-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text-primary);
    line-height: 1.25;
}

.feedback-thread-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.feedback-thread-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin: 8px 0 0;
    line-height: 1.45;
    opacity: 0.9;
}

.msg-app {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(8, 12, 10, 0.55) 100%);
}

.msg-app__viewport {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.msg-app__viewport::-webkit-scrollbar {
    width: 6px;
}

.msg-app__viewport::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.msg-row {
    display: flex;
    width: 100%;
}

.msg-row--in {
    justify-content: flex-start;
}

.msg-row--out {
    justify-content: flex-end;
}

.msg-row__inner {
    max-width: 88%;
}

.msg-bubble {
    padding: 9px 13px 8px;
    border-radius: 18px;
    line-height: 1.45;
    font-size: 14px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.msg-row--in .msg-bubble {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 5px;
    color: var(--text-primary);
}

.msg-row--out .msg-bubble {
    background: linear-gradient(155deg, #10b981, #059669);
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-bottom-right-radius: 5px;
    color: #ecfdf5;
}

.msg-bubble__text {
    word-break: break-word;
    margin: 0;
}

.msg-bubble__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
    font-size: 10px;
    opacity: 0.72;
}

.msg-row--out .msg-bubble__foot {
    color: rgba(236, 253, 245, 0.85);
}

.msg-row--in .msg-bubble__foot {
    color: var(--text-muted);
}

.msg-bubble__author {
    font-weight: 600;
}

.msg-app__composer {
    flex-shrink: 0;
    padding: 12px 14px 16px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.18);
}

.msg-app__composer .form-group {
    margin-bottom: 10px;
}

.msg-app__composer .form-label {
    font-size: 12px;
    margin-bottom: 6px;
}

.feedback-thread-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.adm-feedback-link-box {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    margin-top: 12px;
    font-size: 13px;
}

.adm-code-break {
    display: block;
    margin-top: 8px;
    word-break: break-all;
    font-size: 12px;
    color: var(--emerald-light, #34d399);
}

.adm-feedback-thread-wrap {
    margin-top: 16px;
}

.adm-feedback-thread-wrap .feedback-thread-card {
    max-height: min(85vh, 640px);
}

.adm-feedback-chat-log.msg-app__viewport {
    max-height: min(50vh, 420px);
}

[data-theme="light"] .msg-row--in .msg-bubble {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

[data-theme="light"] .toast {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .support-drawer {
    background: rgba(255, 255, 255, 0.98);
}

/* Signup: компактный блок согласий (collapse + accordion) */
.signup-legal-compact {
    margin: 18px 0 8px;
    padding: 12px 14px 14px;
    text-align: left;
    overflow: visible;
}

.signup-legal-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    padding: 8px 4px;
    margin: 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--emerald-light);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, color 0.2s;
}

.signup-legal-toggle:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--gold);
}

.signup-legal-toggle-icon {
    flex-shrink: 0;
    opacity: 0.85;
    transition: transform 0.25s ease;
}

.signup-legal-toggle[aria-expanded="true"] .signup-legal-toggle-icon {
    transform: rotate(180deg);
}

.signup-legal-collapse {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 8px;
    padding-top: 8px;
}

.signup-legal-accordion .accordion-item {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
}

.signup-legal-accordion .accordion-button {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    box-shadow: none;
}

.signup-legal-accordion .accordion-button:not(.collapsed) {
    background: rgba(16, 185, 129, 0.08);
    color: var(--emerald-light);
}

.signup-legal-accordion .accordion-button::after {
    filter: brightness(1.4);
}

.signup-legal-accordion .accordion-button:focus {
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
    border-color: transparent;
}

.signup-legal-accordion .accordion-body {
    padding: 10px 12px 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
}

.signup-legal-accordion .accordion-body a {
    color: var(--emerald-light);
    font-weight: 600;
    text-decoration: none;
}

.signup-legal-accordion .accordion-body a:hover {
    text-decoration: underline;
    color: var(--gold);
}

.signup-legal-checks {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.signup-legal-check {
    margin: 0;
    padding: 4px 0;
    align-items: flex-start;
}

.signup-legal-check .form-check-input {
    margin-top: 0.3em;
    flex-shrink: 0;
}

.signup-legal-check .form-check-label {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.signup-legal-check .form-check-label a {
    color: var(--emerald-light);
    font-weight: 600;
    text-decoration: none;
}

.signup-legal-check .form-check-label a:hover {
    text-decoration: underline;
    color: var(--gold);
}

.signup-legal-check .invalid-feedback {
    margin-top: 4px;
    font-size: 12px;
}

@media (max-width: 600px) {
    .legal-doc-inner {
        padding: 20px 16px 24px;
        font-size: 14px;
    }
}

/* ============================================
   PAGE HEADER (for inner pages)
============================================ */
.page-header {
    margin-bottom: 30px;
}

.page-header .page-title {
    margin-bottom: 8px;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.page-breadcrumb a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.page-breadcrumb a:hover {
    color: var(--emerald-light);
}

.page-breadcrumb span {
    color: var(--text-muted);
}

/* ============================================
   FOOTER
============================================ */
.site-footer {
    text-align: center;
    padding: 20px;
    margin-left: var(--sidebar-width);
    color: var(--text-muted);
    font-size: 14px;
}

.site-footer a {
    color: var(--emerald-light);
    transition: color var(--transition-fast);
}

.site-footer a:hover {
    color: var(--gold);
}

.site-footer-legal {
    margin-top: 10px;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 10px;
}

.site-footer-dot {
    opacity: 0.45;
    user-select: none;
}

/* Login/Register page footer */
.login-page .site-footer {
    margin-left: 0;
    position: relative;
    padding: 30px 20px;
    text-align: center;
    margin-top: 30px;
}

/* Floating Theme Toggle for Login/Register */
.theme-toggle-float {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 45px;
    height: 45px;
    background: rgba(15, 25, 20, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all var(--transition-fast);
}

.theme-toggle-float:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.theme-toggle-float svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

/* ============================================
   SETTINGS PAGE
============================================ */
.settings-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 24px;
}

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

.settings-nav-item {
    margin-bottom: 8px;
}

.settings-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--text-secondary);
    border-radius: 12px;
    transition: all var(--transition-fast);
}

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

.settings-nav-link.active {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.settings-nav-link svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.settings-nav-link.active svg,
.settings-nav-link:hover svg {
    opacity: 1;
}

.settings-section {
    margin-bottom: 32px;
}

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

.settings-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.settings-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-label-title {
    font-weight: 500;
    color: var(--text-primary);
}

.settings-label-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 26px;
    transition: all var(--transition-fast);
}

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

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    border-color: var(--emerald);
}

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

/* Settings Select Dropdown */
.settings-select {
    padding: 10px 16px;
    background-color: #0f1914;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    color-scheme: dark;
}

.settings-select:focus {
    border-color: var(--emerald-light);
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.15);
}

.settings-select option {
    background-color: #0f1914;
    color: #e2e8f0;
    padding: 10px;
}

.settings-select option:checked {
    background-color: #1a2e24;
    color: #34d399;
}

[data-theme="light"] .settings-select {
    background-color: #f5f5f0;
    color: #1a1a1a;
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .settings-select option {
    background-color: #f5f5f0;
    color: #1a1a1a;
}

[data-theme="light"] .settings-select option:checked {
    background-color: #e8e8e3;
    color: #059669;
}

/* Profile Header */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 36px;
    position: relative;
}

.profile-avatar-edit {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: rgba(15, 25, 20, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-avatar-edit:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.profile-avatar-edit svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.profile-info h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-info p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Settings Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group-settings.full-width {
    grid-column: span 2;
}

.form-group-settings label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group-settings input,
.form-group-settings textarea {
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-group-settings input:focus,
.form-group-settings textarea:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.15);
}

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

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

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

.settings-tab-content.active {
    display: block;
    animation: settingsFadeIn 0.3s ease;
}

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

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bottom-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .table-card {
        grid-column: span 1;
    }
}

@media (max-width: 992px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .bottom-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        margin-left: 0;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-nav-card {
        display: none;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-wrap: wrap;
    }
    
    .search-box {
        order: 3;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .donut-container {
        flex-direction: column;
    }

    .login-card {
        padding: 36px 24px;
    }

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

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

    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 15px;
    }
    
    .glass-card {
        padding: 18px;
    }
    
    .stat-value {
        font-size: 26px;
    }
    
    .data-table {
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }

    .social-login {
        flex-direction: column;
    }
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    animation: fadeInUp 0.4s ease-out backwards;
}

.stats-grid .glass-card:nth-child(1) { animation-delay: 0.05s; }
.stats-grid .glass-card:nth-child(2) { animation-delay: 0.08s; }
.stats-grid .glass-card:nth-child(3) { animation-delay: 0.11s; }
.stats-grid .glass-card:nth-child(4) { animation-delay: 0.14s; }
.stats-grid .glass-card:nth-child(5) { animation-delay: 0.17s; }
.stats-grid .glass-card:nth-child(6) { animation-delay: 0.2s; }
.stats-grid .glass-card:nth-child(7) { animation-delay: 0.23s; }
.stats-grid .glass-card:nth-child(8) { animation-delay: 0.26s; }
.stats-grid .glass-card:nth-child(9) { animation-delay: 0.29s; }
.stats-grid .glass-card:nth-child(10) { animation-delay: 0.32s; }

.content-grid .glass-card:nth-child(1) { animation-delay: 0.15s; }
.content-grid .glass-card:nth-child(2) { animation-delay: 0.2s; }
.content-grid .glass-card:nth-child(3) { animation-delay: 0.25s; }

.bottom-grid .glass-card:nth-child(1) { animation-delay: 0.2s; }
.bottom-grid .glass-card:nth-child(2) { animation-delay: 0.25s; }
.bottom-grid .glass-card:nth-child(3) { animation-delay: 0.3s; }

.login-card {
    animation: fadeInUp 0.4s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .glass-card,
    .login-card {
        animation: none;
    }
    .orb {
        animation: none;
    }
    .glass-card-3d:hover {
        transform: none;
    }
}

/* Override for Bootstrap form controls inside glass cards */
.login-card .form-control,
.main-content .form-control {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 14px 18px;
    font-size: 15px;
}
.login-card .form-control:focus,
.main-content .form-control:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
}
.login-card .form-control::placeholder,
.main-content .form-control::placeholder {
    color: var(--text-muted);
}
[data-theme="light"] .login-card .form-control,
[data-theme="light"] .main-content .form-control {
    background: var(--glass-bg);
    color: var(--text-primary);
}

/* ============================================
   STAR PARALLAX
============================================ */
#star-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: starTwinkle var(--duration, 3s) infinite ease-in-out;
    will-change: transform, opacity;
}
@keyframes starTwinkle {
    0%, 100% { opacity: 0.25; transform: scale(0.8); }
    50% { opacity: 0.9; transform: scale(1.2); }
}

/* Babel fragments preview in profile */
.dash-babel-card .dash-babel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.dash-babel-item {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15,23,42,.75);
    border: 1px solid rgba(148,163,184,.35);
}
.dash-babel-coords {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.dash-babel-text {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.4;
}
