:root {
    --bg-main: #050508;
    --bg-card: #0b0b13;
    --bg-elevated: #161623;
    --accent: #ff0033;
    --accent-soft: #ff4b6b;
    --accent-soft2: #fb7185;
    --accent-glow: rgba(251,113,133,0.45);
    --text-main: #f9fafb;
    --text-muted: #a0a3b1;
    --border-subtle: #262739;
}

/* RESET BASIC */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    background:
        radial-gradient(circle at top left, #1e1b4b 0, #020617 35%, #000 100%);
    background-attachment: fixed;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent-soft2);
    color: #020617;
}

a {
    color: var(--accent-soft2);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}
a:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* LAYOUT */

.layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 250px;
    background:
        radial-gradient(circle at top, rgba(248,113,113,0.25) 0, #030308 48%, #020617 100%);
    border-right: 1px solid rgba(15,23,42,0.9);
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 0 0 40px rgba(15,23,42,0.8);
    z-index: 20;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.2rem 0.3rem 0.6rem;
}
.logo-circle {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at 20% 0, #fff 0, #fed7e2 25%, #fb7185 60%, #991b1b 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #020617;
    box-shadow:
        0 0 0 1px rgba(248,113,113,0.4),
        0 0 25px rgba(248,113,113,0.5);
}
.logo-circle.small {
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
}
.sidebar-brand-text span:first-child {
    font-weight: 700;
    letter-spacing: 0.03em;
}
.sidebar-brand-text small {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.6rem;
    border-radius: 0.7rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.16s ease;
}
.nav-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    background: radial-gradient(circle at top left, var(--accent-glow), transparent);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.nav-item i {
    width: 18px;
}
.nav-item:hover {
    background: rgba(148,163,184,0.14);
    color: var(--text-main);
    transform: translateY(-1px);
}
.nav-item:hover::before {
    opacity: 0.6;
}
.nav-item.active {
    background: radial-gradient(circle at top left, var(--accent-soft), #b91c1c);
    color: #fff;
    box-shadow: 0 0 24px rgba(248,113,113,0.75);
}
.nav-item.active::before {
    opacity: 0;
}

.sidebar-user {
    margin-top: 0.75rem;
    padding: 0.75rem 0.6rem;
    border-radius: 0.9rem;
    background: radial-gradient(circle at top left, rgba(248,113,113,0.35), #020617 60%);
    border: 1px solid rgba(248,113,113,0.7);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    box-shadow: 0 20px 50px rgba(15,23,42,0.9);
}
.sidebar-user i {
    font-size: 1.4rem;
}
.sidebar-user-name {
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.3rem 0.3rem 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* MAIN WRAPPER */

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* TOPBAR */

.topbar {
    border-bottom: 1px solid rgba(15,23,42,0.9);
    background: rgba(3,3,8,0.9);
    backdrop-filter: blur(26px);
    position: sticky;
    top: 0;
    z-index: 15;
}
.topbar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.7rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar-logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-main);
}
.topbar-logo-text {
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.88rem;
}
.topbar-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.topbar-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.25rem 0.4rem;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease;
}
.topbar-link:hover {
    color: var(--text-main);
    background: rgba(15,23,42,0.7);
}
.topbar-cta {
    font-size: 0.85rem;
}
.topbar-user {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.topbar-user i {
    margin-right: 0.35rem;
    color: var(--accent-soft2);
}

/* CONTENT */

.content {
    max-width: 1120px;
    margin: 1.6rem auto 2.4rem;
    padding: 0 1.25rem 2.5rem;
}

/* HERO LANDING */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr);
    gap: 2.4rem;
    align-items: center;
}
.hero-text h1 {
    font-size: 2.6rem;
    line-height: 1.08;
    margin-bottom: 0.7rem;
    letter-spacing: -0.03em;
}
.hero-text p {
    color: var(--text-muted);
    max-width: 34rem;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.22rem 0.75rem;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.5);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.7rem;
    box-shadow: 0 0 18px rgba(15,23,42,0.85);
}
.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34,197,94,0.9);
}
.accent {
    color: var(--accent-soft2);
}

.hero-actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.hero-list li {
    display: flex;
    align-items: center;
}
.hero-list i {
    color: #22c55e;
    margin-right: 0.35rem;
}

/* HERO ILLUSTRATION */

