/* Bond Investment - Admin Theme */
:root {
    --bi-navy: #0B1F3A;
    --bi-navy-dark: #071528;
    --bi-teal: #0D9488;
    --bi-teal-dark: #0F766E;
    --bi-bg: #F3F5F8;
    --bi-white: #FFFFFF;
    --bi-border: #E2E8F0;
    --bi-text: #1E293B;
    --bi-muted: #64748B;
    --bi-danger: #DC2626;
    --bi-success: #16A34A;
    --bi-warning: #D97706;
    --bi-info: #2563EB;
    --sidebar-width: 260px;
    --header-height: 64px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: var(--bi-text);
    background: var(--bi-bg);
}

a {
    text-decoration: none;
    color: var(--bi-teal);
}

a:hover {
    color: var(--bi-teal-dark);
}

/* Auth Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(145deg, #0B1F3A 0%, #0D3B4C 45%, #0D9488 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bi-white);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 16px 40px rgba(11, 31, 58, 0.25);
}

.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-brand h1 {
    margin: 0 0 6px;
    font-size: 24px;
    color: var(--bi-navy);
}

.auth-brand p {
    margin: 0;
    color: var(--bi-muted);
    font-size: 13px;
}

.login-role-block {
    margin-bottom: 22px;
}

.login-role-label {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bi-muted);
    text-align: center;
}

.login-role-switch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 5px;
    background: #F1F5F9;
    border: 1px solid var(--bi-border);
    border-radius: 14px;
}

.login-role-indicator {
    position: absolute;
    top: 5px;
    left: 5px;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    background: var(--bi-navy);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(11, 31, 58, 0.22);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
    pointer-events: none;
}

.login-role-switch[data-active="sales"] .login-role-indicator {
    transform: translateX(100%);
}

.login-role-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--bi-muted);
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.15s ease;
}

.login-role-btn i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.login-role-btn:hover:not(.active) {
    color: var(--bi-navy);
}

.login-role-btn:hover:not(.active) i {
    transform: translateY(-1px);
}

.login-role-btn.active {
    color: #fff;
}

.login-role-btn:focus-visible {
    outline: 2px solid var(--bi-teal);
    outline-offset: 2px;
}

.auth-tab-content {
    min-height: 280px;
}

.auth-form .form-control {
    min-height: 44px;
    background: #F8FAFC;
    border: 1px solid var(--bi-border);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-form .form-control:hover {
    border-color: #CBD5E1;
    background: #fff;
}

.auth-form .form-control:focus {
    background: #fff;
    border-color: var(--bi-teal);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.auth-form .password-field .form-control {
    background: #F8FAFC;
    border: 1px solid var(--bi-border);
}

.auth-form .password-field .form-control:hover,
.auth-form .password-field .form-control:focus {
    background: #fff;
}

.auth-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.auth-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    font-weight: 600;
    border-radius: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-submit-btn i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(13, 148, 136, 0.28);
}

.auth-submit-btn:hover i {
    transform: translateX(3px);
}

/* Legacy auth-tabs (kept for safety) */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border: 0;
}

.auth-tabs .nav-link {
    border: 1px solid var(--bi-border);
    border-radius: 8px;
    color: var(--bi-muted);
    background: #F8FAFC;
    font-weight: 600;
    padding: 10px 12px;
}

.auth-tabs .nav-link:hover {
    color: var(--bi-navy);
    background: #EEF2F7;
}

.auth-tabs .nav-link.active {
    color: #fff;
    background: var(--bi-navy);
    border-color: var(--bi-navy);
}

/* Admin Shell */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bi-navy);
    color: #CBD5E1;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    overflow-y: auto;
    transition: transform 0.25s ease;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    gap: 10px;
    text-decoration: none;
}

.sidebar-brand:hover,
.sidebar-brand:focus {
    color: #FFFFFF;
    text-decoration: none;
}

.sidebar-brand span,
.sidebar-brand-text {
    color: #FFFFFF;
}

.sidebar-brand-text span {
    color: var(--bi-teal);
}

.sidebar-logo {
    max-height: 36px;
    max-width: 180px;
    width: auto;
    object-fit: contain;
}

