/* Base reset-ish */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #0f172a;
    color: #e5e7eb;
}

/* App shell layout */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* Primary sidebar (icon-only) */
.sidebar {
    background-color: #020617;
    color: #e5e7eb;
}

.sidebar-primary {
    width: 75px;
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
}

.sidebar-primary__logo {
    margin-bottom: 24px;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #22c55e, #0ea5e9);
    color: #0f172a;
    font-weight: 800;
    font-size: 18px;
}
.logo-mark--img {
    width: 70px;
    height: 70px;
    background: url('/images/transparent-kessa-logo.svg') center / contain no-repeat;
    border-radius: 10px;
}

.sidebar-primary__nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-primary__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 60px;
    border-radius: 12px;
    color: #94a3b8;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    gap: 4px;
}

.sidebar-primary__item:hover {
    background-color: rgba(148, 163, 184, 0.2);
    color: #f9fafb;
}

.sidebar-primary__item.active {
    position: relative;
    background-color: transparent;
    color: #1e90ff;
}

.sidebar-primary__item.active::after {
    content: "";
    position: absolute;
    right: -12px;
    top: 12px;
    height: calc(100% - 24px);
    width: 3px;
    border-radius: 2px;
    background-color: #1e90ff;
}

.sidebar-primary__label {
    font-size: 10px;
    line-height: 1;
}

/* Secondary sidebar (nav with labels) */
.sidebar-secondary {
    width: 220px;
    background: radial-gradient(circle at top, #020617 0, #020617 40%, #020617 100%);
    padding: 0 12px 16px 12px;
    position: relative;
    box-sizing: border-box;
}

.sidebar-secondary::after {
    content: "";
    position: absolute;
    right: 0;
    top: calc(67px + 16px); /* start just below the slogan block */
    bottom: 0;
    width: 1px;
    background-color: rgba(148, 163, 184, 0.2);
    pointer-events: none;
}

.sidebar-secondary__section {
    margin-bottom: 24px;
}

.sidebar-secondary__slogan {
    margin: 0 -12px 16px -12px; /* extend to sidebar edges at the top */
    padding: 0 16px;
    min-height: 67px;
    display: flex;
    align-items: center;
    background-color: rgba(15, 23, 42, 0.9); /* match header feel */
    color: #8da2c2;
    font-size: 12px;
    line-height: 1.6;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.sidebar-secondary__slogan-text {
    display: block;
    width: 100%;
    text-align: center;
}

.sidebar-secondary__section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 8px;
}

.sidebar-secondary__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #cbd5f5;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.15s ease, color 0.15s ease;
    position: relative;
}

.sidebar-secondary__link:hover {
    background-color: rgba(148, 163, 184, 0.15);
    color: #f9fafb;
}

.sidebar-secondary__link.active {
    background: transparent;
    color: #1e90ff;
}

.sidebar-secondary__link.active::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 10px;
    height: calc(100% - 20px);
    width: 3px;
    border-radius: 2px;
    background-color: #1e90ff;
}

/* Main area */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top, #0b1120 0, #020617 50%, #020617 100%);
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(12px);
    background-color: rgba(15, 23, 42, 0.85);
    box-sizing: border-box;
}

.app-header__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.app-header__subtitle {
    font-size: 12px;
    color: #64748b;
    margin-left: 8px;
}

.app-header__left {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.app-header__right {
    display: flex;
    align-items: center;
}

/* User pill */
.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background-color: rgba(15, 23, 42, 0.9);
    font-size: 13px;
    color: #e5e7eb;
}

.user-pill__name {
    font-weight: 600;
}

.user-pill__logout {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    color: #cbd5f5;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.04);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    font-weight: 600;
}

.user-pill__logout:hover {
    background-color: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.6);
    color: #f9fafb;
}

.user-pill {
    gap: 8px;
    padding: 6px 12px;
}

/* Content area */
.app-content {
    padding: 20px 24px;
    box-sizing: border-box;
}

.content-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 16px;
    max-width: 900px;
}

.content-card h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

/* Lucide icon base */
.nav-icon {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
    vertical-align: middle;
}

/* LOGIN CARD (for landing page) */
.kessa-card {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    padding: 28px;
    border-radius: 10px;
    width: 360px;
    box-shadow: 0 0 15px rgba(0,0,0,0.25);
    margin-top: 40px;
}

.kessa-card h2 {
    margin-bottom: 16px;
    font-size: 1.4rem;
}

.kessa-input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #0a1120;
    color: #fff;
    box-sizing: border-box;
}

.kessa-input:focus {
    outline: none;
    border-color: #64748b;
}

.kessa-btn {
    background-color: #2563eb;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.kessa-btn:hover {
    background-color: #1e4fb8;
}

/* Auth split layout */
.auth-body {
    background: linear-gradient(135deg, #0b1120 0%, #0f172a 50%, #0b1120 100%);
    color: #0b1220;
}

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

.auth-pane {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    box-sizing: border-box;
}

.auth-pane--form {
    background: #f9fafb;
}

.auth-pane--brand {
    background: radial-gradient(circle at top, #0b1120 0, #020617 50%, #020617 100%);
    color: #e5e7eb;
}

.auth-card {
    width: 380px;
}

.auth-links {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.auth-links a {
    color: #2563eb;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    text-align: left;
}

.auth-brand-logo {
    width: clamp(180px, 30vw, 300px);
    height: clamp(180px, 30vw, 300px);
    background: url('/images/transparent-kessa-logo.svg') center / contain no-repeat;
    margin-bottom: clamp(-48px, -10vw, -64px);
}

.auth-brand-title {
    font-size: 24px;
    font-weight: 800;
}

.auth-brand-subtitle {
    font-size: clamp(18px, 3vw, 24px);
    color: #94a3b8;
    margin-top: clamp(-12px, -2vw, 0px);
    line-height: 1.3;
}

/* Utility + content styles */
.card {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.table th,
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid #1e293b;
    text-align: left;
}

.table th {
    color: #cbd5e1;
    font-weight: 600;
}

.table tr:hover td {
    background-color: rgba(148, 163, 184, 0.08);
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.text-danger {
    color: #f87171;
    margin-bottom: 8px;
}

.text-muted {
    color: #94a3b8;
}
