@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
    --bg: #f3f6f8;
    --bg-alt: #e8eef2;
    --ink: #0e1a24;
    --muted: #526273;
    --line: #d6e0e8;
    --line-strong: #b7c8d6;
    --card: #ffffff;
    --accent: #0b6a88;
    --accent-2: #12a3a7;
    --danger: #b42318;
    --success: #147d44;
    --shadow: 0 18px 50px rgba(14, 26, 36, 0.08);
    --radius-lg: 22px;
    --radius-md: 14px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1200px 420px at -10% -10%, rgba(11, 106, 136, 0.16), transparent 58%),
        radial-gradient(820px 380px at 110% -10%, rgba(18, 163, 167, 0.14), transparent 56%),
        linear-gradient(180deg, var(--bg), var(--bg-alt));
}

a { color: var(--accent); text-decoration: none; }

a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; }
button { border: none; cursor: pointer; }

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.4rem;
}

.auth-card {
    width: min(560px, 100%);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(183, 200, 214, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 30px;
    box-shadow: var(--shadow);
    padding: 2.2rem;
}

.brand h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.04em;
}

.brand p {
    margin: 0.7rem 0 0;
    color: var(--muted);
    line-height: 1.6;
}

form {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.35rem;
}

label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #344455;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.88rem 0.95rem;
    background: #fbfdff;
    color: var(--ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(11, 106, 136, 0.14);
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.82rem 1.1rem;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, #0b6a88, #12a3a7);
    box-shadow: 0 12px 24px rgba(11, 106, 136, 0.28);
}

.button-primary:hover {
    text-decoration: none;
    transform: translateY(-1px);
    filter: saturate(1.08);
}

.button-secondary {
    background: #dde7ef;
    color: #213344;
}

.auth-footer {
    margin-top: 1.1rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.93rem;
}

.alert {
    border-radius: 14px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-danger {
    background: #fef3f2;
    color: #912018;
    border: 1px solid #f5c3bf;
}

.alert-success {
    background: #ecfdf3;
    color: #0f6232;
    border: 1px solid #bde6cb;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 290px 1fr;
    min-height: 100vh;
}

.dashboard-sidebar {
    padding: 1.6rem 1.2rem;
    background: linear-gradient(180deg, #0d2232, #112a3e 56%, #17364d);
    color: #e7f1f7;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(183, 220, 238, 0.2);
    border-radius: 16px;
    padding: 0.95rem 1rem;
    margin-bottom: 1rem;
}

.brand-panel h2 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
}

.brand-panel p {
    margin: 0.4rem 0 0;
    color: #a6c0d3;
    font-size: 0.92rem;
}

.dashboard-sidebar nav {
    display: grid;
    gap: 0.56rem;
}

.dashboard-sidebar a {
    display: inline-flex;
    align-items: center;
    padding: 0.72rem 0.85rem;
    border-radius: 11px;
    background: rgba(167, 197, 218, 0.08);
    color: #dbe9f2;
    font-weight: 700;
}

.dashboard-sidebar a.active,
.dashboard-sidebar a:hover {
    text-decoration: none;
    background: rgba(18, 163, 167, 0.24);
}

.dashboard-main {
    padding: 1.8rem;
    background: transparent;
}

.dashboard-header {
    margin-bottom: 1.35rem;
}

.dashboard-header h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    letter-spacing: -0.03em;
}

.dashboard-header p {
    margin: 0.45rem 0 0;
    color: var(--muted);
    max-width: 850px;
    line-height: 1.55;
}

.dashboard-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1.25rem;
}

.card,
.dashboard-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(183, 200, 214, 0.7);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.card {
    padding: 1.2rem 1.25rem;
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(14, 26, 36, 0.12);
}

.card h3 {
    margin: 0;
    font-size: 1.03rem;
}

