/* ==========================================================================
   Admin Panel — Premium UI
   Single, simple font family (Inter) across the entire page.
   ========================================================================== */

:root {
    --ap-bg: #f7f6f2;
    --ap-surface: #ffffff;
    --ap-surface-raised: #fcfbf8;
    --ap-border: #e8e5dd;
    --ap-border-strong: #dcd8cc;

    --ap-text: #16191a;
    --ap-text-secondary: #62675f;
    --ap-text-muted: #9a9d94;

    --ap-emerald: #0e6b5c;
    --ap-emerald-dark: #084c41;
    --ap-emerald-soft: #e6efec;

    --ap-gold: #C9972E;
    --ap-gold-dark: #A87A1E;
    --ap-gold-light: #E3B94D;
    --ap-gold-soft: #f4ecd8;

    --ap-purple: #4B2E83;
    --ap-purple-dark: #35205e;
    --ap-purple-light: #6a46ad;
    --ap-purple-soft: #efeaf7;

    --ap-danger: #9c4a34;
    --ap-danger-dark: #7a3626;
    --ap-danger-soft: #fbf1ee;

    --ap-radius-sm: 10px;
    --ap-radius-md: 14px;
    --ap-radius-pill: 999px;

    --ap-shadow-sm: 0 1px 2px rgba(22, 25, 26, 0.04);
    --ap-shadow-md: 0 8px 24px rgba(22, 25, 26, 0.06);
    --ap-shadow-lg: 0 16px 40px rgba(22, 25, 26, 0.10);

    /* Single font family used everywhere */
    --ap-font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    font-family: var(--ap-font-ui);
}

body {
    background: var(--ap-bg);
    color: var(--ap-text);
    font-family: var(--ap-font-ui);
    font-size: 14px;
    line-height: 1.55;
}

.wrapper {
    background: var(--ap-bg) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--ap-font-ui);
    font-weight: 600;
    color: var(--ap-text);
}

a {
    color: var(--ap-purple);
    text-decoration: none;
}

a:hover {
    color: var(--ap-purple-dark);
}

/* ---------- Signature top accent line ---------- */

header.header::before {
    content: "";
    display: block;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--ap-purple) 0%, var(--ap-gold) 100%);
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

#sidebar.sidebar {
    background: linear-gradient(180deg, var(--ap-purple) 0%, var(--ap-purple-dark) 100%);
    border-right: none;
}

#sidebar .sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 1.5rem 1.5rem 1.25rem;
    height: auto;
    position: relative;
    justify-content: center;
    align-items: center;
}

#sidebar .sidebar-header .btn-close {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
}

#sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto !important;
}

#sidebar .sidebar-logo-wrap {
    background: #ffffff;
    border-radius: var(--ap-radius-sm);
    padding: 3px 5px;
    display: inline-flex;
    align-items: center;
    line-height: 0;
    box-shadow: var(--ap-shadow-sm);
}

#sidebar .sidebar-logo-wrap img {
    display: block;
    height: 84px;
    width: 138px;
}

#sidebar .sidebar-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    flex-shrink: 0;
    background: linear-gradient(155deg, var(--ap-gold) 0%, var(--ap-gold-light) 100%);
}

#sidebar .sidebar-brand-full {
    font-weight: 600;
    font-size: 18px;
    color: #ffffff !important;
    letter-spacing: -0.01em;
}

#sidebar .nav-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    padding: 1.5rem 1.5rem 0.6rem;
    margin: 0;
}

#sidebar .sidebar-nav {
    padding: 1.1rem 1rem 0.5rem;
}

#sidebar .nav-item {
    margin-bottom: 3px;
}

#sidebar .nav-link {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    border-radius: var(--ap-radius-pill);
    padding: 0.62rem 1rem;
    transition: background 0.15s ease, color 0.15s ease;
}

#sidebar .nav-link .nav-icon {
    width: 18px;
    height: 18px;
    margin-right: 11px;
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

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

#sidebar .nav-link:hover .nav-icon {
    color: #ffffff;
}

#sidebar .nav-link.active {
    background: var(--ap-gold);
    color: #000000;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(201, 151, 46, 0.3);
}

#sidebar .nav-link.active .nav-icon {
    color: #000000;
}

#sidebar .sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* ---------- Sidebar toggler icon ---------- */

