/*
 * Labsny dashboard theme (2026). Loaded after AdminLTE and the colour presets,
 * so it restyles every screen without touching the generated views.
 */
:root {
  --lb-brand: #ea5c44;
  --lb-brand-600: #d9482f;
  --lb-brand-50: #fdf0ed;
  --lb-ink: #141b2d;
  --lb-ink-2: #1e2a44;
  --lb-ink-3: #344968;
  --lb-text: #1f2633;
  --lb-muted: #6b7486;
  --lb-line: #e8eaf0;
  --lb-bg: #f4f5f9;
  --lb-card: #ffffff;
  --lb-success: #16a34a;
  --lb-warning: #f59e0b;
  --lb-info: #0ea5e9;
  --lb-danger: #e11d48;
  --lb-radius: 16px;
  --lb-radius-sm: 10px;
  --lb-shadow: 0 1px 2px rgba(20, 27, 45, .04), 0 8px 24px rgba(20, 27, 45, .06);
  --lb-shadow-lg: 0 12px 40px rgba(20, 27, 45, .12);
  --lb-font: "Inter", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html, body { font-family: var(--lb-font) !important; }
body { background: var(--lb-bg) !important; color: var(--lb-text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3 { font-family: var(--lb-font); letter-spacing: -.01em; color: var(--lb-ink); }
a { color: var(--lb-brand); }
a:hover { color: var(--lb-brand-600); }
::selection { background: var(--lb-brand); color: #fff; }

/* ---------- layout ---------- */
.content-wrapper { background: var(--lb-bg) !important; }
.content-wrapper > .content, .content-wrapper > .content-header { padding-left: 24px; padding-right: 24px; }
.content-header h1, .content-header .h1 { font-size: 1.6rem; font-weight: 800; }
.content-header h1 small { display: block; font-size: .85rem; font-weight: 500; color: var(--lb-muted); margin-top: 4px; }
.breadcrumb { background: transparent; font-size: .82rem; }
.breadcrumb-item.active { color: var(--lb-muted); }
.main-footer { background: transparent; border-top: 1px solid var(--lb-line); color: var(--lb-muted); font-size: .82rem; }

/* ---------- top bar ---------- */
.main-header.navbar {
  background: rgba(255, 255, 255, .85) !important;
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--lb-line) !important;
  min-height: 64px;
}
.main-header .nav-link { color: var(--lb-ink-3) !important; border-radius: var(--lb-radius-sm); }
.main-header .nav-link:hover { background: var(--lb-bg); color: var(--lb-ink) !important; }
.main-header .dropdown-menu { border: 0; border-radius: var(--lb-radius); box-shadow: var(--lb-shadow-lg); padding: 8px; }
.main-header .dropdown-item { border-radius: 8px; }

/* ---------- sidebar ---------- */
.main-sidebar, .main-sidebar::before { background: linear-gradient(180deg, var(--lb-ink) 0%, var(--lb-ink-2) 100%) !important; box-shadow: none !important; }
.main-sidebar .brand-link {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
  height: 64px; display: flex; align-items: center;
}
.main-sidebar .brand-link .brand-image { background: #fff; border-radius: 10px; padding: 3px; max-height: 36px; box-shadow: none; margin-left: .6rem; }
.main-sidebar .brand-link .brand-text { color: #fff !important; font-weight: 700 !important; letter-spacing: .01em; }
.main-sidebar .sidebar { padding: 8px 10px 24px; }
.nav-sidebar .nav-header { color: rgba(255, 255, 255, .38) !important; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 18px 12px 6px !important; background: transparent !important; }
.nav-sidebar .nav-link { color: rgba(255, 255, 255, .72) !important; border-radius: 12px !important; margin-bottom: 2px; padding: 9px 12px; transition: background .15s, color .15s; }
.nav-sidebar .nav-link p { font-weight: 500; }
.nav-sidebar .nav-link .nav-icon { color: rgba(255, 255, 255, .5); font-size: 1rem !important; transition: color .15s; }
.nav-sidebar .nav-link:hover { background: rgba(255, 255, 255, .06) !important; color: #fff !important; }
.nav-sidebar .nav-link:hover .nav-icon { color: #fff; }
.nav-sidebar > .nav-item > .nav-link.active,
.nav-sidebar .nav-treeview > .nav-item > .nav-link.active {
  background: linear-gradient(135deg, var(--lb-brand) 0%, #f2826d 100%) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(234, 92, 68, .35) !important;
}
.nav-sidebar .nav-link.active .nav-icon { color: #fff !important; }
.nav-sidebar .menu-open > .nav-link:not(.active) { background: rgba(255, 255, 255, .06) !important; color: #fff !important; }
.nav-sidebar .nav-treeview { padding-left: 8px; }
.nav-sidebar .nav-treeview .nav-link { padding: 7px 12px; font-size: .9rem; }
.nav-sidebar .badge-danger { background: rgba(234, 92, 68, .18); color: #ffb3a5; font-weight: 600; font-size: .62rem; padding: 3px 6px; border-radius: 6px; }
.nav-sidebar .nav-link.active .badge-danger { background: rgba(255, 255, 255, .25); color: #fff; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 3px; }

/* ---------- cards ---------- */
.card { border: 0 !important; border-radius: var(--lb-radius) !important; box-shadow: var(--lb-shadow) !important; background: var(--lb-card); margin-bottom: 24px; }
.card-header { background: transparent !important; border-bottom: 1px solid var(--lb-line) !important; padding: 16px 20px 0; border-radius: var(--lb-radius) var(--lb-radius) 0 0 !important; }
.card-header:not(:has(.nav-tabs)) { padding-bottom: 14px; }
.card-header .card-title { font-weight: 700; color: var(--lb-ink); font-size: 1.02rem; }
.card-body { padding: 20px; }
.card-footer { background: transparent; border-top: 1px solid var(--lb-line); }

/* tabs in card headers become underlined segments */
.card-header-tabs { margin-bottom: -1px !important; }
.card-header .nav-tabs { border: 0; gap: 4px; }
.card-header .nav-tabs .nav-link { border: 0 !important; color: var(--lb-muted); font-weight: 600; font-size: .9rem; padding: 10px 14px; border-bottom: 2px solid transparent !important; background: transparent !important; border-radius: 0 !important; }
.card-header .nav-tabs .nav-link:hover { color: var(--lb-ink); }
.card-header .nav-tabs .nav-link.active { color: var(--lb-brand) !important; border-bottom-color: var(--lb-brand) !important; }
.card-header .nav-tabs .ml-auto .nav-link, .card-header .nav-tabs .dropdown .nav-link { font-weight: 500; }

/* ---------- KPI tiles (dashboard small-box) ---------- */
.small-box { border-radius: var(--lb-radius) !important; box-shadow: var(--lb-shadow) !important; overflow: hidden; position: relative; color: #fff !important; }
.small-box > .inner { padding: 22px 22px 14px; position: relative; z-index: 1; }
.small-box h3 { font-size: 2.1rem; font-weight: 800; color: #fff; margin-bottom: 4px; letter-spacing: -.02em; }
.small-box p { font-weight: 500; opacity: .9; }
.small-box .icon > i { font-size: 64px !important; top: 18px !important; right: 18px; opacity: .22; color: #fff; }
.small-box::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -60px; bottom: -90px; background: rgba(255, 255, 255, .12); }
.small-box > .small-box-footer { background: rgba(0, 0, 0, .08) !important; color: rgba(255, 255, 255, .92) !important; text-align: left; padding: 8px 22px; font-weight: 600; font-size: .82rem; position: relative; z-index: 1; }
.small-box.bg-info { background: linear-gradient(135deg, #1e2a44 0%, #344968 100%) !important; }
.small-box.bg-danger { background: linear-gradient(135deg, #ea5c44 0%, #f29a6b 100%) !important; }
.small-box.bg-success { background: linear-gradient(135deg, #0f9d74 0%, #34c79b 100%) !important; }
.small-box.bg-warning { background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%) !important; }
.small-box.bg-warning, .small-box.bg-warning h3, .small-box.bg-warning p, .small-box.bg-warning .small-box-footer { color: #fff !important; }

/* ---------- buttons ---------- */
.btn { border-radius: var(--lb-radius-sm); font-weight: 600; padding: .5rem 1rem; transition: transform .1s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-sm, .btn-group-sm > .btn { border-radius: 8px; padding: .3rem .6rem; }
.btn-primary { background: var(--lb-brand) !important; border-color: var(--lb-brand) !important; color: #fff !important; box-shadow: 0 6px 16px rgba(234, 92, 68, .28); }
.btn-primary:hover { background: var(--lb-brand-600) !important; border-color: var(--lb-brand-600) !important; }
.btn-default, .btn-secondary { background: #fff; border: 1px solid var(--lb-line); color: var(--lb-ink-3); }
.btn-default:hover { background: var(--lb-bg); }
.btn-link { color: var(--lb-ink-3); }
.btn-link:hover { color: var(--lb-brand); }
.btn-link.text-danger:hover { color: var(--lb-danger) !important; }

/* ---------- forms ---------- */
.form-control, .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple {
  border-radius: var(--lb-radius-sm) !important; border: 1px solid var(--lb-line) !important; min-height: 42px; background: #fff; box-shadow: none !important;
}
.form-control:focus, .select2-container--default.select2-container--focus .select2-selection--multiple, .select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--lb-brand) !important; box-shadow: 0 0 0 4px rgba(234, 92, 68, .12) !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 40px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--lb-brand); }
.control-label, label { font-weight: 600; color: var(--lb-ink-3); font-size: .9rem; }
.form-text.text-muted { font-size: .78rem; }
.form-control-file { padding: 10px; border: 1.5px dashed var(--lb-line); border-radius: var(--lb-radius-sm); width: 100%; background: var(--lb-bg); cursor: pointer; }
.form-control-file:hover { border-color: var(--lb-brand); }
.dropzone { border: 1.5px dashed var(--lb-line) !important; border-radius: var(--lb-radius) !important; background: var(--lb-bg) !important; }

/* ---------- tables / datatables ---------- */
.table { color: var(--lb-text); }
.table thead th { border-top: 0 !important; border-bottom: 1px solid var(--lb-line) !important; color: var(--lb-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; background: #fafbfc; }
.table td { vertical-align: middle !important; border-top: 1px solid var(--lb-line) !important; }
.table-hover tbody tr:hover, .table tbody tr:hover { background: #fbf7f6; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select { border-radius: var(--lb-radius-sm); border: 1px solid var(--lb-line); padding: 6px 10px; }
.page-item .page-link { border: 0; border-radius: 8px !important; margin: 0 2px; color: var(--lb-ink-3); }
.page-item.active .page-link { background: var(--lb-brand); color: #fff; box-shadow: 0 4px 12px rgba(234, 92, 68, .3); }
.dt-buttons .btn, .right_toolbar .btn { box-shadow: none; }
.badge { border-radius: 6px; font-weight: 600; padding: .35em .6em; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #ffe4e6; color: #9f1239; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #e0f2fe; color: #075985; }

/* reels */
.reel-thumb { width: 54px; height: 96px; object-fit: cover; border-radius: 10px !important; background: var(--lb-ink); display: block; }
.reel-preview video { width: 220px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--lb-radius); background: var(--lb-ink); box-shadow: var(--lb-shadow-lg); }

/* alerts */
.alert { border: 0; border-radius: var(--lb-radius-sm); box-shadow: var(--lb-shadow); }
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-danger { background: #fff1f2; color: #9f1239; }
.alert-info { background: #eff6ff; color: #1e40af; }

/* ---------- auth pages ---------- */
body.login-page, body.register-page {
  min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(234, 92, 68, .35), transparent 60%),
              radial-gradient(900px 500px at 110% 110%, rgba(124, 58, 237, .25), transparent 60%),
              var(--lb-ink) !important;
}
.login-box, .register-box { width: 420px; max-width: calc(100% - 32px); }
.login-logo img, .register-logo img { max-height: 72px; background: #fff; border-radius: 18px; padding: 8px; box-shadow: var(--lb-shadow-lg); }
.login-box .card, .register-box .card { border-radius: 22px !important; box-shadow: 0 30px 80px rgba(0, 0, 0, .35) !important; padding: 8px 6px; }
.login-card-body, .register-card-body { border-radius: 22px; padding: 28px 26px; }
.login-box-msg, .register-box-msg { font-size: 1.05rem; font-weight: 700; color: var(--lb-ink); padding-bottom: 18px; }
.login-page .input-group-text, .register-page .input-group-text { border-radius: 0 var(--lb-radius-sm) var(--lb-radius-sm) 0; background: var(--lb-bg); border-color: var(--lb-line); }
.login-page .btn-primary, .register-page .btn-primary { width: 100%; padding: .7rem; }
.social-auth-links .btn { box-shadow: none; }

/* ---------- small screens ---------- */
@media (max-width: 767.98px) {
  .content-wrapper > .content, .content-wrapper > .content-header { padding-left: 12px; padding-right: 12px; }
  .small-box h3 { font-size: 1.6rem; }
  .card-header .nav-tabs { flex-wrap: nowrap; overflow-x: auto; }
}

/* equal-height KPI tiles */
.row > [class*="col-"] > .small-box { display: flex; flex-direction: column; height: calc(100% - 20px); }
.small-box > .inner { flex: 1 1 auto; }