.card p {
    margin: 0.6rem 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.dashboard-panel {
    padding: 1.3rem;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.14rem;
    letter-spacing: -0.02em;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.92rem;
    overflow: hidden;
}

thead th {
    text-align: left;
    color: #34495a;
    background: #edf3f7;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 0.72rem 0.65rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

thead th:first-child {
    border-left: 1px solid var(--line);
    border-top-left-radius: 10px;
}

thead th:last-child {
    border-right: 1px solid var(--line);
    border-top-right-radius: 10px;
}

tbody td {
    padding: 0.75rem 0.65rem;
    color: #3f5467;
    border-bottom: 1px solid #e8eff4;
    background: #fff;
}

tbody tr td:first-child { border-left: 1px solid #e8eff4; }
tbody tr td:last-child { border-right: 1px solid #e8eff4; }

tbody tr:hover td { background: #f8fbfd; }

.empty-state {
    margin: 0;
    color: #5e7385;
    line-height: 1.6;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.24rem 0.56rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.status-draft { background: #e8eef2; color: #314658; }
.status-sent { background: #e2f7fb; color: #0e5d73; }
.status-signed { background: #e7f8ed; color: #11653b; }
.status-archived { background: #f2e9db; color: #7a561d; }

pre, code {
    font-family: 'IBM Plex Mono', Consolas, monospace;
}

@media (max-width: 1120px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    }

    .dashboard-main {
        padding: 1.15rem;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .auth-card {
        padding: 1.45rem;
        border-radius: 20px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Modern command-center dashboard theme */
.ndx-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    background: #f3f5f9;
}

.ndx-sidebar {
    background: linear-gradient(180deg, #071939 0%, #08142d 42%, #0b234a 100%);
    color: #fff;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ndx-brand { display: flex; gap: 12px; align-items: center; }
.ndx-logo {
    width: 42px; height: 42px; border-radius: 11px;
    background: linear-gradient(135deg, #2a8cff, #1dd8ff);
    display: grid; place-items: center; font-weight: 800;
}
.ndx-brand h1 { margin: 0; font-size: 42px; line-height: 1; font-size: 17px; }
.ndx-brand p { margin: 4px 0 0; color: #b9c7dd; font-size: 12px; }

.ndx-nav { display: grid; gap: 7px; }
.ndx-nav a {
    color: #e4ecfb; padding: 10px 12px; border-radius: 11px;
    font-weight: 700; font-size: 15px; text-decoration: none;
    background: rgba(146, 178, 228, 0.08);
}
.ndx-nav a.active,
.ndx-nav a:hover { background: linear-gradient(90deg, #2b6aff, #2f7cff); }

.ndx-storage-card, .ndx-profile {
    margin-top: auto;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(201,220,255,0.16);
    border-radius: 14px;
    padding: 12px;
}
.ndx-storage-card h4 { margin: 0 0 8px; }
.ndx-storage-card p { margin: 0 0 8px; color: #c8d5e9; font-size: 13px; }

.ndx-progress { height: 8px; background: rgba(255,255,255,0.2); border-radius: 99px; overflow: hidden; }
.ndx-progress span { display: block; height: 100%; background: linear-gradient(90deg,#33a4ff,#7f7bff); }

.ndx-profile { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.ndx-avatar { width: 40px; height: 40px; border-radius: 50%; background: #2f7cff; display: grid; place-items: center; font-weight: 800; }
.ndx-profile p { margin: 0; color: #c8d5e9; font-size: 12px; }

.ndx-main { padding: 20px; }

.ndx-topbar {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.ndx-topbar h2 { margin: 0; font-size: 38px; font-size: 36px; font-size: 24px; }
.ndx-topbar p { margin: 4px 0 0; color: #66758e; }
.ndx-actions { display: flex; align-items: center; gap: 12px; }
.ndx-actions input {
    width: 380px; max-width: 40vw;
    border-radius: 11px;
    border: 1px solid #dbe4f0;
    padding: 10px 14px;
}
.ndx-company { font-weight: 700; color: #25334a; }
.ndx-avatar-sm { width: 36px; height: 36px; border-radius: 50%; background: #4f5fff; color: #fff; display: grid; place-items: center; font-weight: 700; }

.ndx-kpis {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.ndx-kpis article {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 14px;
    padding: 14px;
}
.ndx-kpis h5 { margin: 0; font-size: 13px; color: #4d607a; }
.ndx-kpis strong { display: block; margin-top: 6px; font-size: 34px; font-size: 35px; font-size: 23px; }
.ndx-kpis small { color: #1c8e4a; font-weight: 700; }

.ndx-grid3 {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 2fr 1.3fr 1.3fr;
    gap: 12px;
}

.ndx-panel {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 14px;
    padding: 14px;
}
.ndx-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ndx-panel-head h3 { margin: 0; font-size: 22px; font-size: 26px; font-size: 24px; font-size: 21px; }
.ndx-panel-head span, .ndx-panel-head a { color: #64748b; font-size: 13px; font-weight: 700; }

.ndx-donut-wrap { position: relative; min-height: 240px; }
.ndx-mini-chart { height: 220px; border: 1px solid #e8eef8; border-radius: 12px; padding: 8px; background: #fcfdff; }
.ndx-mini-chart svg { width: 100%; height: 100%; }
.ndx-mini-chart polyline { fill: none; stroke-width: 3; }
.ndx-mini-chart .line-a { stroke: #2f7cff; }
.ndx-mini-chart .line-b { stroke: #19b46b; }
.ndx-mini-chart .line-c { stroke: #915dff; }

.ndx-donut {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    margin: 8px auto;
    background:
      conic-gradient(#2f7cff 0 18%, #ff970f 18% 26%, #f2c523 26% 41%, #26c281 41% 74%, #915dff 74% 98%, #97a3b5 98% 100%);
    position: relative;
}
.ndx-donut::after {
    content: '';
    position: absolute;
    inset: 34px;
    border-radius: 50%;
    background: #fff;
}
.ndx-donut-center {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    pointer-events: none;
}
.ndx-donut-center strong { font-size: 28px; }
.ndx-donut-center span { color: #6b7d96; margin-top: -18px; }

.ndx-activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ndx-activity li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: start; }
.ndx-activity .dot { width: 9px; height: 9px; border-radius: 99px; background: #2f7cff; margin-top: 6px; }
.ndx-activity strong { font-size: 13px; }
.ndx-activity p { margin: 2px 0 0; color: #64748b; font-size: 12px; }
.ndx-activity time { color: #8b9bb2; font-size: 12px; white-space: nowrap; }

.ndx-bottom {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 12px;
}
.ndx-docs table th, .ndx-docs table td { font-size: 13px; }

.ndx-quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ndx-quick-grid a {
    border: 1px solid #d9e3f2;
    border-radius: 10px;
    padding: 12px;
    color: #304561;
    font-weight: 700;
    text-decoration: none;
    background: #fafcff;
}
.ndx-quick-grid a:hover { border-color: #9ec4ff; background: #f2f7ff; }

.ndx-side-col { display: grid; gap: 12px; }

@media (max-width: 1280px) {
    .ndx-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ndx-grid3 { grid-template-columns: 1fr; }
    .ndx-bottom { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .ndx-shell { grid-template-columns: 1fr; }
    .ndx-actions input { max-width: 100%; width: 100%; }
    .ndx-topbar { flex-direction: column; align-items: flex-start; }
    .ndx-actions { width: 100%; flex-wrap: wrap; }
}
