﻿:root {
    --bg: #000000;
    --panel: rgba(12, 12, 12, 0.8);
    --panel2: rgba(18, 18, 18, 0.9);
    --border: rgba(255, 255, 255, 0.1);
    --border2: rgba(255, 255, 255, 0.2);
    --text: #ffffff;
    --text2: #b4b4b8;
    --text3: #6b6b6f;
    --accent: #ffffff;
    --glow: 0 0 60px rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: radial-gradient(1200px 800px at 50% 0%, #151515, #000000 70%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.7;
}

.background-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
}

.grid-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.3;
}

.glow-orbs {
    position: absolute;
    inset: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.2;
}

.orb1 {
    width: 500px;
    height: 500px;
    background: #ffffff;
    top: -200px;
    left: -200px;
}

.orb2 {
    width: 400px;
    height: 400px;
    background: #ffffff;
    bottom: -100px;
    right: -100px;
}

.orb3 {
    width: 300px;
    height: 300px;
    background: #ffffff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    backdrop-filter: blur(20px) saturate(180%);
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.7));
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}

.logo-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 40px 10px rgba(255,255,255,0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.logo-text {
    font-weight: 800;
    letter-spacing: 0.2em;
    font-size: 0.9rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text2);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text);
}

.nav-primary {
    padding: 0.6rem 1.4rem;
    border: 1px solid var(--border2);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    transition: all 0.2s;
}

.nav-primary:hover {
    background: var(--accent);
    color: #000000;
    border-color: var(--accent);
    box-shadow: var(--glow);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    font-size: 1.2rem;
}

main {
    position: relative;
    z-index: 1;
    padding-top: 70px;
    height: calc(100vh - 70px);
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    display: none;
    padding: 2rem 0;
    min-height: calc(100vh - 70px);
    height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
}

.section.active {
    display: block;
}

.section-dash {
    padding: 0;
    overflow: hidden;
    height: calc(100vh - 70px);
}

.dash-container {
    max-width: 100%;
    height: 100%;
    padding: 15px 15px 15px 0;
    margin: 0;
}

.dashboard-layout {
    display: flex;
    gap: 15px;
    height: 100%;
    min-height: 0;
    position: relative;
    padding: 0 0 0 295px;
}

.dash-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    height: auto;
    flex-shrink: 0;
    margin: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.7));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: none;
    border-right: 1px solid var(--border);
    border-radius: 0;
    padding: 90px 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    z-index: 9;
}

.dash-content {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    padding-bottom: 15px;
}

.dash-content .dash-card {
    min-height: auto;
}

/* Flat dashboard: no bubble panels, content sits on the background */
.dash-content .dash-card {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 1rem 0 !important;
    box-shadow: none !important;
}
.dash-content .dash-card .card-head {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.client-row {
    background: var(--bg);
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    cursor: context-menu;
    transition: border-color 0.2s;
}

.client-row:hover {
    border-color: var(--border2);
}

.screen-wrap {
    background: #111;
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.screen-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    max-height: 60vh;
}

.screen-wrap img.frame,
.screen-wrap canvas.frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.screen-wrap:fullscreen {
    border-radius: 0;
    border: none;
    background: #000;
    padding: 0;
}

.screen-wrap:fullscreen img,
.screen-wrap:fullscreen canvas {
    max-height: 100vh;
    border-radius: 0;
}

.win-layer {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.35);
    pointer-events: none;
}

.win-layer .win-box {
    pointer-events: auto;
}

.win-layer .win-box {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.win-box {
    width: min(920px, 94vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #0c0c0c;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 40px 120px rgba(0,0,0,0.8);
    resize: both;
    overflow: hidden;
    min-width: 340px;
    min-height: 320px;
}

.win-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
}

.win-head h3 {
    font-size: 1.1rem;
}

.win-body {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
}

.win-body .win-card {
    background: transparent;
    border: none;
    padding: 0;
}

.win-body .win-card .card-body {
    padding: 0;
}

.secret-blur {
    filter: blur(7px);
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
    transition: filter 0.2s;
}

.secret-blur.shown {
    filter: none;
    user-select: text;
    -webkit-user-select: text;
}

.dash-sidebar .nav-link {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.2s;
}

.dash-sidebar .nav-link:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
    border-color: var(--border2);
    box-shadow: 0 0 24px rgba(255,255,255,0.10), inset 0 1px 0 rgba(255,255,255,0.08);
    transform: translateX(4px);
}

.dash-sidebar .nav-link:active {
    transform: translateX(2px) scale(0.99);
}

.hero {
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: radial-gradient(400px 100px at 50% 0%, rgba(255,255,255,0.1), transparent);
    margin-bottom: 2rem;
    color: var(--text2);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.badge-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(200px 60px at 50% 0%, rgba(255,255,255,0.15), transparent);
}