.auth-logo {
    max-height: 56px;
    max-width: 220px;
    margin: 0 auto 10px;
    display: block;
    object-fit: contain;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 12px 0 24px;
    flex: 1;
}

.sidebar-group {
    margin-bottom: 2px;
}

.sidebar-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    background: transparent;
    color: #94A3B8;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    cursor: pointer;
}

.sidebar-group-toggle:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-group-toggle .group-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sidebar-group-toggle .group-chevron {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.sidebar-group.is-open .group-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu {
    list-style: none;
    margin: 0;
    padding: 0 0 6px;
}

.sidebar-group:not(.is-open) > .sidebar-submenu {
    display: none !important;
}

.sidebar-group.is-open > .sidebar-submenu {
    display: block !important;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px 9px 28px;
    color: #94A3B8;
    font-size: 13px;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
    pointer-events: auto;
}

.sidebar-menu li a i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.sidebar-menu li a .sidebar-count {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 4px;
    background: #ffc107;
    color: #212529;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(13, 148, 136, 0.12);
    color: #FFFFFF;
    border-left-color: var(--bi-teal);
}

.sidebar-section-label {
    padding: 16px 20px 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748B;
}

.admin-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-header {
    height: var(--header-height);
    background: var(--bi-white);
    border-bottom: 1px solid var(--bi-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle {
    display: none;
    border: 1px solid var(--bi-border);
    background: var(--bi-white);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--bi-navy);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-notify-dropdown {
    position: relative;
}

.header-notify-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--bi-border);
    border-radius: 10px;
    background: var(--bi-white);
    color: var(--bi-navy);
    font-size: 18px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.header-notify-btn:hover,
.header-notify-btn[aria-expanded="true"] {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

.header-notify-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 4px;
    background: #ffc107;
    color: #212529;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.header-notify-menu {
    width: 300px;
    padding: 0;
    border: 1px solid var(--bi-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.header-notify-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--bi-border);
    background: #F8FAFC;
    font-size: 13px;
    color: var(--bi-navy);
}

.header-notify-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 4px;
    background: #ffc107;
    color: #212529;
    font-size: 11px;
    font-weight: 700;
}

.header-notify-item {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px !important;
    font-size: 13px;
    color: var(--bi-navy);
}

.header-notify-item:hover {
    background: #F1F5F9;
}

.header-notify-item-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.header-notify-item-main i {
    width: 16px;
    text-align: center;
    color: #64748B;
}

.header-notify-item-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 4px;
    background: #ffc107;
    color: #212529;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.header-notify-empty {
    padding: 18px 14px;
    text-align: center;
    color: #64748B;
    font-size: 13px;
}

.admin-name {
    font-weight: 600;
    color: var(--bi-navy);
    font-size: 13px;
}

.btn-logout {
    border: 1px solid var(--bi-border);
    background: var(--bi-white);
    color: var(--bi-danger);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.btn-logout:hover {
    background: #FEF2F2;
}

.header-profile-dropdown {
    position: relative;
}

.header-profile-btn {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 4px 8px 4px 4px;
    cursor: pointer;
    color: var(--bi-navy);
    transition: background 0.15s ease;
}

.header-profile-btn::after {
    display: none !important;
    content: none !important;
}

.header-profile-btn:hover,
.header-profile-btn[aria-expanded="true"] {
    background: #F1F5F9;
}

.header-profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    background: #E2E8F0;
}

.header-profile-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #E2E8F0;
    color: #64748B;
    font-size: 20px;
}

.header-profile-meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    line-height: 1.25;
    text-align: left;
    min-width: 0;
}

