:root {
    --primary: #2c7be5;
    --primary-600: #2362b7;
    --color-open: #222e3c;
    --color-open-rgb: 34, 46, 60;
    --success: #00d27a;
    --info: #27bcfd;
    --warning: #f5803e;
    --danger: #e63757;
    --body-bg: #edf2f9;
    --surface: #ffffff;
    --surface-2: #f9fafd;
    --border: #d8e2ef;
    --text: #344050;
    --muted: #5e6e82;
    --sidebar-bg: #f9fafd;
    --sidebar-border: #e1e9f4;
    --sidebar-text: #5e6e82;
    --shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    --radius: 8px;
    --radius-sm: 4px;
    --theme-toggle-bg: rgba(245, 128, 62, 0.18);
    --theme-toggle-color: #f5803e;
    --font-poppins: "Poppins", system-ui, -apple-system, sans-serif;
}

[data-bs-theme="dark"] {
    --body-bg: #0b1727;
    --surface: #121e2d;
    --surface-2: #162231;
    --border: rgba(255, 255, 255, 0.08);
    --text: #d8e2ef;
    --muted: #9da9bb;
    --sidebar-bg: #0f1b2b;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-text: #8a9ab5;
    --shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
    --theme-toggle-bg: rgba(123, 97, 255, 0.18);
    --theme-toggle-color: #b9a6ff;
}

body.app-body {
    background: var(--body-bg);
    font-family: "Open Sans", system-ui, -apple-system, sans-serif;
    color: var(--muted);
    letter-spacing: 0.002em;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.page-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-family: "Poppins", system-ui, -apple-system, sans-serif;
    font-weight: 500;
    line-height: 1.2;
    color: var(--text);
}

h1,
.h1 {
    font-size: calc(1.373832rem + 1.485984vw);
}

@media (min-width: 1200px) {

    h1,
    .h1 {
        font-size: 2.48832rem;
    }
}

h2,
.h2 {
    font-size: calc(1.33236rem + 0.98832vw);
}

@media (min-width: 1200px) {

    h2,
    .h2 {
        font-size: 2.0736rem;
    }
}

h3,
.h3 {
    font-size: calc(1.2978rem + 0.5736vw);
}

@media (min-width: 1200px) {

    h3,
    .h3 {
        font-size: 1.728rem;
    }
}

h4,
.h4 {
    font-size: calc(1.269rem + 0.228vw);
}

@media (min-width: 1200px) {

    h4,
    .h4 {
        font-size: 1.44rem;
    }
}

h5,
.h5 {
    font-size: 1.2rem;
}

h6,
.h6 {
    font-size: 0.8333333333rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.app-sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    padding: 18px 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: "Poppins", system-ui, -apple-system, sans-serif;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text);
    font-size: 1.02rem;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #4ea1ff, #2c7be5);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
}

.sidebar-logo-image {
    max-width: 170px;
    max-height: 42px;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 1400px) {
    .sidebar-logo-image {
        max-width: 148px;
        max-height: 36px;
    }
}

@media (max-width: 1200px) {
    .sidebar-logo-image {
        max-width: 132px;
        max-height: 32px;
    }
}

.sidebar-section-title {
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: var(--sidebar-text-muted, #9da9bb);
    margin: 10px 0 6px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--sidebar-text, #5e6e82);
    text-decoration: none;
    font-size: 0.9rem;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--body-bg, #edf2f9);
    color: var(--text, #344050);
}

.config-tabs {
    border-bottom: 0;
    gap: 10px;
    flex-wrap: wrap;
}

.config-tabs .nav-link {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    transition: all 0.2s ease;
}

.config-tabs .nav-link:hover {
    color: var(--text);
    border-color: rgba(44, 123, 229, 0.35);
    transform: translateY(-1px);
}

.config-tabs .nav-link.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #2c7be5, #4ea1ff);
    box-shadow: 0 10px 20px rgba(44, 123, 229, 0.35);
}

.proposals-config-page .btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
}

.proposals-config-page .form-control,
.proposals-config-page .form-select {
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

.proposals-config-page .form-check-input {
    width: 0.95rem;
    height: 0.95rem;
}

.proposals-config-page .form-label,
.proposals-config-page .form-check-label {
    font-size: 0.85rem;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    color: var(--text);
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text);
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--muted);
}

[data-bs-theme="dark"] .select2-container--default .select2-search--inline .select2-search__field {
    color: var(--text);
}

[data-bs-theme="dark"] .select2-container--default .select2-dropdown {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option {
    color: var(--text);
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: rgba(44, 123, 229, 0.25);
    color: #fff;
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.sidebar-link i {
    font-size: 1rem;
    color: #94a3b8;
}

.sidebar-link__text {
    white-space: nowrap;
}

.sidebar-collapsed .app-shell {
    grid-template-columns: 78px 1fr;
}

.sidebar-collapsed .sidebar-header>div:last-child,
.sidebar-collapsed .sidebar-section-title,
.sidebar-collapsed .sidebar-link__text {
    display: none;
}

.sidebar-collapsed .sidebar-logo-image {
    display: none;
}

.sidebar-collapsed .app-sidebar {
    padding-left: 14px;
    padding-right: 14px;
}

.sidebar-collapsed .sidebar-link {
    justify-content: center;
}

.sidebar-open .app-sidebar {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1040;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
}

.sidebar-open .app-main {
    opacity: 0.65;
    pointer-events: none;
}

.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

.app-header {
    height: 62px;
    padding: 0 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    overflow: visible;
}


/* Cropper modal tweaks */
.cropper-container {
    max-width: 100%;
}

#avatarCropImage {
    max-width: 100%;
    min-height: 380px;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-topbar {
    padding: 8px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-wrap: wrap;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.app-clock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    color: var(--text);
}

.app-clock i {
    color: var(--primary);
}

.app-clock__text {
    font-weight: 600;
}

.app-clock__divider,
.app-clock__location {
    color: var(--muted);
    font-weight: 500;
}

.shortcut-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--muted);
}

