:root {
    --accent: #0f766e;
    --accent-strong: #0b5f58;
    --accent-soft: #def3ef;
    --ink: #1f2f46;
    --ink-soft: #5d6b7d;
    --line: #d5dfeb;
    --paper: #ffffff;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
}

body.app-body {
    font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
    color: var(--ink);
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand span {
    font-family: "Source Serif 4", Georgia, serif;
}

.bg-soft {
    background:
        radial-gradient(circle at 2% 2%, rgba(255, 237, 209, 0.8), transparent 30%),
        radial-gradient(circle at 95% 15%, rgba(219, 243, 238, 0.8), transparent 28%),
        linear-gradient(180deg, #f7fbff 0%, #f3f9ff 100%);
}

.login-bg {
    background:
        radial-gradient(circle at 90% 10%, rgba(229, 248, 242, 0.92), transparent 35%),
        linear-gradient(145deg, #f7fbff 0%, #fff6ee 100%);
}

.app-bg-solid {
    background: var(--app-bg-color, #f3f9ff);
}

.app-bg-image {
    background-color: #eef3f8;
    background-image: var(--app-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.app-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(213, 223, 235, 0.8);
    box-shadow: 0 6px 24px rgba(31, 47, 70, 0.08);
}

.app-nav .nav-link {
    font-weight: 600;
    color: #2c3e57;
    border-radius: 0.55rem;
    padding-inline: 0.75rem;
}

.app-nav .nav-link:hover,
.app-nav .nav-link:focus {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.nav-user-photo {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(15, 118, 110, 0.25);
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.15);
}

.nav-menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 0.7rem;
    border: 1px solid rgba(15, 118, 110, 0.28);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-menu-toggle:hover,
.nav-menu-toggle:focus {
    background: #f4fbf9;
    border-color: rgba(15, 118, 110, 0.55);
}

.users-actions-menu {
    width: 36px;
    height: 36px;
    padding: 0;
}

.menu-bars {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #244464;
    position: relative;
}

.menu-bars::before,
.menu-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #244464;
}

.menu-bars::before {
    top: -6px;
}

.menu-bars::after {
    top: 6px;
}

.app-menu-panel {
    width: min(360px, 92vw);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-left: 1px solid rgba(213, 223, 235, 0.95);
}

.menu-user-head {
    padding: 0.75rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(203, 216, 230, 0.95);
    background: linear-gradient(130deg, #ffffff 0%, #f6fbff 100%);
}

.menu-user-photo {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(15, 118, 110, 0.22);
}

.menu-group-title {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #607086;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.menu-link {
    display: block;
    text-decoration: none;
    color: #1f3857;
    font-weight: 600;
    padding: 0.6rem 0.7rem;
    border-radius: 0.65rem;
}

.menu-link:hover,
.menu-link:focus {
    color: #0b5f58;
    background: #eaf7f4;
}

.page-shell {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 26px rgba(20, 45, 73, 0.08);
    padding: 1rem;
}

.page-head {
    border-bottom: 1px solid rgba(213, 223, 235, 0.9);
    padding-bottom: 0.75rem;
}

.eyebrow {
    margin: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    font-weight: 800;
}

.form-shell {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
}

.login-card {
    width: 100%;
    max-width: 430px;
    border-radius: var(--radius-xl);
}

.brand-logo,
.login-logo,
.preview-logo {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 0.7rem;
    border: 1px solid rgba(15, 118, 110, 0.2);
    box-shadow: 0 6px 18px rgba(15, 118, 110, 0.16);
}

.login-logo {
    width: 76px;
    height: 76px;
    border-radius: 0.85rem;
}

.preview-logo {
    width: 90px;
    height: 90px;
}

.logo-fallback {
    width: 42px;
    height: 42px;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.card-user {
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid var(--line);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-user:hover {
    transform: translateY(-3px);
    box-shadow: 0 1rem 1.7rem rgba(22, 50, 79, 0.13) !important;
}

.selectable-user-card {
    cursor: pointer;
}

.selectable-user-card.is-selected {
    border-color: rgba(13, 110, 253, 0.7) !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15) !important;
    background: rgba(13, 110, 253, 0.04);
}

.selectable-user-card .user-card-select {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

.user-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 999px;
    flex-shrink: 0;
    border: 3px solid #e7f3f0;
}

.user-photo-preview {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 0.8rem;
    border: 2px solid #d7e2f0;
    box-shadow: 0 6px 14px rgba(22, 50, 79, 0.12);
}

.cropper-wrap {
    width: 100%;
    min-height: 320px;
    background: #f4f7fb;
    border-radius: 0.75rem;
    overflow: hidden;
}

.cropper-image {
    display: block;
    max-width: 100%;
}

.user-pills {
    gap: 0.5rem;
}

.user-pills .nav-link {
    border-radius: 999px;
    font-weight: 700;
    color: #315070;
    border: 1px solid #ced8e8;
    background: #fff;
}

.user-pills .nav-link:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.user-pills .nav-link.active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.yn-toggle .btn {
    min-width: 64px;
    border-radius: 0.65rem;
    font-weight: 700;
}

.yn-toggle .btn + .btn {
    margin-left: 0.35rem;
}

.yn-toggle .btn-check:checked + .btn-outline-success {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.yn-toggle .yn-no {
    border-color: #8a95a3;
    color: #5f6c7a;
    background: #fff;
}

.yn-toggle .yn-no:hover,
.yn-toggle .yn-no:focus {
    border-color: #6f7b89;
    color: #465362;
    background: #f1f4f7;
}

.is-invalid-group {
    padding: 0.35rem;
    border: 1px solid #dc3545;
    border-radius: 0.7rem;
}

.signature-canvas.is-invalid {
    border: 2px solid #dc3545;
}

.yn-toggle .btn-check:checked + .yn-no {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.yn-toggle .btn-check:focus + .yn-no,
.yn-toggle .btn-check:focus + .yn-yes {
    box-shadow: 0 0 0 0.18rem rgba(108, 117, 125, 0.22);
}

.tab-nav {
    border-top: 1px solid rgba(213, 223, 235, 0.8);
    padding-top: 1rem;
}

.form-control,
.form-select {
    border: 1px solid #c7d4e6;
    border-radius: 0.7rem;
    min-height: 2.7rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(15, 118, 110, 0.6);
    box-shadow: 0 0 0 0.22rem rgba(15, 118, 110, 0.16);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.signature-canvas {
    width: 100%;
    max-width: 100%;
    border: 2px dashed #9eb6cf;
    border-radius: 0.8rem;
    touch-action: none;
    background: var(--paper);
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

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

.table thead th {
    color: #385272;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.alert {
    border-radius: 0.85rem;
}

@media (min-width: 768px) {
    .page-shell {
        padding: 1.4rem;
    }

    .user-thumb {
        width: 88px;
        height: 88px;
    }
}