.header-profile-meta .admin-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--bi-navy);
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-profile-meta .admin-role {
    display: block;
    font-size: 12px;
    color: #94A3B8;
    font-weight: 400;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-profile-menu {
    min-width: 180px;
    padding: 6px 0;
    border: 1px solid var(--bi-border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.header-profile-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 8px 14px;
}

.header-profile-menu .dropdown-item i {
    font-size: 14px;
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 44px;
}

/* Keep eye toggle clear of Bootstrap valid/invalid background icons */
.password-field .form-control.is-valid,
.password-field .form-control.is-invalid,
.was-validated .password-field .form-control:valid,
.was-validated .password-field .form-control:invalid {
    padding-right: 4.75rem;
    background-position: right 2.75rem center;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--bi-muted, #64748B);
    padding: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.password-toggle:hover {
    color: var(--bi-navy, #0B1F3A);
}

.password-field .invalid-feedback,
.password-field + .invalid-feedback {
    display: block;
}

.admin-content {
    padding: 24px;
    flex: 1;
}

.admin-content.is-filtering {
    opacity: 0.65;
    transition: opacity 0.15s ease;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--bi-muted);
    font-size: 13px;
    flex-wrap: wrap;
}

.page-breadcrumb a {
    color: var(--bi-muted);
}

.page-breadcrumb .current {
    color: var(--bi-navy);
    font-weight: 600;
}

/* Cards */
.card-panel {
    background: var(--bi-white);
    border: 1px solid var(--bi-border);
    border-radius: 10px;
    margin-bottom: 20px;
}

.card-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bi-border);
    flex-wrap: wrap;
}

.card-panel-header h2,
.card-panel-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--bi-navy);
}

.card-panel-body {
    padding: 20px;
}

/* Stats */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1 1 200px;
    background: var(--bi-white);
    border: 1px solid var(--bi-border);
    border-radius: 10px;
    padding: 18px 20px;
    min-width: 180px;
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--bi-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.stat-card .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--bi-navy);
}

.stat-card.accent {
    border-top: 3px solid var(--bi-teal);
}

a.stat-card-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

a.stat-card-link:hover {
    color: inherit;
    box-shadow: 0 4px 14px rgba(11, 31, 58, 0.08);
    border-color: var(--bi-teal);
}

a.stat-card-link .stat-value {
    color: var(--bi-navy);
}

/* Forms */
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--bi-navy);
    margin-bottom: 6px;
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: var(--bi-border);
    font-size: 14px;
    padding: 8px 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bi-teal);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.invalid-feedback,