#sidebar .sidebar-toggler {
    --cui-sidebar-toggler-indicator: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 14'%3E%3Cpath fill='%23ffffff' d='M9.148 2.352l-4.148 4.148 4.148 4.148q0.148 0.148 0.148 0.352t-0.148 0.352l-1.297 1.297q-0.148 0.148-0.352 0.148t-0.352-0.148l-5.797-5.797q-0.148-0.148-0.148-0.352t0.148-0.352l5.797-5.797q0.148-0.148 0.352-0.148t0.352 0.148l1.297 1.297q0.148 0.148 0.148 0.352t-0.148 0.352z'/%3E%3C/svg%3E");
    --cui-sidebar-toggler-indicator-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 14'%3E%3Cpath fill='%23C9972E' d='M9.148 2.352l-4.148 4.148 4.148 4.148q0.148 0.148 0.148 0.352t-0.148 0.352l-1.297 1.297q-0.148 0.148-0.352 0.148t-0.352-0.148l-5.797-5.797q-0.148-0.148-0.148-0.352t0.148-0.352l5.797-5.797q0.148-0.148 0.352-0.148t0.352 0.148l1.297 1.297q0.148 0.148 0.148 0.352t-0.148 0.352z'/%3E%3C/svg%3E");
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: var(--ap-radius-sm);
    opacity: 0.9;
}

#sidebar .sidebar-toggler:hover {
    background-color: rgba(255, 255, 255, 0.14);
    opacity: 1;
}

/* ---------- Sidebar narrow / collapsed state ---------- */

#sidebar.sidebar-narrow-unfoldable:not(:hover) .sidebar-logo-wrap,
#sidebar.sidebar-narrow-unfoldable:not(:hover) .sidebar-brand-full {
    display: none !important;
}

#sidebar .sidebar-brand-narrow {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(155deg, var(--ap-gold) 0%, var(--ap-gold-light) 100%);
    color: var(--ap-purple-dark) !important;
    font-weight: 600;
    font-size: 14px;
}

#sidebar.sidebar-narrow-unfoldable:not(:hover) .sidebar-brand-narrow {
    display: inline-flex !important;
}

#sidebar.sidebar-narrow-unfoldable:not(:hover) .nav-link {
    justify-content: center;
    padding: 0.62rem;
    white-space: nowrap;
    overflow: hidden;
    font-size: 0;
}

#sidebar.sidebar-narrow-unfoldable:not(:hover) .nav-link .nav-icon {
    margin-right: 0;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

header.header {
    background: var(--ap-surface);
}

header.header .container-fluid.border-bottom {
    border-color: var(--ap-border) !important;
    min-height: 68px;
}

header.header .header-toggler .icon {
    color: var(--ap-text-secondary);
}

header.header .search-field {
    position: relative;
    width: 100%;
    max-width: 300px;
}

header.header .search-field svg {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--ap-text-muted);
}

header.header .search-field input {
    height: 38px;
    width: 100%;
    padding: 0 14px 0 38px;
    border-radius: var(--ap-radius-pill);
    border: 1px solid var(--ap-border);
    background: var(--ap-bg);
    font-size: 13px;
    color: var(--ap-text);
    transition: border-color 0.15s ease, background 0.15s ease;
}

header.header .search-field input:focus {
    outline: none;
    border-color: var(--ap-purple);
    background: var(--ap-surface);
}

header.header .icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ap-text-secondary);
    position: relative;
    transition: background 0.15s ease;
}

header.header .icon-btn:hover {
    background: var(--ap-surface-raised);
}

header.header .icon-btn .dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ap-gold);
    border: 1.5px solid var(--ap-surface);
}

header.header .breadcrumb {
    font-size: 13px;
}

header.header .breadcrumb-item a {
    color: var(--ap-text-muted);
    text-decoration: none;
}

header.header .breadcrumb-item.active span {
    font-size: 18px;
    font-weight: 600;
    color: var(--ap-text);
}

header.header .avatar-img {
    border: 2px solid var(--ap-gold);
    border-radius: 50%;
}

header.header .dropdown-menu {
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-md);
    box-shadow: var(--ap-shadow-lg);
    min-width: 220px;
}

header.header .dropdown-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--ap-text);
    background: var(--ap-surface-raised) !important;
}

header.header .dropdown-item {
    font-size: 14px;
    padding: 0.6rem 1rem;
    border-radius: var(--ap-radius-sm);
    margin: 2px 6px;
    width: calc(100% - 12px);
    transition: background 0.15s ease, color 0.15s ease;
}

header.header .dropdown-item:hover {
    background: var(--ap-gold-soft);
    color: var(--ap-purple);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    background: transparent;
    border-top: 1px solid var(--ap-border);
    font-size: 13px;
    color: var(--ap-text-muted);
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}

/* ==========================================================================
   AUTH / LOGIN
   ========================================================================== */

.auth-shell-simple {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ap-bg);
    padding: 2rem;
}

