/*
 * অ্যাডমিন প্যানেলের স্টাইল।
 *
 * সব রঙ CSS ভেরিয়েবল থেকে আসে, আর সেগুলো config/panel.php থেকে
 * লেআউটে বসানো হয়। ফলে থিম বদলাতে হলে শুধু ওই কনফিগ ফাইল বদলালেই চলে —
 * এই ফাইলে হাত দিতে হয় না।
 *
 * ইচ্ছাকৃতভাবে কোনো CSS ফ্রেমওয়ার্ক বা npm বিল্ড ব্যবহার করা হয়নি,
 * যাতে cPanel-এ ডিপ্লয় করতে কোনো বিল্ড ধাপ না লাগে।
 */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ─── লেআউট ───────────────────────────────────────────── */

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

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: #cbd5e1;
    padding: 18px 0;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 0 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 14px;
}
.sidebar-brand strong { color: #fff; font-size: 16px; }
.sidebar-brand span { display: block; font-size: 11px; color: #94a3b8; }

.sidebar-group { margin-bottom: 16px; }
.sidebar-group h4 {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #64748b;
    padding: 0 20px 6px;
    font-weight: 700;
}

.sidebar a.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 20px;
    font-size: 13.5px;
    border-left: 3px solid transparent;
}
.sidebar a.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar a.nav-item.active {
    background: rgba(255, 255, 255, .09);
    border-left-color: var(--accent);
    color: #fff;
    font-weight: 600;
}
.nav-icon {
    width: 20px; height: 20px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .12);
    display: grid; place-items: center;
    font-size: 10px; font-weight: 700;
    flex-shrink: 0;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.topbar h1 { font-size: 17px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 13px; }

.content { padding: 22px 26px 60px; flex: 1; }

/* ─── টেস্ট মোড ব্যানার ────────────────────────────────── */

.channel-banner {
    background: var(--accent);
    color: #fff;
    text-align: center;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
}

.channel-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 12.5px;
    font-weight: 600;
    background: #fff;
}
.channel-toggle .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
}
.channel-toggle:hover { border-color: var(--accent); }

/* ─── কার্ড ও টেবিল ───────────────────────────────────── */

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 11px;
    overflow: hidden;
}
.card + .card { margin-top: 18px; }
.card-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-head h2 { font-size: 15px; font-weight: 700; }
.card-head p { font-size: 12.5px; color: var(--muted); }
.card-body { padding: 18px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    padding: 15px 17px;
}
.stat .label { font-size: 12px; color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 700; line-height: 1.25; }

table { width: 100%; border-collapse: collapse; }
th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    padding: 10px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}
td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfc; }

.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }

/* ─── ব্যাজ ─────────────────────────────────────────────── */

.pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}
.pill-active { background: #dcfce7; color: #166534; }
.pill-inactive { background: #fee2e2; color: #991b1b; }
.pill-type { background: #eef2ff; color: #4338ca; }
.pill-inherit { background: #f1f5f9; color: #64748b; }
.pill-override { background: #fef3c7; color: #92400e; }
.pill-warn { background: #fee2e2; color: #991b1b; }

/* ─── ফর্ম ───────────────────────────────────────────────── */

.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 13px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 4px; }

input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 13.5px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 7px;
    border: 1px solid transparent;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: var(--accent);
    color: #fff;
}
.btn:hover { filter: brightness(.93); }
.btn-light { background: #fff; color: var(--text); border-color: var(--border); }
.btn-danger { background: #ef4444; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.actions { display: flex; gap: 6px; justify-content: flex-end; }
.inline-form { display: inline; }

/* ─── বার্তা ─────────────────────────────────────────────── */

.alert { padding: 11px 15px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px; font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* ─── লগইন ───────────────────────────────────────────────── */

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-box { width: 100%; max-width: 370px; background: #fff; border: 1px solid var(--border); border-radius: 13px; padding: 30px; }
.login-box h1 { font-size: 19px; margin-bottom: 4px; }
.login-box .sub { font-size: 13px; color: var(--muted); margin-bottom: 22px; }

@media (max-width: 820px) {
    .sidebar { display: none; }
    .grid-2 { grid-template-columns: 1fr; }
    .content { padding: 16px; }
}