.error {
    color: var(--bi-danger);
    font-size: 12px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.filter-form .form-group {
    margin: 0;
    min-width: 160px;
}

.filter-form .form-group.grow {
    flex: 1 1 200px;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
    font-size: 13px;
}

.table thead th {
    background: #F8FAFC;
    color: var(--bi-navy);
    font-weight: 600;
    border-bottom-width: 1px;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* Badges */
.badge-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-active,
.badge-verified,
.badge-approved,
.badge-processed,
.badge-credited,
.badge-resolved,
.badge-sent {
    background: #DCFCE7;
    color: #166534;
}

.badge-pending,
.badge-submitted,
.badge-open,
.badge-draft {
    background: #FEF3C7;
    color: #92400E;
}

.badge-inactive,
.badge-blocked,
.badge-rejected,
.badge-cancelled,
.badge-closed,
.badge-failed {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-in_progress,
.badge-approved,
.badge-matured {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-withdrawn,
.badge-premature_closed {
    background: #E2E8F0;
    color: #334155;
}

/* Buttons */
.btn-primary {
    background: var(--bi-teal);
    border-color: var(--bi-teal);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--bi-teal-dark);
    border-color: var(--bi-teal-dark);
}

.btn-outline-primary {
    color: var(--bi-teal);
    border-color: var(--bi-teal);
}

.btn-outline-primary:hover {
    background: var(--bi-teal);
    border-color: var(--bi-teal);
}

.btn-sm {
    font-size: 12px;
}

.action-dropdown .dropdown-item {
    font-size: 13px;
}

/* Action icon buttons */
.action-icons {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.action-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--bi-border);
    background: #FFFFFF;
    color: var(--bi-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    line-height: 1;
}

.action-icon-btn:hover {
    background: #F1F5F9;
    color: var(--bi-teal);
    border-color: var(--bi-teal);
}

.action-icon-btn.action-delete {
    color: var(--bi-danger);
}

.action-icon-btn.action-delete:hover {
    background: #FEF2F2;
    border-color: #FECACA;
    color: var(--bi-danger);
}

.action-icon-btn.action-view:hover,
.action-icon-btn.action-review:hover {
    color: var(--bi-info);
    border-color: #BFDBFE;
    background: #EFF6FF;
}

.action-icon-btn.action-restore:hover {
    color: var(--bi-success);
    border-color: #BBF7D0;
    background: #F0FDF4;
}

/* Status switch */
.status-switch-wrap {
    display: inline-flex;
    align-items: center;
}

.status-switch .form-check-input {
    width: 2.4em;
    height: 1.25em;
    cursor: pointer;
    background-color: #CBD5E1;
    border-color: #CBD5E1;
}

.status-switch .form-check-input:checked {
    background-color: var(--bi-teal);
    border-color: var(--bi-teal);
}

.status-switch .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.status-switch-wrap.is-disabled {
    opacity: 0.55;
}

/* Settings page */
.settings-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: start;
}

.settings-nav {
    position: sticky;
    top: calc(var(--header-height) + 16px);
}

.settings-side-nav {
    display: flex;
    flex-direction: column;
}

.settings-side-nav a {
    padding: 12px 16px;
    color: var(--bi-muted);
    border-left: 3px solid transparent;
    font-weight: 600;
    font-size: 13px;
}

.settings-side-nav a:hover,
.settings-side-nav a.active {
    color: var(--bi-navy);
    background: #F8FAFC;
    border-left-color: var(--bi-teal);
}

.brand-upload-box {
    height: 110px;
    border: 1px dashed var(--bi-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F8FAFC;
    overflow: hidden;
    padding: 10px;
}

.brand-upload-dark {
    background: var(--bi-navy);
}

.brand-upload-favicon {
    width: 110px;
}

.brand-preview {
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
}

.favicon-preview {
    max-height: 48px;
    max-width: 48px;
}

.brand-placeholder {
    color: var(--bi-muted);
    font-size: 12px;
}

.color-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-input-row .form-control-color {
    width: 46px;
    height: 38px;
    padding: 4px;
}

.theme-preview-swatch {
    display: flex;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--bi-border);
}

.theme-preview-swatch span {
    flex: 1;
}

@media (max-width: 991px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-nav {
        position: static;
    }

    .settings-side-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Permission groups */
.permission-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.permission-group {
    flex: 1 1 220px;
    border: 1px solid var(--bi-border);
    border-radius: 8px;
    padding: 12px 14px;
    background: #F8FAFC;
}

.permission-group h5 {
    font-size: 13px;
    margin: 0 0 10px;
    color: var(--bi-navy);
    text-transform: capitalize;
}

/* Ticket thread */
.ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-reply {
    border: 1px solid var(--bi-border);
    border-radius: 8px;
    padding: 14px 16px;
    background: #F8FAFC;
}

.ticket-reply.internal {
    background: #FFF7ED;
    border-color: #FED7AA;
}

.ticket-reply .meta {
    font-size: 12px;
    color: var(--bi-muted);
    margin-bottom: 6px;
}

/* Detail grid */
.detail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.detail-item {
    flex: 1 1 220px;
}

.detail-item .label {
    font-size: 12px;
    color: var(--bi-muted);
    margin-bottom: 4px;
}

.detail-item .value {
    font-weight: 600;
    color: var(--bi-navy);
}

.profile-photo-thumb {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--bi-border, #E2E8F0);
    display: block;
}

.detail-item-photo .value {
    font-weight: 400;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--bi-muted);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 31, 58, 0.45);
    z-index: 1035;
}

.admin-shell.sidebar-open .sidebar-overlay {
    display: block;
}

/* Responsive */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

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

    .admin-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .admin-content {
        padding: 16px;
    }
}

@media (max-width: 575px) {
    .auth-card {
        padding: 28px 20px;
    }

    .stat-card .stat-value {
        font-size: 18px;
    }

    .card-panel-body {
        padding: 14px;
    }
}

/* Print-friendly report tables */
@media print {
    .admin-sidebar,
    .admin-header,
    .filter-form,
    .no-print {
        display: none !important;
    }

    .admin-main {
        margin-left: 0;
    }
}

/* Public website styles live in assets/css/site.css */

.auth-back-link {
    margin: 20px 0 0;
    text-align: center;
    font-size: 13px;
}

.auth-back-link a {
    color: var(--bi-muted);
}

.auth-back-link a:hover {
    color: var(--bi-navy);
}