.auth-shell-simple .auth-form-wrap {
    width: 100%;
    max-width: 380px;
    background: var(--ap-surface);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-md);
    padding: 2.25rem 2rem;
    box-shadow: var(--ap-shadow-md);
}

.auth-brand-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
    color: var(--ap-text);
    margin-bottom: 1.75rem;
}

.auth-mark-simple {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(155deg, var(--ap-purple) 0%, var(--ap-purple-dark) 55%, var(--ap-gold) 130%);
}

.auth-form-wrap h1 {
    font-weight: 600;
    font-size: 22px;
    color: var(--ap-text);
    margin-bottom: 0.25rem;
    text-align: center;
}

.auth-form-wrap .subtitle {
    font-size: 14px;
    color: var(--ap-text-secondary);
    margin-bottom: 1.75rem;
    text-align: center;
}

.auth-form-wrap label.field-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ap-text);
    margin-bottom: 6px;
    display: block;
}

.auth-form-wrap .input-group {
    border-radius: var(--ap-radius-sm);
    overflow: hidden;
    border: 1px solid var(--ap-border);
    transition: border-color 0.15s ease;
}

.auth-form-wrap .input-group:focus-within {
    border-color: var(--ap-purple);
}

.auth-form-wrap .input-group-text {
    background: var(--ap-surface);
    border: none;
    color: var(--ap-text-muted);
}

.auth-form-wrap .form-control {
    border: none;
    background: var(--ap-surface);
    font-size: 14px;
    padding: 0.65rem 0.75rem 0.65rem 0;
}

.auth-form-wrap .form-control:focus {
    box-shadow: none;
}

.auth-form-wrap .btn-primary {
    width: 100%;
    padding: 0.7rem 1.25rem;
    background: var(--ap-purple);
    border-color: var(--ap-purple);
}

.auth-form-wrap .btn-primary:hover {
    background: var(--ap-purple-dark);
    border-color: var(--ap-purple-dark);
}

.auth-form-wrap .form-check-label {
    font-size: 13px;
    color: var(--ap-text-secondary);
}

.auth-form-wrap .alert-danger {
    border-radius: var(--ap-radius-sm);
    border: 1px solid #e7c9c2;
    background: var(--ap-danger-soft);
    color: var(--ap-danger);
    font-size: 13px;
}

/* ==========================================================================
   CONTENT SURFACES — Cards
   ========================================================================== */

.card {
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-md);
    box-shadow: var(--ap-shadow-sm);
}

.card-header {
    background: var(--ap-surface);
    border-bottom: 1px solid var(--ap-border);
    font-weight: 600;
    font-size: 14px;
    color: var(--ap-text);
    border-top-left-radius: var(--ap-radius-md) !important;
    border-top-right-radius: var(--ap-radius-md) !important;
    padding: 1rem 1.25rem;
}

.card-footer {
    background: var(--ap-surface-raised);
    border-top: 1px solid var(--ap-border);
    border-bottom-left-radius: var(--ap-radius-md) !important;
    border-bottom-right-radius: var(--ap-radius-md) !important;
}

/* Stat cards */

.card.bg-primary {
    background: linear-gradient(155deg, var(--ap-purple) 0%, var(--ap-purple-dark) 100%) !important;
    border: none !important;
}

.card.bg-warning {
    background: linear-gradient(155deg, var(--ap-gold-light) 0%, var(--ap-gold-dark) 100%) !important;
    border: none !important;
    color: #ffffff !important;
}

.card.bg-info {
    background: linear-gradient(155deg, var(--ap-purple) 0%, var(--ap-purple-dark) 100%) !important;
    border: none !important;
}

.card.bg-success {
    background: linear-gradient(155deg, var(--ap-purple) 0%, var(--ap-purple-dark) 100%) !important;
    border: none !important;
}

.card.bg-danger {
    background: linear-gradient(155deg, var(--ap-danger) 0%, var(--ap-danger-dark) 100%) !important;
    border: none !important;
}

.card.bg-primary .text-white-50,
.card.bg-warning .text-white-50,
.card.bg-info .text-white-50,
.card.bg-danger .text-white-50,
.card.bg-success .text-white-50 {
    color: rgba(255, 255, 255, 0.72) !important;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    font-weight: 500;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* .btn-primary {
    background: var(--ap-purple);
    border-color: var(--ap-purple);
    color: #ffffff;
    border-radius: var(--ap-radius-pill);
    padding: 0.5rem 1.25rem;
} */

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--ap-purple-dark) !important;
    border-color: var(--ap-purple-dark) !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: var(--ap-purple);
    border-color: var(--ap-purple);
    border-radius: var(--ap-radius-pill);
}

