/* cms-admin.css — white-theme polish (dark mode is disabled project-wide) */

/* ===== Sidebar seam =====
   White sidebar on white content, separated by a soft hairline + faint shadow
   so the edge reads as smooth instead of a hard gray band. */
.app-sidebar {
    background-color: var(--bs-body-bg);
    border-inline-end: 1px solid var(--bs-border-color-translucent);
    box-shadow: 1px 0 12px rgba(0, 0, 0, 0.05);
}

.sidebar-wrapper {
    scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}

/* ===== Navbar & content header ===== */
.app-header {
    background-color: var(--bs-body-bg);
}

.app-content-header {
    background-color: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.app-content {
    background-color: var(--bs-body-bg);
}

/* Breathing room between page header and page content
   (every page nests .container-fluid in both the title bar and content) */
.app-content > .container-fluid {
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
}

/* ===== Cards ===== */
.card {
    border-radius: 0.5rem;
    border-color: var(--bs-border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-header {
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
}

.card-footer {
    border-bottom-left-radius: calc(0.5rem - 1px);
    border-bottom-right-radius: calc(0.5rem - 1px);
}

/* ===== Smooth interactive transitions ===== */
.nav-link,
.sidebar-menu .nav-link,
.btn,
.dropdown-item,
.list-group-item,
.page-link,
.badge,
.info-box {
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
        border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out;
}

/* ===== Soft focus rings (light theme friendly) ===== */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ===== Buttons ===== */
.btn {
    border-radius: 0.375rem;
}

/* ===== Tables ===== */
.table {
    --bs-table-striped-bg: rgba(0, 0, 0, 0.02);
}

/* ===== Dropdowns & menus ===== */
.dropdown-menu,
.list-group-item {
    border-color: var(--bs-border-color);
}

.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08);
}

/* ==========================================================
   Design system — single accent (primary) + neutrals.
   Colors are limited to: primary (actions), success (status),
   danger (destructive), everything else neutral gray.
   ========================================================== */

/* ---- Card headers: always a consistent flex row ---- */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-block: 0.75rem;
}

.card-title {
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 600;
}

/* Add New / action buttons in card headers always sit far right */
.card-header > :last-child {
    margin-left: auto;
}

/* Card headers that hold nav-tabs (e.g. homepage) must not flex */
.card-header:has(.nav-tabs),
.card-header.p-0 {
    display: block;
}

/* ---- Buttons: consistent shape & hierarchy ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 0.375rem;
    white-space: nowrap;
}

.btn-sm .bi,
.btn .bi {
    font-size: 0.9em;
}

/* ---- Badges: consistent sizing, no color noise ---- */
.badge {
    font-weight: 500;
    vertical-align: middle;
    padding: 0.35em 0.6em;
}

/* ---- Tables: actions column keeps a stable width ---- */
.table .btn {
    padding: 0.25rem 0.45rem;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

/* ---- Forms: even vertical rhythm ---- */
.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

/* ---- Filter bars: align consistently ---- */
.card-header form,
.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ---- Content header: consistent title weight ---- */
.app-content-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* ---- Sidebar: consistent navigation headers ---- */
.sidebar-menu .nav-header {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-top: 1rem;
}

/* ---- Small boxes: simple, professional stat cards ---- */
.small-box {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.small-box .inner {
    padding: 1.25rem;
}

.small-box .inner h3 {
    color: var(--bs-body-color);
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0;
}

.small-box-title {
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.small-box-title .bi {
    font-size: 0.875rem;
}

.small-box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.25rem;
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    text-decoration: none;
}

.small-box-footer:hover {
    color: var(--bs-primary);
}

/* ===== Error pages (inside the admin shell) ===== */
.error-icon { font-size: 3.5rem; line-height: 1; display: block; }
.error-title { font-size: 1.5rem; font-weight: 700; margin: 1rem 0 0.35rem; }
.error-text { color: #6c757d; margin-bottom: 1.5rem; }
.error-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.error-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}
.error-btn-primary { background: var(--bs-primary); color: #fff; }
.error-btn-primary:hover { background: #0b5ed7; color: #fff; }
.error-btn-secondary { background: #fff; color: #6c757d; border: 1px solid #ced4da; }
.error-btn-secondary:hover { background: #f8f9fa; }

/* ===== Sidebar brand: symmetric rounded mark + aligned text ===== */
.sidebar-brand .brand-link {
    gap: 0.6rem;
    padding: 0.75rem 1rem;
}

.sidebar-brand .brand-image {
    float: none;
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    max-height: 40px;
    margin: 0;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50% !important;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
}

.sidebar-brand .brand-text {
    margin-left: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Pagination: spaced, rounded page buttons ===== */
.pagination {
    gap: 0.3rem;
}

.pagination .page-link {
    border-radius: 0.375rem;
    min-width: 2rem;
    text-align: center;
}

.pagination .page-item.active .page-link {
    border-color: var(--bs-primary);
}

/* ---- Responsive helpers: page header actions never overflow ---- */
@media (max-width: 575.98px) {
    .card-header {
        align-items: flex-start;
    }
    .app-content-header .row > div {
        text-align: left;
    }
    .breadcrumb {
        margin-bottom: 0.25rem;
        padding-left: 0;
    }
}