.shortcut-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.78rem;
}

.shortcut-link:hover {
    color: var(--primary);
}

.shortcut-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 6px;
    font-size: 0.66rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 600;
}

.btn-icon {
    border: 1px solid var(--border);
    background: var(--surface);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    color: #5e6e82;
}

.btn-icon.dropdown-toggle {
    position: relative;
}

.btn-icon-badge {
    position: absolute;
    top: -12px;
    right: -10px;
    min-width: 18px;
    min-height: 18px;
    padding: 4px 6px;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    line-height: 10px;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--surface);
}

.btn-theme {
    background: var(--theme-toggle-bg);
    border-color: transparent;
    color: var(--theme-toggle-color);
}

.btn-theme:hover {
    filter: brightness(0.98);
}

.btn-loading {
    position: relative;
    overflow: hidden;
    pointer-events: none;
    background: var(--color-open) !important;
    border-color: var(--color-open) !important;
    color: #fff !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: btn-shimmer 1.4s ease-in-out infinite;
}

.btn-loading span {
    position: relative;
    z-index: 1;
}

@keyframes btn-shimmer {
    0% {
        left: -50%;
    }

    100% {
        left: 110%;
    }
}

.password-strength {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.85rem;
    color: #64748b;
    font-size: 0.78rem;
}

.password-rule {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.password-rule .rule-icon {
    font-size: 0.95rem;
    color: #0f172a;
    opacity: 0.85;
}

.password-rule.is-valid {
    color: #16a34a;
}

.password-rule.is-valid .rule-icon {
    color: #16a34a;
    opacity: 1;
}

.password-rule.is-invalid {
    color: #64748b;
}

.user-list-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-list-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.user-list-avatar--placeholder {
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.user-list-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.user-list-email {
    font-size: 0.7rem;
    color: #3b82f6;
    margin-top: -5px;
}

.user-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.user-profile-avatar--placeholder {
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
}

.user-profile-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: 24px;
}

.user-profile-layout--single {
    grid-template-columns: 1fr;
}

.user-profile-card {
    overflow: hidden;
}

.user-profile-cover {
    height: 110px;
    background: linear-gradient(120deg, rgba(44, 123, 229, 0.4), rgba(39, 188, 253, 0.35));
}

.user-profile-main {
    padding: 0 24px 24px;
    text-align: center;
}

.user-profile-avatar-wrapper {
    margin-top: -60px;
    display: flex;
    justify-content: center;
    position: relative;
}

.user-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.user-profile-avatar--placeholder {
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.avatar-camera-wrapper {
    position: absolute;
    margin-left: 80px;
    bottom: 2px;
}

.avatar-file-input {
    display: none;
}

.avatar-camera-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.avatar-camera-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

.user-profile-name {
    margin-top: 12px;
    margin-bottom: 0px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-poppins);
}

.user-profile-role {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0px;
}

.user-profile-meta {
    span {
        font-size: 1rem;
        margin-top: 20px;
        margin-bottom: 0px;
        line-height: 1rem;
    }

    strong {
        font-size: 1rem;
    }
}

.autocomplete-wrapper {
    position: relative;
}

.autocomplete-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 6px;
    display: none;
    z-index: 1050;
}

.autocomplete-menu.is-open {
    display: block;
}

.autocomplete-option {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
}

.autocomplete-option:hover,
.autocomplete-option.is-active {
    background: var(--surface-2);
    color: var(--text);
}

.autocomplete-option.is-hidden {
    display: none;
}

.autocomplete-empty {
    padding: 8px 10px;
    font-size: 0.82rem;
    color: var(--muted);
    display: none;
}

.autocomplete-empty.is-visible {
    display: block;
}

.user-profile-meta {
    display: grid;
    gap: 12px;
    text-align: left;
}

.user-profile-meta>div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.82rem;
    color: var(--text);
}

.user-profile-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-profile-section .card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.role-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.role-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.role-check input {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid var(--border);
    background: var(--surface);
    display: grid;
    place-items: center;
    transition: border-color 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.role-check input::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: transparent;
}

.role-check input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.role-check input:checked::after {
    background: #fff;
}

.role-check input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.user-section-title {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eef2ff;
    display: grid;
    place-items: center;
    color: #4f46e5;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.activity-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.activity-row .activity-title {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.9rem;
}

.activity-subject {
    font-weight: 400;
    color: #0f172a;
}

.activity-subtitle {
    color: #475569;
    font-size: 0.8rem;
}

