/* ===========================================================================
   Dost brand tokens (subset of the Dost Design System)
   =========================================================================== */
:root {
    --dost-dark:     #001D3F;
    --dost-ocean:    #00346A;
    --dost-fresh:    #003F83;
    --dost-friendly: #1D5FE0;
    --dost-original: #00B9FF;
    --dost-sky:      #E8F6FF;

    --dost-black:    #1A1919;
    --dost-dust:     #343338;
    --dost-storm:    #6B7280;
    --dost-white:    #FFFFFF;
    --dost-stone:    #EAEBF3;

    --danger:        #CE0D09;
    --danger-bg:     #FFEFEF;
    --success:       #187F3F;
    --success-bg:    #EAF6EE;

    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 10px 40px rgba(0, 29, 63, 0.08);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--dost-black);
    background: var(--dost-white);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--dost-friendly); text-decoration: none; }
a:hover { color: var(--dost-fresh); }

/* ===========================================================================
   Buttons / forms (shared)
   =========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
}

.btn-primary { background: var(--dost-dark); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--dost-ocean); color: #fff; }
.btn-secondary { background: #fff; color: var(--dost-dark); border-color: var(--dost-stone); }
.btn-secondary:hover { background: var(--dost-sky); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f3c9c8; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { padding: 8px 12px; font-size: 13px; }

.form-group { margin-bottom: 18px; }
.form-group label,
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dost-dust);
    margin-bottom: 7px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--dost-stone);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-sans);
    color: var(--dost-black);
    background: #fff;
}
.form-control:focus {
    outline: none;
    border-color: var(--dost-friendly);
    box-shadow: 0 0 0 3px rgba(29, 95, 224, 0.15);
}

textarea.form-control { min-height: 92px; resize: vertical; font-family: var(--font-sans); }

.form-check { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.form-check label { margin: 0; font-weight: 500; color: var(--dost-black); }

.validation-summary, .field-validation-error, .text-danger {
    color: var(--danger);
    font-size: 13px;
}
.validation-summary { margin-bottom: 14px; }

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #c5e6d1;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 14px;
}

/* ===========================================================================
   Split-panel auth layout (login / logout)
   =========================================================================== */
.auth-shell {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 100vh;
}

.auth-hero {
    position: relative;
    padding: 56px 64px;
    background:
        radial-gradient(1200px 500px at -10% -10%, var(--dost-sky), transparent 60%),
        linear-gradient(180deg, #fff, #f7fbff);
    display: flex;
    flex-direction: column;
}

.auth-hero .brand { display: flex; align-items: center; }
.auth-hero .brand img { height: 34px; }

.auth-hero .hero-body { margin-top: auto; margin-bottom: auto; max-width: 540px; }
.auth-hero h1 {
    font-size: 46px;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--dost-dark);
    margin: 0 0 18px;
    font-weight: 800;
}
.auth-hero p.lead { font-size: 16px; color: var(--dost-dust); margin: 0; }
.auth-hero .demo { margin-top: 22px; font-size: 15px; color: var(--dost-dust); }

.auth-dots {
    margin-top: 36px;
    display: grid;
    grid-template-columns: repeat(10, 10px);
    gap: 18px;
    opacity: 0.5;
}
.auth-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--dost-original); opacity: 0.45; }

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--dost-white);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid var(--dost-stone);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 36px 34px;
}
.auth-card h2 { font-size: 24px; font-weight: 800; color: var(--dost-dark); margin: 0 0 4px; }
.auth-card .sub { color: var(--dost-storm); font-size: 14px; margin: 0 0 26px; }

.auth-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; }

.lang-select { position: absolute; top: 28px; right: 64px; color: var(--dost-storm); font-size: 14px; }

/* ===========================================================================
   App chrome (home / admin)
   =========================================================================== */
.topbar {
    height: 62px;
    background: var(--dost-dark);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 24px;
}
.topbar .brand img { height: 26px; }
.topbar nav { display: flex; gap: 22px; margin-left: 12px; }
.topbar nav a { color: #cfe6ff; font-size: 14px; font-weight: 500; }
.topbar nav a:hover { color: #fff; }
.topbar .spacer { flex: 1; }
.topbar .user { color: #9db9d8; font-size: 13px; }
.topbar .user a { color: #cfe6ff; margin-left: 14px; }

.container { max-width: 980px; margin: 32px auto; padding: 0 20px; }

.card {
    background: #fff;
    border: 1px solid var(--dost-stone);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 28px;
    margin-bottom: 22px;
}
.card h1 { font-size: 26px; color: var(--dost-dark); margin: 0 0 8px; font-weight: 800; }
.card h2 { font-size: 16px; color: var(--dost-storm); margin: 22px 0 10px; font-weight: 600; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.page-head h1 { font-size: 24px; color: var(--dost-dark); margin: 0; font-weight: 800; }

table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th {
    text-align: left;
    padding: 10px 12px;
    color: var(--dost-storm);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--dost-stone);
}
table.grid td { padding: 12px; border-bottom: 1px solid var(--dost-stone); vertical-align: top; }
table.grid tr:last-child td { border-bottom: none; }

.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--dost-sky);
    color: var(--dost-fresh);
    margin: 1px 2px;
}
.badge.muted { background: var(--dost-stone); color: var(--dost-storm); }
.badge.ok { background: var(--success-bg); color: var(--success); }

.endpoints { line-height: 2; padding-left: 18px; }
.endpoints code { background: var(--dost-sky); padding: 2px 7px; border-radius: 5px; color: var(--dost-fresh); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tile { border: 1px solid var(--dost-stone); border-radius: var(--radius-sm); padding: 20px; text-decoration: none; display: block; }
.tile:hover { border-color: var(--dost-friendly); background: var(--dost-sky); }
.tile h3 { margin: 0 0 6px; color: var(--dost-dark); font-size: 17px; }
.tile p { margin: 0; color: var(--dost-storm); font-size: 14px; }

.footer { text-align: center; color: var(--dost-storm); font-size: 13px; padding: 24px; }
.signout { display: none; }

@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .tiles { grid-template-columns: 1fr; }
}
