/* ============================================================
   TRON — Dashboard
   ============================================================ */

:root {
    --bg: #07080c;
    --bg-elevated: #0d0f15;
    --bg-card: #10121a;
    --bg-card-hover: #151823;
    --surface: #1a1d28;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(77,127,255,0.15);
    --cyan: #4d7fff;
    --cyan-dim: rgba(77,127,255,0.08);
    --cyan-glow: rgba(77,127,255,0.25);
    --blue: #264c9e;
    --gradient: linear-gradient(135deg, var(--cyan), var(--blue));
    --gradient-soft: linear-gradient(135deg, rgba(77,127,255,0.12), rgba(38,76,158,0.08));
    --text: #e8eaf0;
    --text-2: #939598;
    --text-3: #5a6077;
    --radius: 14px;
    --radius-lg: 22px;
    --transition: 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}

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

html { -webkit-font-smoothing: antialiased; background: var(--bg); }

#bgCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
    display: block;
}

body {
    color: var(--text);
    line-height: 1.75;
    background: transparent;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.022;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ============================================================
   TOP NAV
   ============================================================ */

.dash-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7,8,12,0.88);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-bottom: 1px solid var(--border);
    height: 68px;
    display: flex;
    align-items: center;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    gap: 1.5rem;
}

.dash-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.dash-nav-brand img {
    height: 36px;
    filter: brightness(1.3);
}

.dash-nav-brand span {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 3px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dash-nav-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    flex-shrink: 0;
}

.dash-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-2);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    transition: color var(--transition), background var(--transition);
}

.dash-nav-back:hover {
    color: var(--cyan);
    background: var(--cyan-dim);
}

.dash-nav-label {
    font-size: 0.78rem;
    color: var(--text-3);
    letter-spacing: 0.5px;
}

.dash-nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.9rem 0.4rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--bg);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

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

.user-role {
    font-size: 0.68rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-3);
    
    font-size: 0.82rem;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.logout-btn:hover {
    border-color: rgba(239,68,68,0.3);
    color: #f87171;
    background: rgba(239,68,68,0.06);
}

.logout-btn svg { width: 15px; height: 15px; }

/* ============================================================
   LAYOUT
   ============================================================ */

.dash-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 4rem;
}

/* ============================================================
   WELCOME BANNER
   ============================================================ */

.welcome-banner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

.welcome-text h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    
    margin-bottom: 0.3rem;
}

.welcome-text h2 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-text p {
    font-size: 0.92rem;
    color: var(--text-2);
}

.welcome-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.meta-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: var(--gradient-soft);
    border: 1px solid rgba(77,127,255,0.1);
    border-radius: 50px;
    font-size: 0.78rem;
    color: var(--cyan);
    font-weight: 500;
}

.meta-chip svg { width: 13px; height: 13px; }

/* ============================================================
   SECTION HEADING
   ============================================================ */

.dash-section {
    margin-bottom: 2.5rem;
}

.dash-section-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.72rem;
    
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.dash-section-title::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
}

/* ============================================================
   CARDS GRID
   ============================================================ */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.75rem 1.5rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.dash-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.dash-card-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-soft);
    border: 1px solid rgba(77,127,255,0.1);
    border-radius: 13px;
    color: var(--cyan);
    margin-bottom: 1.2rem;
}

.dash-card-icon svg { width: 22px; height: 22px; }

.dash-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    
    margin-bottom: 0.5rem;
}

.dash-card p {
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.dash-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cyan);
    transition: gap var(--transition);
}

.dash-card-link svg { width: 14px; height: 14px; transition: transform 0.3s; }
.dash-card-link:hover svg { transform: translateX(3px); }

/* Status indicator */
.dash-card-status {
    position: absolute;
    top: 1.4rem;
    right: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: #4ade80;
    font-weight: 600;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(74,222,128,0.5);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ============================================================
   INFO ROWS
   ============================================================ */

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.info-row:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.info-row-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gradient-soft);
    border: 1px solid rgba(77,127,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    flex-shrink: 0;
}

.info-row-icon svg { width: 17px; height: 17px; }

.info-row-text {
    flex: 1;
    min-width: 0;
}

.info-row-label {
    font-size: 0.72rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.info-row-value {
    font-size: 0.92rem;
    color: var(--text);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-row-value a {
    color: var(--text);
    transition: color var(--transition);
}

.info-row-value a:hover { color: var(--cyan); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .dash-nav { height: auto; padding: 0.9rem 1.25rem; flex-wrap: wrap; gap: 0.75rem; }
    .dash-nav-divider { display: none; }
    .dash-nav-label { display: none; }
    .welcome-banner { flex-direction: column; align-items: flex-start; }
    .admin-form-row { grid-template-columns: 1fr; }
    .user-info { display: none; }
}

@media (max-width: 480px) {
    .cards-grid { grid-template-columns: 1fr; }
    .meta-chip span { display: none; }
}

/* Language toggle */
.lang-toggle {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    opacity: 0.7;
    
    font-size: 1.1rem; line-height: 1;
    
    
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.lang-toggle:hover {
    border-color: #4d7fff;
    color: #4d7fff;
}