.activity-meta {
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

.activity-time {
    color: #94a3b8;
    font-size: 0.72rem;
    margin-top: -5px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.82rem;
    border: 1px solid transparent;
}

.status-success {
    background: #d9f8eb;
    color: #00894f;
    border-color: #d9f8eb;
}

.status-muted {
    background: #e6e8ec;
    color: #5d6776;
    border-color: #e6e8ec;
}

.status-warning {
    background: #fde6d8;
    color: #ac5a2b;
    border-color: #fde6d8;
}

.status-danger {
    background: #fbdbe1;
    color: #b82c46;
    border-color: #fbdbe1;
}

.status-info {
    background: #d8f3ff;
    color: #197aa4;
    border-color: #d8f3ff;
}

.status-primary {
    background: #d9e7fa;
    color: #215cac;
    border-color: #d9e7fa;
}

.status-dark {
    background: #08101b;
    color: #91979e;
    border-color: #08101b;
}

.dataTable tbody {
    font-size: 0.8rem;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 16px;
    padding-top: 4px;
}

.dataTables_wrapper .dataTables_paginate .pagination {
    gap: 8px;
}

.dataTables_wrapper .dataTables_paginate .page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    transition: all 0.15s ease;
}

.dataTables_wrapper .dataTables_paginate .page-item .page-link {
    border: none !important;
    background: transparent !important;
    color: #475569 !important;
    font-weight: 700;
    padding: 5px 8px;
    border-radius: 999px;
    box-shadow: none !important;
    line-height: 0.95;
    font-size: .9rem;
    font-weight: 700;
}


.dataTables_wrapper .dataTables_paginate .page-item:not(.previous):not(.next) .page-link {
    text-align: center;
}

.dataTables_wrapper .dataTables_paginate .page-item:hover:not(.active):not(.disabled) {
    background: #eef2f7;
    border-color: #dfe5ee;
}

.dataTables_wrapper .dataTables_paginate .page-item.active {
    background: linear-gradient(135deg, #1e90ff, #2979ff);
    border-color: transparent;
    box-shadow: none;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .page-item.disabled,
.dataTables_wrapper .dataTables_paginate .page-item.disabled:hover {
    background: #f9fafb;
    color: #cbd5e1;
    border-color: #eef2f7;
    box-shadow: none;
}

.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
    color: #cbd5e1 !important;
    cursor: not-allowed;
}

.dataTables_info {
    font-size: 0.82rem;
    color: var(--muted);
}

@media (max-width: 992px) {
    .user-profile-layout {
        grid-template-columns: 1fr;
    }
}


.btn-avatar {
    border: 1px solid var(--border);
    background: var(--surface);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding: 0;
    overflow: hidden;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--text);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.avatar-color-1 {
    background: #2c7be5;
}

.avatar-color-2 {
    background: #00d27a;
}

.avatar-color-3 {
    background: #f5803e;
}

.avatar-color-4 {
    background: #6b5eae;
}

.avatar-color-5 {
    background: #27bcfd;
}

.avatar-color-6 {
    background: #e63757;
}

.team-role-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
}

.team-role-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
}

.team-member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.team-member-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.team-member-label {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text);
}

.team-member-card.is-required {
    border-color: rgba(230, 55, 87, 0.5);
    box-shadow: 0 0 0 1px rgba(230, 55, 87, 0.15);
}

.team-detail-card {
    min-height: 100%;
}

.team-detail-members {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.team-detail-member {
    flex: 0 0 calc((100% - 20px) / 3);
    max-width: calc((100% - 20px) / 3);
}

@media (max-width: 992px) {
    .team-detail-member {
        flex: 0 0 calc((100% - 10px) / 2);
        max-width: calc((100% - 10px) / 2);
    }
}

@media (max-width: 576px) {
    .team-detail-member {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.team-detail-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
}

.team-detail-roles {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-detail-roles.has-lean {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-version-members {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.team-version-member {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--text);
}

.select2-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.select2-option-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.teams-config .nav-tabs .nav-link {
    font-weight: 600;
    border-radius: 10px 10px 0 0;
}

.teams-config .teams-type-card {
    background: var(--surface);
}

.teams-config-badge {
    font-weight: 600;
}

.teams-visibility-form {
    background: var(--surface-2);
}

.teams-visibility-form .form-text {
    color: var(--text-muted);
}

.teams-config .table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

@media (max-width: 992px) {

    .team-detail-roles,
    .team-detail-roles.has-lean {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {

    .team-detail-roles,
    .team-detail-roles.has-lean {
        grid-template-columns: 1fr;
    }
}

.team-detail-member-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    background: var(--surface);
}

.team-row.is-selected {
    background: rgba(44, 123, 229, 0.08);
}

.team-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(44, 123, 229, 0.12);
    display: grid;
    place-items: center;
    color: var(--primary);
    font-size: 1.2rem;
}

.team-filter {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px 10px;
    min-width: 300px;
}

.team-filter i {
    color: var(--muted);
}

.team-filter .form-control {
    border: none;
    background: transparent;
    padding: 0;
    height: auto;
    font-size: 0.85rem;
}

.autocomplete-menu {
    position: absolute;
    z-index: 1050;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 6px;
    display: none;
}

.autocomplete-menu.show {
    display: block;
}

.autocomplete-item {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    text-align: left;
    color: var(--text);
    font-size: 0.85rem;
}

.autocomplete-item:hover,
.autocomplete-item:focus {
    background: var(--surface-2);
    outline: none;
}

.autocomplete-item .autocomplete-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: var(--surface-2);
    flex: 0 0 28px;
}

.autocomplete-item .autocomplete-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.autocomplete-wrapper {
    position: relative;
}

.app-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 16px;
    min-width: 260px;
    color: var(--muted);
    position: relative;
}

.app-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.88rem;
    color: var(--text);
}

/* ── Search autocomplete dropdown ─────────────────────────────── */
.search-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 360px;
    max-width: 480px;
    width: max-content;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    z-index: 9999;
    max-height: 420px;
    overflow-y: auto;
    padding: 8px 0;
}

