/* ============================================================
   Architect Interior Company PP — Admin Panel CSS
   Warm Minimal — charcoal + clay/terracotta studio theme.
   ============================================================ */

:root {
    --ad-primary: #1C1B19;       /* warm charcoal */
    --ad-accent: #B5654A;        /* clay / terracotta */
    --ad-accent-soft: #c98568;
    --ad-sidebar: #1B1815;       /* warm near-black */
    --ad-sidebar-hover: rgba(255,255,255,.06);
    --ad-sidebar-active: rgba(181,101,74,.18);
    --ad-content-bg: #F4F2EE;    /* warm off-white */
    --ad-border: #E4E0D8;
    --ad-muted: #6B7280;
    --ad-ink: #1f2430;
    /* Public-side var aliases so drop-in components (confirm-dialog / password-toggle)
       resolve to the brand clay inside the admin shell too. */
    --brass: #B5654A;
    --brass-soft: #F3E7E1;
}

body { background: var(--ad-content-bg); font-family: 'Inter', system-ui, "Segoe UI", Roboto, "Noto Sans Bengali", "Hind Siliguri", sans-serif; color: var(--ad-ink); }

.admin-shell { display: flex; min-height: 100vh; }

/* ===== Sidebar ===== */
.admin-sidebar {
    width: 264px; background: var(--ad-sidebar); color: #c7ccd6;
    position: fixed; top: 0; left: 0; bottom: 0;
    overflow-y: auto; z-index: 1020;
    display: flex; flex-direction: column;
    transition: transform .3s ease;
}
.admin-sidebar .brand { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: 12px; }
.admin-sidebar .brand .brand-mark { width: 40px; height: 40px; border-radius: 9px; background: linear-gradient(135deg, var(--ad-accent), #7d3f2c); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; flex: none; overflow: hidden; }
.admin-sidebar .brand .brand-logo { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; flex: none; background: #fff; }
.admin-topbar .topbar-logo { height: 30px; width: auto; margin-right: 4px; }
.admin-sidebar .brand-text { color: #fff; font-weight: 700; font-size: 16px; line-height: 1.2; letter-spacing: .2px; }
.admin-sidebar .brand small { color: var(--ad-accent-soft); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.admin-sidebar .menu-scroll { flex: 1 1 auto; overflow-y: auto; padding-bottom: 8px; }
.admin-sidebar .menu-section { padding: 16px 20px 6px; color: #6f7787; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }
.admin-sidebar .nav-link {
    color: #c7ccd6; padding: 9px 20px; display: flex; align-items: center; gap: 12px;
    font-size: 13.5px; border-left: 3px solid transparent; transition: background .15s, color .15s;
    text-decoration: none;
}
.admin-sidebar .nav-link i { width: 18px; font-size: 16px; text-align: center; color: #8b93a3; transition: color .15s; }
.admin-sidebar .nav-link:hover { background: var(--ad-sidebar-hover); color: #fff; }
.admin-sidebar .nav-link:hover i { color: var(--ad-accent-soft); }
.admin-sidebar .nav-link.active { background: var(--ad-sidebar-active); color: #fff; border-left-color: var(--ad-accent); font-weight: 600; }
.admin-sidebar .nav-link.active i { color: var(--ad-accent); }

.admin-sidebar .sidebar-credit { padding: 14px 20px; text-align: center; border-top: 1px solid rgba(255,255,255,.07); font-size: 12px; color: #6f7787; flex: none; }
.admin-sidebar .sidebar-credit a { color: var(--ad-accent-soft); text-decoration: none; font-weight: 600; }
.admin-sidebar .sidebar-credit a:hover { color: var(--ad-accent); }

/* "Developed by iSoft" credit badge (admin footer + sidebar) */
.dev-credit { display: inline-flex; align-items: center; gap: .45rem; }
.dev-credit__pill { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem; border-radius: 999px;
    background: rgba(181,101,74,.12); border: 1px solid rgba(181,101,74,.28); color: var(--ad-accent) !important;
    text-decoration: none !important; font-weight: 700; line-height: 1; transition: background .2s ease, color .2s ease, transform .2s ease; }
.dev-credit__pill:hover { background: var(--ad-accent); color: #fff !important; transform: translateY(-1px); }
.dev-credit__heart { font-size: .78rem; animation: devHeart 1.4s ease-in-out infinite; }
.admin-sidebar .dev-credit { justify-content: center; }
.admin-sidebar .dev-credit__pill { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #e7d9d0 !important; }
.admin-sidebar .dev-credit__pill:hover { background: var(--ad-accent); color: #fff !important; }
@keyframes devHeart { 0%,100% { transform: scale(1); } 15% { transform: scale(1.28); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .dev-credit__heart { animation: none; } }

/* ===== Main content ===== */
.admin-main { margin-left: 264px; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--ad-border); padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1010; }
.admin-topbar .page-title { font-weight: 700; color: var(--ad-primary); font-size: 18px; }
.admin-topbar .topbar-actions { gap: 6px; }
.admin-topbar .topbar-actions a { color: #4b5563; text-decoration: none; }
.admin-topbar .topbar-actions a:hover { color: var(--ad-accent); }
.admin-topbar .topbar-link { padding: 6px 8px; border-radius: 7px; }
.admin-topbar .topbar-link:hover { background: #f6f3ed; }
.admin-topbar .noti-bell { position: relative; }
.admin-topbar .noti-bell .noti-badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #c0392b; color: #fff; font-size: 10px; line-height: 16px; text-align: center; font-weight: 700; }
.admin-topbar .user-menu .dropdown-toggle { color: var(--ad-ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.admin-content { padding: 24px; flex: 1; }

/* ===== Footer bar ===== */
.admin-footer { background: #fff; border-top: 1px solid var(--ad-border); padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ad-muted); }
.admin-footer a { color: var(--ad-accent); text-decoration: none; font-weight: 600; }
.admin-footer a:hover { text-decoration: underline; }
.admin-footer .ver { font-variant-numeric: tabular-nums; }

/* ===== Cards / stats ===== */
.stat-tile { background: #fff; border-radius: 11px; padding: 20px; border: 1px solid var(--ad-border); display: flex; align-items: center; gap: 14px; box-shadow: 0 1px 2px rgba(17,24,39,.03); }
.stat-tile .icon { width: 52px; height: 52px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; flex: none; }
.stat-tile .icon.bg-brand   { background: var(--ad-primary); }
.stat-tile .icon.bg-accent  { background: var(--ad-accent); }
.stat-tile .icon.bg-success { background: #2f9e6f; }
.stat-tile .icon.bg-info    { background: #4a7c8c; }
.stat-tile .icon.bg-warning { background: #c98a2e; }
.stat-tile .icon.bg-danger  { background: #c0392b; }
.stat-tile .icon.bg-dark    { background: #1B1815; }
.stat-tile .stat-num { font-size: 24px; font-weight: 800; color: var(--ad-primary); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-tile .stat-label { color: var(--ad-muted); font-size: 13px; margin-top: 5px; }

.card { border: 1px solid var(--ad-border); border-radius: 11px; box-shadow: none; background: #fff; }
.card-header { background: #fff; border-bottom: 1px solid var(--ad-border); font-weight: 700; color: var(--ad-primary); }
.card-header a { color: var(--ad-accent); text-decoration: none; }
.card-header a:hover { text-decoration: underline; }

.table { vertical-align: middle; }
.table thead th { background: #faf8f4; font-size: 12px; color: #5a6270; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }

/* ===== Buttons / accents ===== */
.btn-primary { background: var(--ad-accent); border-color: var(--ad-accent); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: #9c7b48; border-color: #9c7b48; color: #fff; }
.btn-outline-primary { color: var(--ad-accent); border-color: var(--ad-accent); }
.btn-outline-primary:hover { background: var(--ad-accent); border-color: var(--ad-accent); color: #fff; }
a { color: var(--ad-accent); }
.text-accent { color: var(--ad-accent) !important; }
.badge.bg-accent { background: var(--ad-accent) !important; }

/* ===== Tom Select look-and-feel tweaks ===== */
.ts-wrapper.form-select { padding: 0; }
.ts-control { border-color: #ced4da; border-radius: .375rem; min-height: calc(1.5em + .75rem + 2px); }
.ts-wrapper.focus .ts-control { border-color: var(--ad-accent); box-shadow: 0 0 0 .2rem rgba(176,141,87,.18); }
.ts-dropdown .active { background: rgba(176,141,87,.14); color: var(--ad-ink); }

/* ===== Login page ===== */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1B1815 0%, #3a241c 100%); padding: 30px; }
.auth-card .auth-logo { display: block; max-height: 56px; width: auto; margin: 0 auto 6px; }
.auth-card .auth-mark { font-size: 42px; color: var(--ad-accent); }
.auth-card { background: #fff; border-radius: 14px; padding: 36px; width: 100%; max-width: 420px; box-shadow: 0 20px 48px rgba(0,0,0,.3); }
.auth-card h1 { font-size: 24px; font-weight: 700; color: var(--ad-primary); margin-bottom: 4px; text-align: center; }
.auth-card p.sub { color: var(--ad-muted); text-align: center; margin-bottom: 24px; }

/* ===== Wrap any wide table so it scrolls horizontally on small screens ===== */
.card-body > table, .card-body > .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ===== Tablet & Mobile ===== */
.sidebar-toggle { display: none; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1019; display: none; }
.sidebar-backdrop.show { display: block; }

@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); box-shadow: 4px 0 16px rgba(0,0,0,.3); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .sidebar-toggle { display: inline-flex !important; }
    .admin-topbar { padding: 10px 16px; }
    .admin-topbar .page-title { font-size: 16px; }
    .admin-content { padding: 16px; }
    .admin-footer { padding: 10px 16px; font-size: 11.5px; }
    .stat-tile { padding: 14px; gap: 10px; }
    .stat-tile .icon { width: 44px; height: 44px; font-size: 18px; }
    .stat-tile .stat-num { font-size: 20px; }
    .stat-tile .stat-label { font-size: 12px; }
}

/* ===== Mobile (<= 576px) ===== */
@media (max-width: 575.98px) {
    .admin-sidebar { width: 244px; }
    .admin-topbar .user-menu .dropdown-toggle .user-name { display: none; }
    .admin-content { padding: 12px; }
    .card-header { padding: .75rem; font-size: 14px; }
    .card-body { padding: .75rem; }
    .stat-tile { padding: 12px; }
    .stat-tile .icon { width: 38px; height: 38px; font-size: 16px; }
    .stat-tile .stat-num { font-size: 18px; }
    .table thead th { font-size: 11px; padding: .5rem .4rem; }
    .table tbody td { font-size: 13px; padding: .5rem .4rem; }
    .btn-sm { padding: .25rem .5rem; font-size: 12px; }
    .admin-footer { flex-direction: column; align-items: flex-start; }

    body { overflow-x: hidden; }
    .auth-shell { padding: 14px; }
    .auth-card { padding: 22px 18px; border-radius: 10px; max-width: 100%; width: 100%; box-sizing: border-box; margin: 0; }
    .auth-card h1 { font-size: 19px; }
}

/* Print */
@media print {
    .admin-sidebar, .admin-topbar, .admin-footer, .sidebar-toggle { display: none !important; }
    .admin-main { margin-left: 0 !important; }
    .admin-content { padding: 0 !important; }
}
