body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #0f172a;
}

body.bg-light-subtle {
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

body.sidebar-open {
    overflow: hidden;
}

.bg-auth {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.auth-card,
.card-soft {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

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

.sidebar {
    width: 296px;
    background: linear-gradient(180deg, #0f172a 0%, #111c37 100%);
    color: #fff;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1045;
    overflow-y: auto;
    padding-bottom: 1.25rem;
    border-right: 1px solid rgba(148, 163, 184, 0.12);
}

.sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand h5 {
    letter-spacing: 0.02em;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    border-radius: 0.85rem;
    padding: 0.8rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.28), rgba(59, 130, 246, 0.12));
    color: #fff;
    transform: translateX(2px);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1040;
}

.content-wrap {
    flex: 1;
    min-width: 0;
    margin-left: 296px;
}

.app-topbar {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.navbar-brand {
    font-size: 1.15rem;
}

.topbar-avatar {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #0f172a);
    color: #fff;
    font-weight: 700;
}

.stats-card {
    border: 0;
    border-radius: 1rem;
    color: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.signature-pad {
    border: 2px dashed #cbd5e1;
    border-radius: 0.75rem;
    width: 100%;
    height: 180px;
    background: #fff;
    cursor: crosshair;
}

.table-responsive {
    border-radius: 1rem;
}

.table {
    --bs-table-bg: transparent;
}

.table> :not(caption)>*>* {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.form-control,
.form-select {
    border-radius: 0.9rem;
    border-color: #d6deea;
    min-height: 48px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.18);
}

.btn {
    border-radius: 0.9rem;
    font-weight: 600;
}

.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    background: #fff;
}

.pdf-table td,
.pdf-table th {
    font-size: 10px;
    padding: 4px;
    vertical-align: top;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .content-wrap {
        margin-left: 0;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .app-topbar .navbar-brand {
        font-size: 1rem;
    }
}

@media (min-width: 992px) {
    .sidebar-backdrop {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .sidebar {
        width: min(88vw, 296px);
    }

    main.container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