.search-group-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 4px;
}

.search-group-header:first-child { margin-top: 0; }

.search-group-header i {
    font-size: 0.75rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.875rem;
    transition: background .13s;
    cursor: pointer;
}

.search-result-item:hover,
.search-result-item--active {
    background: var(--surface-2);
    text-decoration: none;
    color: var(--text);
}

.search-result-item--active .search-result-label {
    color: var(--primary, #0d6efd);
}

.search-no-results {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    color: var(--muted);
    font-size: 0.85rem;
}

.search-no-results i {
    font-size: 1rem;
    opacity: .5;
}

.search-result-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.search-result-icon--proposal { background: #e8f0fe; color: #174ea6; }
.search-result-icon--team     { background: #e6f4ea; color: #137333; }
.search-result-icon--user     { background: #fce8e6; color: #a50e0e; }

.search-result-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.search-result-label {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.search-result-meta {
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Divider between groups */
.search-group-header + .search-group-header {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 6px;
}

.app-header .dropdown-toggle::after {
    display: none;
}

.dropdown-panel {
    min-width: 280px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface);
}

.dropdown-panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: var(--surface);
}

.dropdown-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.dropdown-subtitle {
    font-size: 0.76rem;
    color: var(--muted);
}

.dropdown-action {
    font-size: 0.72rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.dropdown-panel-body {
    padding: 12px 16px;
}

.dropdown-panel-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.dropdown-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.86rem;
}

.dropdown-link:hover {
    color: var(--primary);
}

.dropdown-notifications {
    min-width: 360px;
}

.notification-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 10px 0;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
}

.notification-primary {
    background: rgba(44, 123, 229, 0.9);
}

.notification-warning {
    background: rgba(245, 128, 62, 0.9);
}

.notification-info {
    background: rgba(39, 188, 253, 0.9);
}

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.86rem;
}

.notification-text {
    font-size: 0.76rem;
    color: var(--muted);
}

.notification-time {
    font-size: 0.7rem;
    color: var(--muted);
    white-space: nowrap;
}

.dropdown-shortcuts {
    min-width: 320px;
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.shortcut-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 10px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 0.72rem;
    text-align: center;
    transition: all 0.2s ease;
}

.shortcut-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.shortcut-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    color: var(--primary);
    font-size: 1rem;
}

.shortcut-label {
    font-size: 0.72rem;
}

.shortcut-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    background: var(--text);
    color: #fff;
    font-size: 0.62rem;
    padding: 2px 6px;
    border-radius: 999px;
}

