:root {
    --bg: #000000;
    --bg-soft: #050505;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-hover: rgba(255, 255, 255, 0.07);
    --glass-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.55);
    --text-dim: rgba(255, 255, 255, 0.35);
    --accent: #ffffff;
    --success: #e8e8e8;
    --danger: #ff6b6b;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-glow: 0 0 60px rgba(255, 255, 255, 0.06);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --gradient-text: linear-gradient(to bottom, #6b7280, #ffffff, #64748b);
    --gray-500: #6b7280;
    --slate-500: #64748b;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
    outline: none;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Background layers ── */
.bg-effects {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-base-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(100, 116, 139, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(107, 114, 128, 0.08) 0%, transparent 50%);
}

.fade-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 20px 30px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%);
}

.fade-grid-bottom {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 20px 30px;
    -webkit-mask-image: radial-gradient(ellipse 50% 40% at 50% 100%, #000 40%, transparent 100%);
    mask-image: radial-gradient(ellipse 50% 40% at 50% 100%, #000 40%, transparent 100%);
    opacity: 0.6;
}

.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    will-change: transform;
}

.mesh-blob-1 {
    width: 520px;
    height: 520px;
    top: -120px;
    left: -80px;
    background: radial-gradient(circle, rgba(107, 114, 128, 0.25) 0%, transparent 70%);
    animation: blob-float-1 18s ease-in-out infinite;
}

.mesh-blob-2 {
    width: 480px;
    height: 480px;
    top: 20%;
    right: -100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    animation: blob-float-2 22s ease-in-out infinite;
}

.mesh-blob-3 {
    width: 400px;
    height: 400px;
    bottom: -80px;
    left: 35%;
    background: radial-gradient(circle, rgba(100, 116, 139, 0.2) 0%, transparent 70%);
    animation: blob-float-3 20s ease-in-out infinite;
}

.noise-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes blob-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, 40px) scale(1.08); }
    66% { transform: translate(30px, -30px) scale(0.95); }
}

@keyframes blob-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, 60px) scale(1.1); }
}

@keyframes blob-float-3 {
    0%, 100% { transform: translate(0, 0); }
    40% { transform: translate(40px, -50px); }
    80% { transform: translate(-30px, 20px); }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.05); }
    50% { box-shadow: 0 0 40px rgba(255, 255, 255, 0.12); }
}

.animate-in {
    animation: fade-in-up 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.35s; }

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

.text-gradient-animated {
    background-image: linear-gradient(
        to bottom,
        #6b7280 0%,
        #ffffff 35%,
        #64748b 70%,
        #ffffff 100%
    );
    background-size: 100% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: gradient-text-flow 5s ease-in-out infinite;
}

@keyframes gradient-text-flow {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
}

/* ── Glass components ── */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.glass-card:hover {
    border-color: var(--border-strong);
    background: var(--glass-hover);
}

/* ── Landing page ── */
.page-landing {
    position: relative;
    min-height: 100vh;
}

.landing-nav {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    margin: 24px auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.landing-logo span {
    background-image: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.landing-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    overflow: hidden;
    flex-shrink: 0;
}

.landing-logo-icon .logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.landing-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition);
}

.landing-nav-links a:hover {
    color: var(--text);
}

.landing-nav-actions {
    display: flex;
    gap: 10px;
}

.landing-hero {
    position: relative;
    z-index: 10;
    max-width: 820px;
    margin: 0 auto;
    padding: 80px 24px 120px;
    text-align: center;
}

.landing-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--glass);
    backdrop-filter: blur(12px);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.landing-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.landing-hero h1 .welcome {
    color: var(--text-muted);
    display: block;
    font-weight: 500;
    font-size: 0.45em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.15em;
}

.landing-hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 40px;
}

.landing-features {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 100px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    padding: 28px;
    text-align: left;
}

.feature-card i,
.feature-card .icon-wrap {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 16px;
    opacity: 0.8;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    background-image: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-ghost {
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.btn-ghost:hover {
    background: var(--glass-hover);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

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

.btn-solid:hover {
    background: transparent;
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.12);
}

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

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

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

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-lg {
    padding: 15px 36px;
    font-size: 0.95rem;
    border-radius: 12px;
}

/* ── Auth pages ── */
.page-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

.auth-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 44px 40px 40px;
    animation: fade-in-up 0.6s ease both;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    pointer-events: none;
}

.auth-card::after {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 160px;
    background: radial-gradient(ellipse at center, rgba(100, 116, 139, 0.16), transparent 70%);
    pointer-events: none;
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.auth-brand-lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.auth-brand-symbol-wrap {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
}

.auth-brand-symbol-wrap .brand-svg-symbol,
.auth-brand-symbol {
    width: 72px;
    height: 72px;
    display: block;
}

.brand-svg-symbol {
    width: 100%;
    height: 100%;
    display: block;
}

.brand-mark-inner .brand-svg-symbol {
    width: 68%;
    height: 68%;
}

.auth-brand-symbol {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
    background: transparent;
    border: none;
    padding: 0;
    filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.12)) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.auth-brand-tagline {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background-image: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-dim);
}