.hero-badge i {
    color: var(--accent);
    position: relative;
}

.hero-badge span {
    position: relative;
}

.hero-heading {
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.text-glow {
    background: radial-gradient(ellipse at center, #ffffff 0%, #8a8a8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 40px rgba(255,255,255,0.2));
}

.hero-text {
    color: var(--text2);
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 650px;
    margin: 0 auto 3rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-glow {
    background: linear-gradient(135deg, #ffffff, #d4d4d8);
    color: #000000;
    box-shadow: 0 0 40px rgba(255,255,255,0.2);
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(255,255,255,0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--border2);
    background: rgba(255,255,255,0.02);
}

.btn-ghost {
    background: transparent;
    color: var(--text2);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--border2);
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Minimal buttons: slimmer, flatter, no lift */
.btn {
    padding: 0.65rem 1.4rem;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 500;
}
.btn-glow {
    box-shadow: 0 2px 12px rgba(255,255,255,0.12);
}
.btn-glow:hover {
    transform: none;
    box-shadow: 0 2px 18px rgba(255,255,255,0.18);
}
.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
}

/* Cleaner dashboard sidebar: quiet links, clear active state */
.dash-sidebar nav .nav-link {
    background: transparent;
    border: 1px solid transparent;
    font-weight: 500;
    color: var(--text2);
    padding: 0.6rem 0.9rem !important;
    border-radius: 9px !important;
}
.dash-sidebar nav .nav-link:hover {
    background: rgba(255,255,255,0.05);
    border-color: transparent;
    box-shadow: none;
    transform: none;
    color: var(--text);
}
.dash-sidebar nav .nav-link.active {
    background: rgba(255,255,255,0.08);
    border-color: var(--border);
    color: var(--text);
}

/* Single account panel: never squashed, nothing clipped */
.account-panel {
    flex-shrink: 0;
}
.admin-panel {
    flex-shrink: 0;
}
.account-panel .auth-form {
    max-width: 560px;
}
.account-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}
#recoveryKeyDisplay {
    word-break: break-all;
}
.form-group input {
    width: 100%;
    box-sizing: border-box;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.admin-table th, .admin-table td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.admin-table th {
    color: var(--text2);
    font-weight: 600;
    white-space: nowrap;
}
.form-group textarea {
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}

/* No visible scrollbars anywhere - scrolling still works */
* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.stats-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: radial-gradient(600px 120px at 50% 0%, rgba(255,255,255,0.08), transparent);
    max-width: 600px;
    margin: 0 auto;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.stat-label {
    color: var(--text3);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.stat-sep {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--border), transparent);
}

.auth-card {
    max-width: 440px;
    margin: 0 auto;
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: radial-gradient(500px 300px at 50% 0%, rgba(255,255,255,0.06), transparent);
    backdrop-filter: blur(20px);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

.auth-header p {
    color: var(--text2);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text2);
}

.form-group input {
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--border2);
}

.text-danger {
    color: #ff4d4d;
}

.form-message {
    text-align: center;
    margin-top: 1rem;
    color: var(--text2);
    font-size: 0.9rem;
    min-height: 1.2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.8rem;
    color: var(--text2);
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
}

.dashboard-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.dash-title {
    font-size: 2.6rem;
    margin-bottom: 0.4rem;
}

.dash-sub {
    color: var(--text2);
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.dash-card {
    border-radius: 16px;
    border: 1px solid var(--border);
    background: radial-gradient(400px 200px at 50% 0%, rgba(255,255,255,0.05), transparent);
    overflow: hidden;
}

.dash-card-main {
    grid-column: 1 / -1;
}

.card-head {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-head h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.info-item:last-child {
    border-bottom: none;
}

.info-key {
    color: var(--text2);
}

.info-val {
    color: var(--text);
    max-width: 60%;
    word-break: break-all;
}

.info-clip {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #22c55e;
    font-size: 0.85rem;
}

.card-text {
    color: var(--text2);
    margin-bottom: 1rem;
}

.bar {
    height: 6px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, #ffffff, #a1a1aa);
}

footer {
    padding: 2rem;
    text-align: center;
    color: var(--text3);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .nav-toggle {
        display: block;
    }
    .stats-panel {
        flex-direction: column;
        gap: 1.5rem;
    }
    .stat-sep {
        display: none;
    }
    .dashboard-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .info-item {
        flex-direction: column;
    }
    .info-val {
        max-width: 100%;
    }
    .dash-sidebar {
        width: 220px;
        padding: 80px 1rem 1rem;
    }
    .dashboard-layout {
        padding: 0 0 0 235px;
    }
}