.btn-outline-primary:hover {
    background: var(--ap-purple);
    border-color: var(--ap-purple);
    color: #ffffff;
}

/* .btn-secondary {
    background: var(--ap-gold);
    border-color: var(--ap-gold);
    color: #ffffff;
    border-radius: var(--ap-radius-pill);
} */

.btn-primary {
    background: var(--ap-purple);
    border-color: var(--ap-purple);
    color: #ffffff;
    border-radius: var(--ap-radius-pill);
    padding: 0.42rem 1.05rem;
    font-size: 14px;
}

.btn-secondary {
    background: var(--ap-gold);
    border-color: var(--ap-gold);
    color: #ffffff;
    border-radius: var(--ap-radius-pill);
    padding: 0.42rem 1.05rem;
    font-size: 14px;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary:active:focus,
.btn-secondary.active {
    background: var(--ap-gold-dark) !important;
    border-color: var(--ap-gold-dark) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* .btn-outline-secondary {
    color: var(--ap-text-secondary);
    border-color: var(--ap-border-strong);
    border-radius: var(--ap-radius-pill);
}

.btn-outline-secondary:hover {
    background: var(--ap-surface-raised);
    border-color: var(--ap-text-muted);
    color: var(--ap-text);
} */


.btn-outline-secondary {
    color: var(--ap-gold-dark);
    border-color: var(--ap-gold);
    border-radius: var(--ap-radius-pill);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary:active:focus,
.btn-outline-secondary.active {
    background: var(--ap-gold) !important;
    border-color: var(--ap-gold) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.btn-outline-danger {
    border-radius: var(--ap-radius-pill);
    color: var(--ap-danger);
    border-color: var(--ap-danger);
}

.btn-outline-danger:hover {
    background: var(--ap-danger);
    border-color: var(--ap-danger);
    color: #ffffff;
}

.btn-sm {
    font-size: 12.5px;
    padding: 0.35rem 0.9rem;
}

/* ==========================================================================
   FORMS
   ========================================================================== */

label,
.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ap-text);
}

.form-control,
.form-select {
    font-size: 14px;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ap-purple);
    box-shadow: 0 0 0 3px rgba(75, 46, 131, 0.1);
}

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

.input-group-text {
    background: var(--ap-surface-raised);
    border-color: var(--ap-border);
    color: var(--ap-text-muted);
}

/* ==========================================================================
   BADGES
   ========================================================================== */

.badge {
    font-weight: 500;
    border-radius: var(--ap-radius-pill);
    padding: 5px 10px;
}

.badge.bg-secondary {
    background: var(--ap-purple) !important;
    color: #ffffff !important;
}

.badge.bg-success {
    background: var(--ap-purple) !important;
}

.badge.bg-warning {
    background: var(--ap-gold) !important;
    color: #ffffff !important;
}

.badge.bg-danger {
    background: var(--ap-danger) !important;
}

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */

.progress {
    background: var(--ap-border);
    border-radius: var(--ap-radius-pill);
}

.progress-bar.bg-success {
    background: var(--ap-gold) !important;
}

/* ==========================================================================
   TABLES
   ========================================================================== */

.table {
    font-size: 13.5px;
}

.table thead th {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ap-text);
    border-bottom: 1px solid var(--ap-border-strong);
    background: var(--ap-surface-raised);
}

.table td,
.table th {
    border-color: var(--ap-border);
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.12s ease;
}

.table tbody tr:hover {
    background: var(--ap-gold-soft);
}

.table code {
    font-family: "SFMono-Regular", Consolas, monospace;
    background: var(--ap-surface-raised);
    color: var(--ap-purple);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 12.5px;
}

/* ==========================================================================
   MISC — Avatars, alerts, list groups
   ========================================================================== */

.rounded-circle[style*="ap-gold-soft"] {
    background: var(--ap-gold-soft) !important;
    color: var(--ap-gold-dark) !important;
}

.alert {
    border-radius: var(--ap-radius-sm);
    font-size: 13.5px;
}

.alert-success {
    background: var(--ap-purple-soft);
    border-color: var(--ap-purple);
    color: var(--ap-purple-dark);
}

.alert-danger {
    background: var(--ap-danger-soft);
    border-color: #e7c9c2;
    color: var(--ap-danger);
}

.list-group-item {
    border-color: var(--ap-border);
}

.list-group-item:hover {
    background: var(--ap-surface-raised);
}

.card a:not(.btn):not(.nav-link) {
    color: var(--ap-purple);
    text-decoration: none;
    font-weight: 500;
}

.card a:not(.btn):not(.nav-link):hover {
    color: var(--ap-purple-dark);
    text-decoration: underline;
}