.hero-illustration {
    display: grid;
    gap: 1rem;
}
.hero-card {
    background:
        radial-gradient(circle at top left, var(--accent-glow), rgba(15,23,42,0.95));
    border-radius: 1rem;
    border: 1px solid rgba(248,113,113,0.7);
    padding: 0.95rem 1.1rem;
    box-shadow:
        0 30px 80px rgba(15,23,42,0.9),
        0 0 40px rgba(15,23,42,0.9);
    position: relative;
    overflow: hidden;
}
.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 120% -10%, rgba(56,189,248,0.28), transparent 60%),
        radial-gradient(circle at -20% 110%, rgba(244,114,182,0.25), transparent 55%);
    mix-blend-mode: screen;
    opacity: 0.9;
    pointer-events: none;
}
.hero-card.big .hero-card-body {
    margin-top: 0.6rem;
    position: relative;
    z-index: 1;
}
.hero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-card-title {
    font-size: 0.93rem;
}
.hero-card-title i {
    margin-right: 0.4rem;
}
.hero-card-status {
    font-size: 0.75rem;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    background: rgba(34,197,94,0.18);
    border: 1px solid rgba(34,197,94,0.7);
    color: #bbf7d0;
}

.hero-terminal {
    background: #020617;
    border-radius: 0.8rem;
    border: 1px solid #272838;
    padding: 0.6rem 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8rem;
    color: #e5e7eb;
    max-height: 190px;
    overflow: auto;
}
.hero-terminal pre {
    margin: 0;
}
.hero-card-footer {
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #e5e7eb;
    position: relative;
    z-index: 1;
}
.hero-card-footer .hero-pill {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(59,130,246,0.16);
    border: 1px solid rgba(59,130,246,0.6);
    font-size: 0.7rem;
}

/* MINI CARDS */

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 0.75rem;
}
.hero-mini-card {
    background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(15,23,42,0.92));
    border-radius: 0.9rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--border-subtle);
    display: flex;
    gap: 0.7rem;
    font-size: 0.85rem;
    box-shadow: 0 18px 40px rgba(15,23,42,0.9);
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease;
}
.hero-mini-card:hover {
    transform: translateY(-2px);
    border-color: rgba(148,163,184,0.8);
    box-shadow: 0 24px 60px rgba(15,23,42,0.95);
}
.hero-mini-card i {
    color: var(--accent-soft2);
    margin-top: 0.15rem;
}
.hero-mini-card h3 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
}
.hero-mini-card p {
    margin: 0;
    color: var(--text-muted);
}

/* SECTIONS */

.section {
    margin-top: 2.6rem;
}
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.section-title-inline {
    font-size: 1.3rem;
    margin: 0;
}
.section-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.section-subheading {
    font-size: 1rem;
    margin-top: 2rem;
}

/* FEATURES */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(230px,1fr));
    gap: 1rem;
}
.feature-card {
    background: var(--bg-card);
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 18px 50px rgba(15,23,42,0.9);
    position: relative;
    overflow: hidden;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease;
}
.feature-card::after {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at top left, rgba(251,113,133,0.25), transparent 60%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 70px rgba(15,23,42,0.95);
    border-color: rgba(148,163,184,0.8);
}
.feature-card:hover::after {
    opacity: 1;
}
.feature-card i {
    color: var(--accent-soft2);
}
.feature-card h3 {
    margin: 0.5rem 0 0.25rem;
}
.feature-card p {
    margin: 0;
    color: var(--text-muted);
}

/* FORMS & BUTTONS */