.auth-footer a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}

.auth-footer a:hover {
    border-color: var(--text);
}

/* ── Forms ── */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.form-input:focus {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

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

.btn-full {
    width: 100%;
    margin-top: 8px;
}

/* ── Alerts ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.85rem;
    display: none;
    border: 1px solid;
}

.alert-error {
    background: rgba(255, 107, 107, 0.08);
    border-color: rgba(255, 107, 107, 0.25);
    color: var(--danger);
}

.alert-success {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-strong);
    color: var(--text);
}

.loading {
    display: none;
    text-align: center;
    color: var(--text-muted);
    margin-top: 14px;
    font-size: 0.85rem;
}

.loading.active {
    display: block;
}

/* ── App layout (dashboard) ── */
body.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 50;
}

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

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ── Brand mark ── */
.brand-mark {
    position: relative;
    flex-shrink: 0;
    display: grid;
    place-items: center;
}

.brand-mark-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 10px 28px rgba(0, 0, 0, 0.35);
    display: grid;
    place-items: center;
}

.brand-mark-image {
    width: 68%;
    height: 68%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.14));
}

.brand-mark--sm {
    width: 46px;
    height: 46px;
    border-radius: 13px;
}

.brand-mark--md {
    width: 40px;
    height: 40px;
    border-radius: 11px;
}

.brand-mark--lg {
    width: 76px;
    height: 76px;
    border-radius: 20px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-copy--sidebar {
    gap: 2px;
}

.brand-copy--landing {
    gap: 1px;
}

.brand-copy--auth {
    text-align: center;
}

.brand-title {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text);
    line-height: 1.05;
}

.brand-copy--sidebar .brand-title,
.brand-copy--landing .brand-title {
    font-size: 1.08rem;
}

.brand-copy--auth .brand-title {
    font-size: 1.85rem;
    text-align: center;
}

.brand-title-muted {
    color: var(--text-muted);
    font-weight: 600;
}

.brand-subtitle {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.04));
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    font-family: var(--font-display);
    overflow: hidden;
    flex-shrink: 0;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background-image: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    padding: 11px 14px;
    margin-bottom: 4px;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.nav-item:hover {
    background: var(--glass);
    color: var(--text);
    border-color: var(--border);
}

.nav-item.active {
    background: var(--glass-strong);
    color: var(--text);
    border-color: var(--border-strong);
}

.nav-item i,
.nav-item .icon-wrap {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 0.8rem;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-info { flex: 1; }

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    transition: color var(--transition);
    text-decoration: none;
}

.logout-btn:hover { color: var(--text); }

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px 36px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    animation: fade-in-up 0.5s ease both;
}

.page-header i,
.page-header .icon-wrap {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background-image: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.section {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
    animation: fade-in-up 0.6s ease both;
    transition: border-color var(--transition);
}

.section:hover {
    border-color: var(--border-strong);
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.section-header i,
.section-header .icon-wrap {
    color: var(--text-muted);
    margin-top: 3px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.section-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-dim);
    font-size: 0.875rem;
}

/* Dashboard extras */
.success-notification {
    background: var(--text);
    color: var(--bg);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: fade-in-up 0.4s ease both;
}

.success-notification i {
    color: var(--bg);
}

.license-expired-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 24px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 59, 48, 0.35);
    background: rgba(255, 59, 48, 0.1);
    color: var(--text);
    animation: fade-in-up 0.4s ease both;
}

.license-expired-banner > i,
.license-expired-banner .icon-wrap {
    color: #ff6b6b;
    flex-shrink: 0;
}

.license-expired-banner div {
    flex: 1;
    min-width: 0;
}

.license-expired-banner strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.92rem;
}

.license-expired-banner span {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
    animation: fade-in-up 0.5s ease both;
}

.stat-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
}

.search-box {
    flex: 1;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 16px;
    color: var(--text);
    font-size: 0.875rem;
    transition: border-color var(--transition);
}

.search-box:focus {
    border-color: var(--border-strong);
}

.search-box::placeholder { color: var(--text-dim); }

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

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

.products-table thead { border-bottom: 1px solid var(--border); }

.products-table th {
    text-align: left;
    padding: 12px 0;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.products-table td {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.product-info { display: flex; align-items: center; gap: 12px; }

.product-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.04));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.product-name { font-size: 0.9rem; font-weight: 600; }

.product-status { font-size: 0.75rem; color: var(--danger); margin-top: 4px; }
.product-status.active { color: var(--text-muted); }

