:root {
    --sidebar-width: 280px;
    --surface: #ffffff;
    --muted: #6c757d;
    --border: #e9ecef;
    --bg: #f5f7fb;
    --accent: #1d4ed8;
}

body {
    background: var(--bg);
    color: #1f2937;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: #101827;
    color: #fff;
    padding: 1.25rem;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #2563eb;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.25rem;
}

.brand span {
    display: block;
    color: #9ca3af;
    font-size: .8rem;
}

.sidebar-nav .nav-link {
    color: #d1d5db;
    border-radius: 12px;
    padding: .7rem .9rem;
    margin-bottom: .2rem;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.sidebar-section {
    color: #9ca3af;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 1.25rem .9rem .5rem;
}

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 1.5rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.page-title {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: 0 12px 35px rgba(15,23,42,.05);
}

.metric-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    background: #fff;
}

.metric-card small {
    color: var(--muted);
}

.metric-card strong {
    display: block;
    font-size: 1.8rem;
}

.table-actions {
    white-space: nowrap;
}

.form-section-title {
    font-weight: 700;
    margin-bottom: .75rem;
}

@media (max-width: 992px) {
    .sidebar { position: static; width: 100%; }
    .app-shell { display: block; }
    .main-content { margin-left: 0; width: 100%; }
}

.case-header {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.case-section {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    background: #fff;
}

.case-section h5 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.timeline-list {
    position: relative;
    padding-left: 1.5rem;
}

.timeline-list::before {
    content: "";
    position: absolute;
    left: .44rem;
    top: .5rem;
    bottom: .5rem;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 1rem;
}

.timeline-dot {
    position: absolute;
    left: -1.35rem;
    top: .4rem;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px #eff6ff;
}

.timeline-content {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: .85rem 1rem;
    background: #fff;
}

.note-card {
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 16px;
    padding: 1rem;
    background: #fff;
}

.document-preview-frame {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fafc;
    padding: 1rem;
    min-height: 70vh;
}

.document-preview-frame iframe {
    width: 100%;
    min-height: 70vh;
    border: 0;
    border-radius: 14px;
    background: #fff;
}

.dashboard-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: .75rem;
    color: inherit;
    text-decoration: none;
    background: #fff;
}

.dashboard-item:hover {
    border-color: #bfdbfe;
    background: #f8fafc;
}

.dashboard-item span {
    font-size: .85rem;
    color: var(--muted);
    white-space: nowrap;
}