.form {
    display: block;
}
.form label {
    display: block;
    margin-top: 0.8rem;
    margin-bottom: 0.25rem;
    font-size: 0.87rem;
}
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="file"] {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border-radius: 0.5rem;
    border: 1px solid #272838;
    background: #020617;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.form input:focus {
    border-color: var(--accent-soft2);
    box-shadow: 0 0 0 1px rgba(251,113,133,0.5);
    background: #020617;
}
.form small {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* BUTTONS */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    padding: 0.45rem 0.9rem;
    font-size: 0.88rem;
    color: var(--text-main);
    background: rgba(15,23,42,0.9);
    cursor: pointer;
    text-decoration: none;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.12s ease,
        box-shadow 0.15s ease;
}
.btn i {
    margin-right: 0.4rem;
}
.btn:hover {
    background: rgba(148,163,184,0.16);
    text-decoration: none;
    transform: translateY(-1px);
}
.btn-primary {
    background: radial-gradient(circle at 0 0, #f97316, transparent 52%),
                linear-gradient(135deg, var(--accent), var(--accent-soft2));
    border-color: transparent;
    color: #fff;
    box-shadow:
        0 14px 35px rgba(248,113,113,0.7),
        0 0 25px rgba(248,113,113,0.8);
}
.btn-primary:hover {
    filter: brightness(1.06);
    box-shadow:
        0 18px 45px rgba(248,113,113,0.85),
        0 0 30px rgba(248,113,113,0.95);
}
.btn-ghost {
    border-color: rgba(148,163,184,0.5);
    color: var(--text-muted);
    background: transparent;
}
.btn-ghost:hover {
    color: var(--text-main);
    background: rgba(15,23,42,0.8);
}
.btn-lg {
    padding: 0.6rem 1.2rem;
    font-size: 0.93rem;
}
.btn-small {
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
}
.btn-block {
    width: 100%;
}
.btn-danger {
    border-color: #b91c1c;
    color: #fecaca;
    background: transparent;
}
.btn-danger:hover {
    background: rgba(248,113,113,0.2);
}

/* ALERTS */

.alert {
    border-radius: 0.7rem;
    padding: 0.65rem 0.85rem;
    margin: 0.4rem 0 1rem;
    font-size: 0.87rem;
}
.alert ul {
    padding-left: 1.1rem;
    margin: 0;
}
.alert-success {
    background: rgba(22,163,74,0.12);
    border: 1px solid rgba(34,197,94,0.6);
}
.alert-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.6);
}

/* AUTH LAYOUT */

.auth-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 0.5rem;
}
.auth-card {
    background: rgba(15,23,42,0.96);
    border-radius: 1rem;
    border: 1px solid var(--border-subtle);
    padding: 1.4rem 1.5rem 1.6rem;
    max-width: 460px;
    width: 100%;
    box-shadow:
        0 24px 80px rgba(15,23,42,0.95),
        0 0 40px rgba(15,23,42,0.9);
    backdrop-filter: blur(18px);
}
.auth-title {
    margin: 0 0 0.2rem;
}
.auth-subtitle {
    margin: 0 0 0.6rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.auth-meta {
    margin-top: 0.9rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* FILE MANAGER */

.fm-header {
    margin: 1.1rem 0;
    padding: 0.7rem 0.9rem;
    border-radius: 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}
.fm-path {
    font-size: 0.85rem;
}
.fm-path-label {
    color: var(--text-muted);
    margin-right: 0.35rem;
}
.fm-header-actions {
    display: flex;
    gap: 0.35rem;
}

.fm-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.fm-action-box {
    background: var(--bg-card);
    border-radius: 0.9rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 16px 50px rgba(15,23,42,0.9);
}
.fm-action-box h3 {
    margin: 0 0 0.2rem;
    font-size: 0.98rem;
}
.fm-action-box h3 i {
    margin-right: 0.45rem;
    color: var(--accent-soft2);
}
.fm-action-box .small {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

/* TABLE */

.table-wrapper {
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    box-shadow: 0 20px 60px rgba(15,23,42,0.95);
}
.fm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}
.fm-table thead {
    background: #050510;
}
.fm-table th,
.fm-table td {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid #111827;
    text-align: left;
}
.fm-table th {
    color: var(--text-muted);
    font-weight: 500;
}
.fm-table tbody tr:hover {
    background: #111121;
}
.fm-actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.muted {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* EDITOR */

.editor-form textarea {
    width: 100%;
    background: #020617;
    border-radius: 0.8rem;
    border: 1px solid #272838;
    color: var(--text-main);
    padding: 0.7rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.83rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.editor-form textarea:focus {
    border-color: var(--accent-soft2);
    box-shadow: 0 0 0 1px rgba(251,113,133,0.5);
}
.editor-actions {
    margin-top: 0.6rem;
    display: flex;
    gap: 0.5rem;
}

/* FOOTER */

.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 0.9rem 1.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    opacity: 0.85;
}

/* CUSTOM SCROLLBAR (WEBKIT) */

.hero-terminal::-webkit-scrollbar {
    width: 6px;
}
.hero-terminal::-webkit-scrollbar-track {
    background: #020617;
}
.hero-terminal::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 999px;
}

/* RESPONSIVE */

@media (max-width: 980px) {
    .hero {
        grid-template-columns: minmax(0,1fr);
    }
}

@media (max-width: 840px) {
    .sidebar {
        display: none;
    }
    .layout {
        display: block;
    }
    .content {
        padding-bottom: 2rem;
    }
}

@media (max-width: 640px) {
    .topbar-inner {
        padding-inline: 0.9rem;
    }
    .content {
        padding-inline: 0.9rem;
    }
    .hero-text h1 {
        font-size: 1.9rem;
    }
}
