/* RBAC Legal Platform – Retro / Clean / Professional UI */

/* ---------- Root & Typography ---------- */

:root {
    --color-bg-main: #f8f9fa;
    --color-bg-panel: #ffffff;
    --color-bg-sidebar: #f3f4f6;
    --color-border-subtle: rgba(15, 23, 42, 0.08);
    --color-text-main: #212529;
    --color-text-muted: #6c757d;
    --color-accent: #1f355e;
    --color-accent-soft: #e2e8f0;
    --color-danger-soft: #fef2f2;

    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;

    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
    --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.04);

    --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-main);
    color: var(--color-text-main);
}

/* ---------- App Shell ---------- */

.app-shell {
    min-height: 100vh;
    background-color: var(--color-bg-main);
}

.app-sidebar {
    width: 240px;
    background: var(--color-bg-sidebar);
    border-right: 1px solid var(--color-border-subtle);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
}

.app-brand {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.75rem;
}

.app-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-topbar {
    height: 56px;
    background: #ffffff;
    border-bottom: 1px solid var(--color-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: var(--shadow-subtle);
}

.app-content {
    padding: 1.75rem 1.75rem 2.5rem;
}

/* ---------- Sidebar Navigation ---------- */

.app-nav {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 0.95rem;
}

.app-nav-section {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.app-nav-item + .app-nav-item {
    margin-top: 0.25rem;
}

.app-nav-link {
    display: flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--color-text-main);
    text-decoration: none;
    font-weight: 500;
}

.app-nav-link:hover {
    background-color: var(--color-accent-soft);
    text-decoration: none;
}

.app-nav-link span {
    margin-left: 0.35rem;
    font-size: 0.9rem;
}

/* Active state can later be set server-side by adding .is-active */
.app-nav-link.is-active {
    background-color: #ffffff;
    border: 1px solid var(--color-border-subtle);
    box-shadow: var(--shadow-subtle);
}

/* ---------- Topbar ---------- */

.app-topbar-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.app-topbar-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ---------- Panels / Cards ---------- */

.panel {
    background-color: var(--color-bg-panel);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-subtle);
    box-shadow: var(--shadow-soft);
}

.panel-header {
    padding: 1rem 1.25rem 0.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.panel-body {
    padding: 1.25rem;
}

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.text-muted-soft {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ---------- Document Viewer ---------- */

.document-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
}

.document-panel {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-subtle);
    background-color: #ffffff;
    padding: 1.25rem;
    box-shadow: var(--shadow-subtle);
}

.document-panel--summary {
    background-color: #f9fafb;
}

.document-panel-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.document-panel-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.document-panel-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

.document-body {
    font-size: 0.9rem;
    line-height: 1.6;
}

.document-body p {
    margin-bottom: 0.75rem;
}

.document-body pre,
.document-body code {
    font-family: var(--font-mono);
}

/* ---------- Alerts / Notices ---------- */

.notice-strip {
    border-radius: var(--radius-md);
    border: 1px solid rgba(15, 23, 42, 0.12);
    background-color: #fefce8;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #854d0e;
    margin-bottom: 1.25rem;
}

/* ---------- Auth Pages ---------- */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #e2e8f0 0, #f8fafc 40%, #f8f9fa 100%);
}

.auth-card {
    max-width: 380px;
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-subtle);
    background-color: #ffffff;
    box-shadow: var(--shadow-soft);
}

.auth-card-header {
    padding: 1.5rem 1.75rem 0.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.auth-card-body {
    padding: 1.25rem 1.75rem 1.75rem;
}

.auth-brand {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.auth-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ---------- Dashboard ---------- */

.dashboard-intro-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.dashboard-intro-text {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    max-width: 560px;
}

.dashboard-cards {
    margin-top: 1.5rem;
}

.dashboard-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-subtle);
    background-color: #ffffff;
    box-shadow: var(--shadow-subtle);
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
}

.dashboard-card-title {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.dashboard-card-text {
    font-size: 0.86rem;
    color: var(--color-text-muted);
}

/* ---------- Utilities ---------- */

.small-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}
