/* =========================================================
   AKTABE – Admin Panel Stylesheet
   Modern clean admin dashboard UI
   ========================================================= */

:root {
    --admin-primary: #7b1f7f;
    --admin-primary-dark: #5c1460;
    --admin-bg: #f4f2f7;
    --admin-sidebar-bg: #1b1222;
    --admin-sidebar-w: 260px;
    --admin-text: #2d2636;
    --admin-muted: #736b7e;
    --admin-line: #e3deeb;
    --admin-card: #ffffff;
    --admin-radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
body.admin-body {
    margin: 0; font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: var(--admin-bg); color: var(--admin-text); font-size: 15px; line-height: 1.6;
}

a { color: var(--admin-primary); text-decoration: none; }
a:hover { color: var(--admin-primary-dark); }

/* ---------- Login Screen ---------- */
body.login-body {
    min-height: 100vh; display: grid; place-items: center; background: #1b1222; padding: 20px;
}
.login-card {
    background: #fff; width: 100%; max-width: 420px; padding: 36px; border-radius: 18px;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,.5);
}
.login-head { text-align: center; margin-bottom: 24px; }
.login-head img { margin-bottom: 12px; }
.login-head h1 { font-size: 1.6rem; margin: 0 0 4px; color: var(--admin-primary); font-weight: 800; }
.login-head p { margin: 0; color: var(--admin-muted); font-size: .88rem; }
.login-foot { text-align: center; margin-top: 24px; font-size: .85rem; }

/* ---------- Layout ---------- */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: var(--admin-sidebar-w); background: var(--admin-sidebar-bg); color: #fff;
    display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand img { background: #fff; border-radius: 50%; padding: 2px; }
.sidebar-brand .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.sidebar-brand strong { font-size: 1.2rem; font-weight: 800; color: #fff; }
.sidebar-brand small { color: rgba(255,255,255,.6); font-size: .75rem; }

.sidebar-menu { padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 10px;
    color: rgba(255,255,255,.75); font-weight: 600; font-size: .92rem; transition: .2s;
}
.sidebar-menu a i { font-size: 1.1rem; }
.sidebar-menu a:hover, .sidebar-menu a.is-active { background: var(--admin-primary); color: #fff; }

.sidebar-footer { padding: 16px 12px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 6px; }
.sidebar-footer a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: .85rem; }
.sidebar-link-site { color: rgba(255,255,255,.8); background: rgba(255,255,255,.06); }
.sidebar-link-site:hover { color: #fff; background: rgba(255,255,255,.14); }
.sidebar-link-logout { color: #ff8b8b; }
.sidebar-link-logout:hover { background: rgba(255,0,0,.15); }

.admin-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-header {
    height: 70px; background: #fff; border-bottom: 1px solid var(--admin-line);
    display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
    position: sticky; top: 0; z-index: 50;
}
.admin-title { font-size: 1.25rem; font-weight: 800; margin: 0; }
.sidebar-toggle { display: none; background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--admin-text); }
.admin-user-info { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; }

.admin-main { padding: 28px; flex: 1; }

/* ---------- Cards & Boxes ---------- */
.dash-welcome { background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-dark)); color: #fff; padding: 28px; border-radius: var(--admin-radius); margin-bottom: 24px; }
.dash-welcome h2 { color: #fff; margin: 0 0 6px; font-size: 1.5rem; }
.dash-welcome p { margin: 0; opacity: .9; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.dash-card {
    background: #fff; padding: 20px; border-radius: var(--admin-radius); border: 1px solid var(--admin-line);
    display: flex; align-items: center; gap: 16px; color: var(--admin-text); transition: .25s;
}
.dash-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px -10px rgba(0,0,0,.1); border-color: transparent; }
.dash-card-icon { width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; background: rgba(123,31,127,.1); color: var(--admin-primary); font-size: 1.4rem; }
.dash-card-body { display: flex; flex-direction: column; }
.dash-card-body strong { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.dash-card-body span { color: var(--admin-muted); font-size: .84rem; font-weight: 600; }

.dash-grid, .dash-grid-2 { display: grid; gap: 24px; }
.dash-grid { grid-template-columns: 1fr 1fr; }
.dash-grid-2 { grid-template-columns: 1fr 1.2fr; }

.dash-box { background: #fff; border: 1px solid var(--admin-line); border-radius: var(--admin-radius); padding: 24px; }
.dash-box h3, .dash-box h4 { margin: 0 0 16px; font-size: 1.1rem; }
.dash-box-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.dash-box-head h3 { margin: 0; }

.empty-pages-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.empty-pages-list li { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--admin-bg); border-radius: 8px; font-size: .9rem; }

/* ---------- Tabs ---------- */
.dash-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-item { padding: 10px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--admin-line); color: var(--admin-text); font-weight: 600; font-size: .88rem; }
.tab-item:hover, .tab-item.is-active { background: var(--admin-primary); color: #fff; border-color: var(--admin-primary); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; }
.form-control {
    width: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--admin-line);
    font-family: inherit; font-size: .95rem; background: #fff; transition: border-color .2s;
}
.form-control:focus { outline: 0; border-color: var(--admin-primary); }
textarea.form-control { resize: vertical; }
.form-text { font-size: .8rem; color: var(--admin-muted); margin-top: 4px; display: block; }
.form-row { display: flex; gap: 16px; }
.form-row .col { flex: 1; }
.form-row .col-3 { width: 25%; }
.form-row .col-4 { width: 33.33%; }
.form-row .col-6 { width: 50%; }
.form-row .col-8 { width: 66.66%; }

.check-group { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.checkbox-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }

.form-actions { display: flex; gap: 10px; margin-top: 24px; }
.btn-block { width: 100%; }

/* Alerts & Badges */
.alert { padding: 12px 16px; border-radius: 8px; font-weight: 600; font-size: .9rem; margin-bottom: 20px; }
.alert-success { background: #e3f7ed; color: #0d6832; border: 1px solid #b6ebcd; }
.alert-danger { background: #fde8e8; color: #9b1c1c; border: 1px solid #f8b4b4; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #eee; }
.badge.success { background: #e3f7ed; color: #0d6832; }
.badge.danger { background: #fde8e8; color: #9b1c1c; }
.badge-subtle { background: rgba(123,31,127,.1); color: var(--admin-primary); }

/* Tables */
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--admin-line); vertical-align: middle; }
.admin-table th { font-weight: 700; background: var(--admin-bg); }
.btn-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--admin-line); background: #fff; color: var(--admin-text); }
.btn-icon:hover { background: var(--admin-primary); color: #fff; border-color: var(--admin-primary); }
.btn-icon.danger:hover { background: #d92525; color: #fff; border-color: #d92525; }
.table-thumb { width: 44px; height: 36px; object-fit: cover; border-radius: 6px; }

/* Menu & Slide admin lists */
.menu-list-admin, .slides-admin-list { display: grid; gap: 10px; }
.menu-item-row, .slide-admin-card {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px;
    background: var(--admin-bg); border-radius: 10px; border: 1px solid var(--admin-line);
}
.menu-item-row.is-sub { margin-left: 20px; background: #fff; border-left: 3px solid var(--admin-primary); }
.menu-item-info, .slide-admin-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.menu-item-info small, .slide-admin-body small { color: var(--admin-muted); font-size: .82rem; }
.menu-item-actions, .slide-admin-actions { display: flex; align-items: center; gap: 8px; }

.slide-admin-thumb img { width: 80px; height: 50px; object-fit: cover; border-radius: 6px; }
.thumb-preview { margin-bottom: 8px; }
.thumb-preview img { max-width: 200px; max-height: 120px; border-radius: 8px; border: 1px solid var(--admin-line); }

.color-picker-row { display: flex; gap: 10px; align-items: center; }
.color-input { width: 60px; height: 42px; padding: 4px; cursor: pointer; }

@media (max-width: 992px) {
    .admin-sidebar { position: fixed; left: -260px; z-index: 200; transition: left .3s; }
    body.sidebar-open .admin-sidebar { left: 0; }
    .sidebar-toggle { display: block; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .dash-grid, .dash-grid-2 { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 0; }
    .form-row .col-3, .form-row .col-4, .form-row .col-6, .form-row .col-8 { width: 100%; }
}