.dropdown-user {
    min-width: 320px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.user-name {
    font-weight: 600;
    color: var(--text);
}

.user-role {
    font-size: 0.76rem;
    color: var(--muted);
}

.user-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dropdown-links {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.app-content {
    padding: 24px 26px 32px;
    font-size: .875rem;
    flex: 1 1 auto;

    label {
        font-size: .775rem;
    }
}

.app-footer {
    padding: 14px 26px 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.78rem;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer-owner-logo {
    max-width: 220px;
    max-height: 20px;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 1400px) {
    .footer-owner-logo {
        max-width: 180px;
        max-height: 18px;
    }
}

@media (max-width: 1200px) {
    .footer-owner-logo {
        max-width: 150px;
        max-height: 16px;
    }
}

@media (max-width: 992px) {
    .app-footer {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .footer-owner-logo {
        max-width: 128px;
        max-height: 14px;
    }
}

.page-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0px;
}

.page-subtitle {
    color: #748194;
    font-size: .8rem;
    margin-bottom: 5px;
}

.card-soft {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.image-preview {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    min-height: 180px;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 240px;
}

.image-preview__placeholder {
    color: var(--muted);
    font-size: 0.85rem;
}

.image-preview--favicon {
    min-height: 120px;
}

.template-preview {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--surface-2);
    font-size: 0.85rem;
    color: var(--muted);
}

.template-preview__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 6px;
}

.template-preview__content {
    color: var(--muted);
    line-height: 1.5;
}

.template-preview--full {
    min-height: 300px;
}

.template-preview__frame {
    width: 100%;
    height: 240px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.template-textarea {
    min-height: 260px;
    font-family: "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.82rem;
}

.card-soft:hover {
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.12);
}

.payments-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

.payments-toolbar__months {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.payments-toolbar__label {
    flex: 0 0 auto;
}

.payments-toolbar__scroll {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    padding-bottom: 2px;
}

.payments-toolbar__chips {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.payments-toolbar__status {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.payments-toolbar__chips--status {
    justify-content: flex-end;
}

.payments-selection-stat {
    background: rgba(44, 123, 229, 0.06);
    border: 1px solid rgba(44, 123, 229, 0.12);
    border-radius: 10px;
    padding: 12px 14px;
    height: 100%;
}

.payments-selection-stat__value {
    font-family: "Poppins", system-ui, -apple-system, sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
}

.payments-selection-stat__label {
    margin-top: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.payments-accordion__button {
    padding: 0.85rem 1rem;
}

.payments-accordion__header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.payments-accordion__identity {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.payments-accordion__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.payments-accordion__avatar--placeholder {
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.payments-accordion__meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.payments-accordion__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.payments-accordion__name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.payments-accordion__matricula {
    font-size: 0.82rem;
    color: var(--muted);
}

.payments-accordion__subtitle {
    font-size: 0.78rem;
    line-height: 1.2;
    color: var(--muted);
}

.payments-accordion__details {
    font-size: 0.74rem;
    line-height: 1.2;
    color: var(--muted);
}

.payments-accordion__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: 0.5rem;
}

.payments-accordion__totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.12rem;
    text-align: right;
}

.payments-accordion__total {
    font-size: 0.83rem;
    line-height: 1.15;
}

.payments-accordion__total--pending {
    color: var(--bs-warning-text-emphasis, #946200);
    font-weight: 600;
}

.payments-accordion__total--paid {
    color: var(--bs-success-text-emphasis, #146c43);
}

.payments-accordion__extract {
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    .payments-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .payments-toolbar__months,
    .payments-toolbar__status {
        width: 100%;
    }

    .payments-toolbar__months {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .payments-toolbar__status {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .payments-accordion__button {
        padding-right: 2.75rem;
    }

    .payments-accordion__header {
        align-items: flex-start;
    }

    .payments-accordion__actions {
        align-items: flex-end;
    }
}

@media (max-width: 575.98px) {
    .payments-toolbar__status {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .payments-toolbar__chips--status {
        justify-content: flex-start;
        flex-wrap: wrap;
        white-space: normal;
    }

    .payments-accordion__header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .payments-accordion__actions {
        width: 100%;
        justify-content: space-between;
        margin-right: 0;
    }

    .payments-accordion__totals {
        align-items: flex-start;
        text-align: left;
    }
}

.card-title {
    font-family: "Poppins", system-ui, -apple-system, sans-serif;
    color: var(--text);
    font-weight: 600;
}

.stat-card {
    padding: 16px;
}

.stat-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9da9bb;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: #344050;
}

.stat-badge {
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(44, 123, 229, 0.16);
    color: #215cac;
}

.stat-badge.success {
    background: rgba(0, 210, 122, 0.16);
    color: #00894f;
}

.stat-badge.warning {
    background: rgba(245, 128, 62, 0.18);
    color: #ac5a2b;
}

.stat-badge.info {
    background: rgba(39, 188, 253, 0.18);
    color: #197aa4;
}

.hero-card {
    padding: 20px 22px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chart-placeholder {
    height: 260px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(44, 123, 229, 0.12), rgba(44, 123, 229, 0.03));
    border: 1px dashed #c7d7f1;
    display: grid;
    place-items: center;
    color: var(--muted);
}

.chart-placeholder.vivid {
    background: radial-gradient(circle at 10% 10%, rgba(39, 188, 253, 0.2), transparent 45%),
        radial-gradient(circle at 90% 0%, rgba(0, 210, 122, 0.18), transparent 40%),
        linear-gradient(180deg, rgba(44, 123, 229, 0.12), rgba(44, 123, 229, 0.03));
    border: 1px dashed #b9d7ff;
}

.mini-card {
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    background: #edf2f9;
    color: #748194;
}

.metric-pill.primary {
    background: rgba(44, 123, 229, 0.12);
    color: #2362b7;
}

.metric-pill.success {
    background: rgba(0, 210, 122, 0.12);
    color: #00894f;
}

.progress-line {
    height: 6px;
    border-radius: 999px;
    background: #edf2f9;
    overflow: hidden;
}

.progress-line span {
    display: block;
    height: 100%;
    background: var(--primary);
}

.progress-line.success span {
    background: var(--success);
}

.progress-line.info span {
    background: var(--info);
}

.avatar-group {
    display: flex;
    align-items: center;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #e2e8f0;
    display: inline-block;
    margin-left: -8px;
}

.avatar:first-child {
    margin-left: 0;
}

.divider-vertical {
    width: 1px;
    background: var(--border);
    align-self: stretch;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
}

.btn-success:hover {
    background: #00b96a;
    border-color: #00b96a;
}

.text-primary {
    color: var(--primary) !important;
}

.text-muted {
    color: var(--muted) !important;
}

@media (max-width: 1200px) {
    .app-shell {
        grid-template-columns: 240px 1fr;
    }

    .app-search {
        min-width: 220px;
    }
}

@media (max-width: 992px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        display: none;
    }

    .app-header {
        padding: 0 16px;
    }

    .app-content {
        padding: 20px;
    }

    .app-footer {
        padding: 12px 20px 16px;
    }

    .hero-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .header-left .app-search {
        display: none;
    }

    .page-title {
        font-size: 1.35rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }
}

/* -------------------------------------------------------------------------- */
/*                               Design System                                */
/* -------------------------------------------------------------------------- */

:root {
    --ds-blue: #2c7be5;
    --ds-indigo: #727cf5;
    --ds-purple: #6b5eae;
    --ds-pink: #ff679b;
    --ds-red: #e63757;
    --ds-orange: #fd7e14;
    --ds-yellow: #f5803e;
    --ds-green: #00d27a;
    --ds-teal: #02a8b5;
    --ds-cyan: #27bcfd;
    --ds-gray-100: #f9fafd;
    --ds-gray-200: #edf2f9;
    --ds-gray-300: #d8e2ef;
    --ds-gray-400: #b6c1d2;
    --ds-gray-500: #9da9bb;
    --ds-gray-600: #748194;
    --ds-gray-700: #5e6e82;
    --ds-gray-800: #4d5969;
    --ds-gray-900: #344050;
    --ds-gray-1000: #232e3c;
    --ds-gray-1100: #0b1727;
    --ds-radius-xs: 4px;
    --ds-radius-sm: 6px;
    --ds-radius-md: 10px;
    --ds-radius-lg: 14px;
    --ds-shadow-sm: 0 6px 12px rgba(15, 23, 42, 0.06);
    --ds-shadow-md: 0 10px 20px rgba(15, 23, 42, 0.08);
    --ds-shadow-lg: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.text-blue {
    color: var(--ds-blue) !important;
}

.text-green {
    color: var(--ds-green) !important;
}

.text-orange {
    color: var(--ds-orange) !important;
}

.text-red {
    color: var(--ds-red) !important;
}

.text-gray-700 {
    color: var(--ds-gray-700) !important;
}

.bg-blue-soft {
    background: rgba(44, 123, 229, 0.12) !important;
}

.bg-green-soft {
    background: rgba(0, 210, 122, 0.12) !important;
}

.bg-orange-soft {
    background: rgba(253, 126, 20, 0.12) !important;
}

.bg-red-soft {
    background: rgba(230, 55, 87, 0.12) !important;
}

.bg-gray-100 {
    background: var(--ds-gray-100) !important;
}

.bg-gray-200 {
    background: var(--ds-gray-200) !important;
}

.rounded-xs {
    border-radius: var(--ds-radius-xs) !important;
}

.rounded-sm {
    border-radius: var(--ds-radius-sm) !important;
}

.rounded-md {
    border-radius: var(--ds-radius-md) !important;
}

.rounded-lg {
    border-radius: var(--ds-radius-lg) !important;
}

.shadow-sm {
    box-shadow: var(--ds-shadow-sm) !important;
}

.shadow-md {
    box-shadow: var(--ds-shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--ds-shadow-lg) !important;
}

.shadow-warning {
    box-shadow: 0 0rem 1rem rgba(245, 128, 62, 0.5) !important;
}

/* Typography scale */
.fs-12 {
    font-size: 0.75rem !important;
}

.fs-13 {
    font-size: 0.8125rem !important;
}

.fs-14 {
    font-size: 0.875rem !important;
}

.fs-15 {
    font-size: 0.9375rem !important;
}

.fs-16 {
    font-size: 1rem !important;
}

.fs-18 {
    font-size: 1.125rem !important;
}

.fs-20 {
    font-size: 1.25rem !important;
}

.fs-24 {
    font-size: 1.5rem !important;
}

.fs-28 {
    font-size: 1.75rem !important;
}

/* Buttons */
.btn-soft-primary {
    background: rgba(44, 123, 229, 0.14);
    color: #215cac;
    border: 1px solid rgba(44, 123, 229, 0.2);
}

.btn-soft-success {
    background: rgba(0, 210, 122, 0.14);
    color: #00894f;
    border: 1px solid rgba(0, 210, 122, 0.2);
}

.btn-soft-warning {
    background: rgba(245, 128, 62, 0.16);
    color: #ac5a2b;
    border: 1px solid rgba(245, 128, 62, 0.2);
}

.btn-soft-danger {
    background: rgba(230, 55, 87, 0.14);
    color: #b82c46;
    border: 1px solid rgba(230, 55, 87, 0.2);
}

/* Cards */
.card-compact {
    padding: 14px;
}

.card-header-soft {
    background: var(--ds-gray-100);
    border-bottom: 1px solid var(--ds-gray-300);
    border-top-left-radius: var(--ds-radius-md);
    border-top-right-radius: var(--ds-radius-md);
}

/* Forms */
.form-control,
.form-select {
    border: 1px solid var(--ds-gray-300);
    border-radius: var(--ds-radius-sm);
    font-size: 0.9rem;
    padding: 0.55rem 0.75rem;
    background: #fff;
}

.form-select-sm {
    padding-top: .25rem;
    padding-bottom: .25rem;
    padding-left: .5rem;
    font-size: .8rem;
    border-radius: var(--bs-border-radius-sm);
}

.form-control-sm {
    min-height: calc(1.5em + .5rem + calc(var(--bs-border-width) * 2));
    padding: .25rem .5rem;
    font-size: .8rem;
    border-radius: var(--bs-border-radius-sm);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(44, 123, 229, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(44, 123, 229, 0.12);
}

.form-label {
    font-size: 0.82rem;
    color: var(--ds-gray-700);
    font-weight: 600;
}

.input-group-text {
    background: var(--ds-gray-100);
    border: 1px solid var(--ds-gray-300);
    border-radius: var(--ds-radius-sm);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--muted);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    border-color: rgba(123, 97, 255, 0.6);
    box-shadow: 0 0 0 0.2rem rgba(123, 97, 255, 0.18);
}

[data-bs-theme="dark"] .input-group-text {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--muted);
}

/* Badges */
.badge-soft-primary {
    background: rgba(44, 123, 229, 0.14);
    color: #215cac;
}

.badge-soft-success {
    background: rgba(0, 210, 122, 0.14);
    color: #00894f;
}

.badge-soft-warning {
    background: rgba(245, 128, 62, 0.16);
    color: #ac5a2b;
}

.badge-soft-danger {
    background: rgba(230, 55, 87, 0.14);
    color: #b82c46;
}

/* Alerts */
.alert-soft {
    border: 1px solid var(--ds-gray-300);
    border-radius: var(--ds-radius-md);
    background: var(--ds-gray-100);
}

.alert-soft.primary {
    background: rgba(44, 123, 229, 0.12);
    border-color: rgba(44, 123, 229, 0.2);
}

.alert-soft.success {
    background: rgba(0, 210, 122, 0.12);
    border-color: rgba(0, 210, 122, 0.2);
}

.alert-soft.warning {
    background: rgba(245, 128, 62, 0.14);
    border-color: rgba(245, 128, 62, 0.22);
}

.alert-soft.danger {
    background: rgba(230, 55, 87, 0.12);
    border-color: rgba(230, 55, 87, 0.22);
}

/* Tables */
.table-soft {
    border: 1px solid var(--ds-gray-300);
    border-radius: var(--ds-radius-md);
    overflow: hidden;
}

.table-soft thead {
    background: var(--ds-gray-100);
}

.table-soft th,
.table-soft td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--ds-gray-300);
}

/* Utilities */
.gap-6 {
    gap: 1.5rem !important;
}

.gap-7 {
    gap: 2rem !important;
}

.gap-8 {
    gap: 2.5rem !important;
}

.w-280 {
    width: 280px !important;
}

.w-320 {
    width: 320px !important;
}

.min-h-200 {
    min-height: 200px !important;
}

.min-h-260 {
    min-height: 260px !important;
}

.border-dashed {
    border-style: dashed !important;
}

.border-soft {
    border-color: var(--ds-gray-300) !important;
}

.bg-gradient-blue {
    background: linear-gradient(135deg, rgba(44, 123, 229, 0.12), rgba(39, 188, 253, 0.12));
}

/* Text alignment & transform */
.text-start {
    text-align: left !important;
}

.text-end {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

.text-justify {
    text-align: justify !important;
}

.text-decoration-none {
    text-decoration: none !important;
}

.text-decoration-underline {
    text-decoration: underline !important;
}

.text-decoration-line-through {
    text-decoration: line-through !important;
}

.text-lowercase {
    text-transform: lowercase !important;
}

.text-uppercase {
    text-transform: uppercase !important;
}

.text-capitalize {
    text-transform: capitalize !important;
}

.text-wrap {
    white-space: normal !important;
}

.text-nowrap {
    white-space: nowrap !important;
}

.text-break {
    word-wrap: break-word !important;
    word-break: break-word !important;
}

/* Text colors */
.text-primary {
    color: var(--ds-blue) !important;
}

.text-secondary {
    color: var(--ds-gray-600) !important;
}

.text-success {
    color: var(--ds-green) !important;
}

.text-info {
    color: var(--ds-cyan) !important;
}

.text-warning {
    color: var(--ds-yellow) !important;
}

.text-danger {
    color: var(--ds-red) !important;
}

.text-light {
    color: var(--ds-gray-100) !important;
}

.text-dark {
    color: var(--ds-gray-1100) !important;
}

.text-black {
    color: #000 !important;
}

.text-white {
    color: #fff !important;
}

.text-body {
    color: var(--ds-gray-700) !important;
}

.text-100 {
    color: var(--ds-gray-100) !important;
}

.text-200 {
    color: var(--ds-gray-200) !important;
}

.text-300 {
    color: var(--ds-gray-300) !important;
}

.text-400 {
    color: var(--ds-gray-400) !important;
}

.text-500 {
    color: var(--ds-gray-500) !important;
}

.text-600 {
    color: var(--ds-gray-600) !important;
}

.text-700 {
    color: var(--ds-gray-700) !important;
}

.text-800 {
    color: var(--ds-gray-800) !important;
}

.text-900 {
    color: var(--ds-gray-900) !important;
}

.text-1000 {
    color: var(--ds-gray-1000) !important;
}

.text-1100 {
    color: var(--ds-gray-1100) !important;
}

.text-black-50 {
    color: rgba(0, 0, 0, 0.5) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.text-muted {
    color: var(--ds-gray-700) !important;
}

.text-reset {
    color: inherit !important;
}

/* Text opacity */
.text-opacity-25 {
    opacity: 0.25;
}

.text-opacity-50 {
    opacity: 0.5;
}

.text-opacity-75 {
    opacity: 0.75;
}

.text-opacity-100 {
    opacity: 1;
}

/* Background colors */
.bg-primary {
    background-color: var(--ds-blue) !important;
}

.bg-secondary {
    background-color: var(--ds-gray-600) !important;
}

.bg-success {
    background-color: var(--ds-green) !important;
}

.bg-info {
    background-color: var(--ds-cyan) !important;
}

.bg-warning {
    background-color: var(--ds-yellow) !important;
}

.bg-danger {
    background-color: var(--ds-red) !important;
}

.bg-light {
    background-color: var(--ds-gray-100) !important;
}

.bg-dark {
    background-color: var(--ds-gray-1100) !important;
}

.bg-black {
    background-color: #000 !important;
}

.bg-white {
    background-color: #fff !important;
}

.bg-body {
    background-color: var(--ds-gray-200) !important;
}

.bg-surface {
    background-color: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

.bg-100 {
    background-color: var(--ds-gray-100) !important;
}

.bg-200 {
    background-color: var(--ds-gray-200) !important;
}

.bg-300 {
    background-color: var(--ds-gray-300) !important;
}

.bg-400 {
    background-color: var(--ds-gray-400) !important;
}

.bg-500 {
    background-color: var(--ds-gray-500) !important;
}

.bg-600 {
    background-color: var(--ds-gray-600) !important;
}

.bg-700 {
    background-color: var(--ds-gray-700) !important;
}

.bg-800 {
    background-color: var(--ds-gray-800) !important;
}

.bg-900 {
    background-color: var(--ds-gray-900) !important;
}

.bg-1000 {
    background-color: var(--ds-gray-1000) !important;
}

.bg-1100 {
    background-color: var(--ds-gray-1100) !important;
}

.bg-transparent {
    background-color: transparent !important;
}

/* Background opacity helpers */
.bg-opacity-10 {
    opacity: 0.1;
}

.bg-opacity-25 {
    opacity: 0.25;
}

.bg-opacity-50 {
    opacity: 0.5;
}

.bg-opacity-75 {
    opacity: 0.75;
}

.bg-opacity-100 {
    opacity: 1;
}

/* Border radius utilities */
.rounded {
    border-radius: var(--ds-radius-sm) !important;
}

.rounded-0 {
    border-radius: 0 !important;
}

.rounded-1 {
    border-radius: var(--ds-radius-xs) !important;
}

.rounded-2 {
    border-radius: var(--ds-radius-sm) !important;
}

.rounded-3 {
    border-radius: var(--ds-radius-md) !important;
}

.rounded-4 {
    border-radius: var(--ds-radius-lg) !important;
}

.rounded-circle {
    border-radius: 50% !important;
}

.rounded-pill {
    border-radius: 999px !important;
}

.rounded-top {
    border-top-left-radius: var(--ds-radius-sm) !important;
    border-top-right-radius: var(--ds-radius-sm) !important;
}

.rounded-end {
    border-top-right-radius: var(--ds-radius-sm) !important;
    border-bottom-right-radius: var(--ds-radius-sm) !important;
}

.rounded-bottom {
    border-bottom-right-radius: var(--ds-radius-sm) !important;
    border-bottom-left-radius: var(--ds-radius-sm) !important;
}

.rounded-start {
    border-bottom-left-radius: var(--ds-radius-sm) !important;
    border-top-left-radius: var(--ds-radius-sm) !important;
}

/* Visibility */
.visible {
    visibility: visible !important;
}

.invisible {
    visibility: hidden !important;
}

/* Font utilities */
.font-base {
    font-family: "Open Sans", system-ui, -apple-system, sans-serif !important;
}

.fs-11 {
    font-size: 0.6944444444rem !important;
}

.fs-10 {
    font-size: 0.8333333333rem !important;
}

.fs-9 {
    font-size: 1rem !important;
}

.fs-8 {
    font-size: 1.2rem !important;
}

.fs-7 {
    font-size: 1.44rem !important;
}

.fs-6 {
    font-size: 1.728rem !important;
}

.fs-5 {
    font-size: 2.0736rem !important;
}

.fs-4 {
    font-size: 2.48832rem !important;
}

.fs-3 {
    font-size: 2.985984rem !important;
}

.fs-2 {
    font-size: 3.5831808rem !important;
}

.fs-1 {
    font-size: 4.29981696rem !important;
}

.fst-italic {
    font-style: italic !important;
}

.fst-normal {
    font-style: normal !important;
}

.fw-thin {
    font-weight: 100 !important;
}

.fw-lighter {
    font-weight: 200 !important;
}

.fw-light {
    font-weight: 300 !important;
}

.fw-normal {
    font-weight: 400 !important;
}

.fw-medium {
    font-weight: 500 !important;
}

.fw-semi-bold {
    font-weight: 600 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-bolder {
    font-weight: 800 !important;
}

.fw-black {
    font-weight: 900 !important;
}

.lh-1 {
    line-height: 1 !important;
}

.lh-sm {
    line-height: 1.25 !important;
}

.lh-base {
    line-height: 1.5 !important;
}

.lh-lg {
    line-height: 2 !important;
}

.auth-page {
    background: #0f172a;
}

.auth-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 420px) 1fr;
}

.auth-card {
    border: none;
    border-radius: 16px;
    margin: 48px 24px;
}

.auth-title {
    font-weight: 600;
    margin-bottom: 12px;
}

.auth-visual {
    background: linear-gradient(135deg, #1e293b, #0f172a), url("../img/login-bg.jpg");
    background-size: cover;
    background-position: center;
}

@media (max-width: 992px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        display: none;
    }

    .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        display: none;
    }
}

.workflow-flowchart {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    overflow-x: hidden;
    padding: 4px 2px 8px;
}

.workflow-flowchart__node {
    min-width: 180px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: var(--shadow);
}

.workflow-flowchart__title {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

.workflow-flowchart__meta {
    color: var(--muted);
    font-size: 0.75rem;
    margin-top: 4px;
}

.workflow-flowchart__arrow {
    color: var(--muted);
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
}

.workflow-action-card {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.workflow-action-card.is-disabled {
    opacity: 0.55;
}

.workflow-action-toggle.form-check-input {
    width: 2.4rem;
    height: 1.3rem;
    cursor: pointer;
    background-color: rgba(230, 55, 87, 0.35);
    border-color: rgba(230, 55, 87, 0.35);
}

.workflow-action-toggle.form-check-input:checked {
    background-color: rgba(0, 210, 122, 0.6);
    border-color: rgba(0, 210, 122, 0.6);
}

.proposal-timeline {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    padding-left: 24px;
}

.proposal-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 8px;
    width: 2px;
    background: var(--border);
}

.proposal-timeline__item {
    display: grid;
    gap: 10px;
    padding-left: 8px;
    position: relative;
}

.proposal-timeline__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--surface);
    position: absolute;
    left: 1px;
    margin-top: 4px;
}

.proposal-timeline__card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
}

.proposal-timeline__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 12px;
    color: var(--text);
    font-weight: 600;
}

.proposal-timeline__meta {
    color: var(--muted);
    font-size: 0.78rem;
}

.proposal-timeline__body {
    color: var(--muted);
    margin-top: 8px;
    font-size: 0.92rem;
}

.proposal-timeline__attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.proposal-timeline__attachment {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text);
    text-decoration: none;
}