.days-left { font-size: 0.875rem; color: var(--text-muted); }
.days-left.negative { color: var(--danger); }

.table-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 28px;
    width: 100%;
    max-width: 440px;
    animation: fade-in-up 0.3s ease both;
}

.modal h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text);
}

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

.profile-grid {
    display: grid;
    gap: 24px;
    max-width: 760px;
    margin: 0 auto;
}

.profile-card {
    overflow: hidden;
    animation: fade-in-up 0.5s ease both;
}

.profile-section-head {
    text-align: center;
    margin-bottom: 22px;
}

.profile-section-head .section-title {
    margin-bottom: 6px;
}

.profile-section-head .section-subtitle {
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.45;
}

.profile-section-body {
    display: grid;
    gap: 16px;
}

.profile-avatar-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.profile-avatar-preview-wrap {
    position: relative;
    width: 112px;
    height: 112px;
    flex-shrink: 0;
}

.profile-avatar-actions {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 14px;
}

.profile-avatar-preview,
.profile-avatar-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    box-sizing: border-box;
}

.profile-avatar-preview {
    object-fit: cover;
    background: rgba(255,255,255,0.03);
    display: block;
}

.profile-avatar-preview[hidden] {
    display: none !important;
}

.profile-avatar-fallback {
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.profile-avatar-fallback[hidden] {
    display: none !important;
}

.profile-dropzone {
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    padding: 22px 18px;
    text-align: center;
    cursor: pointer;
    background: rgba(0,0,0,0.2);
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
}

.profile-dropzone:hover,
.profile-dropzone.dragover {
    border-color: var(--text);
    background: rgba(255,255,255,0.03);
}

.profile-dropzone-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-dropzone-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.profile-btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-btn-row--center {
    justify-content: center;
}

.profile-action-center {
    display: flex;
    justify-content: center;
}

.profile-discord-linked {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(88, 101, 242, 0.08);
    text-align: center;
    flex-wrap: wrap;
}

.profile-card--discord .profile-section-body {
    max-width: 100%;
}

.profile-discord-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(88, 101, 242, 0.22);
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.12) 0%, rgba(0, 0, 0, 0.2) 55%);
}

.profile-discord-card-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.profile-discord-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-discord-avatar-img,
.profile-discord-avatar-fallback {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(88, 101, 242, 0.45);
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.18);
}

.profile-discord-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 101, 242, 0.2);
    color: #a5b4fc;
    font-size: 1.35rem;
}

.profile-discord-status {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #34c759;
    border: 2px solid #0b0c0e;
    box-shadow: 0 0 0 1px rgba(52, 199, 89, 0.35);
}

.profile-discord-details {
    min-width: 0;
    flex: 1;
}

.profile-discord-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-discord-meta {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-discord-dot {
    margin: 0 4px;
    opacity: 0.6;
}

.profile-discord-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-discord-action-primary,
.profile-discord-action-secondary {
    flex: 1;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-discord-action-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.profile-discord-action-secondary:hover {
    background: rgba(255, 59, 48, 0.12);
    border-color: rgba(255, 59, 48, 0.35);
    color: #ff6b6b;
}

.profile-discord-connect {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 28px 20px;
    border-radius: 14px;
    border: 1px dashed rgba(88, 101, 242, 0.35);
    background: rgba(88, 101, 242, 0.06);
}

.profile-discord-connect-icon,
.profile-discord-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 101, 242, 0.18);
    color: #8ea1ff;
    font-size: 1.5rem;
}

.profile-discord-connect-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 6px;
}

.profile-discord-connect-copy p,
.profile-discord-empty p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 320px;
    margin: 0;
}

.profile-discord-connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 200px;
    justify-content: center;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    border: none;
}

.profile-discord-connect-btn:hover {
    filter: brightness(1.08);
}

.profile-discord-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 24px;
    color: var(--text-muted);
}

.profile-discord-copy {
    min-width: 0;
}

.profile-discord-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 101, 242, 0.18);
    color: #8ea1ff;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.profile-note,
.profile-discord-meta--legacy {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.profile-note--center {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}

.profile-note code {
    color: var(--text);
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.78rem;
}

.profile-discord-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 560px;
    margin: 0 auto;
}

.profile-info-item {
    text-align: center;
    min-width: 0;
}

.profile-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-info-value {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.25);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-flash,
.profile-inline-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 0.85rem;
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.profile-flash {
    margin-bottom: 20px;
}

.profile-flash-success,
.profile-inline-alert-success {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.3);
    color: #34c759;
}

.profile-flash-error,
.profile-inline-alert-error {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff6b6b;
}

.page-header--center {
    justify-content: center; 
}

.main-content--profile .page-title {
    text-align: center;
}

@media (max-width: 720px) {
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .landing-features { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .landing-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    body.app-layout { flex-direction: column; }
}
