/* =====================================================================
   সুশীলন কালচারাল টিমের দৈনিক কাজ — Brand stylesheet
   Palette grounded in the Shushilan logo:
     blue #0061A8  ·  orange #EF8B1E  ·  green #00803A  ·  red #A81818
   Signature: a tri-colour accent band echoing the logo figure.
   ===================================================================== */

:root {
  --brand-blue:      #0061A8;
  --brand-blue-700:  #004e88;
  --brand-blue-050:  #e9f1f8;
  --brand-orange:    #EF8B1E;
  --brand-orange-050:#fdf2e3;
  --brand-green:     #00803A;
  --brand-green-050: #e6f3ec;
  --brand-red:       #A81818;

  --ink:     #1f2733;
  --muted:   #66717f;
  --line:    #e6e9ef;
  --surface: #f3f6fa;
  --card:    #ffffff;

  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 1px 2px rgba(16,32,56,.06), 0 6px 22px rgba(16,32,56,.06);
  --shadow-sm: 0 1px 3px rgba(16,32,56,.08);
  --sidebar-w: 264px;

  /* Override Bootstrap primary to the brand blue */
  --bs-primary: #0061A8;
  --bs-primary-rgb: 0,97,168;
  --bs-link-color: #0061A8;
  --bs-link-hover-color: #004e88;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
  font-family: 'Hind Siliguri', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--surface);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; }
a { text-decoration: none; }

/* The tri-colour signature band (blue → orange → green) */
.brand-band {
  height: 5px;
  background: linear-gradient(90deg,
    var(--brand-blue) 0%, var(--brand-blue) 38%,
    var(--brand-orange) 38%, var(--brand-orange) 72%,
    var(--brand-green) 72%, var(--brand-green) 100%);
}

/* ---------- Buttons ---------- */
.btn { border-radius: 10px; font-weight: 600; padding: .5rem 1.1rem; }
.btn-primary {
  background: var(--brand-blue); border-color: var(--brand-blue);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--brand-blue-700); border-color: var(--brand-blue-700);
}
.btn-accent {
  background: var(--brand-orange); border-color: var(--brand-orange); color: #fff;
}
.btn-accent:hover { background: #d9791a; border-color: #d9791a; color: #fff; }
.btn-outline-primary { color: var(--brand-blue); border-color: var(--brand-blue); }
.btn-outline-primary:hover { background: var(--brand-blue); border-color: var(--brand-blue); }
.btn-success { background: var(--brand-green); border-color: var(--brand-green); }
.btn-success:hover { background: #036b32; border-color: #036b32; }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  border-top-left-radius: var(--radius) !important;
  border-top-right-radius: var(--radius) !important;
}

/* =====================================================================
   AUTH PAGES (login / register / forgot)
   ===================================================================== */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background:
    radial-gradient(1100px 520px at 12% -10%, var(--brand-blue-050), transparent 60%),
    radial-gradient(900px 480px at 110% 110%, var(--brand-green-050), transparent 55%),
    var(--surface);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.auth-card .auth-body { padding: 30px 30px 34px; }
.auth-logo { display: block; margin: 6px auto 10px; max-height: 110px; width: auto; }
.auth-title { text-align: center; font-size: 1.18rem; margin-bottom: 2px; color: var(--brand-blue-700); }
.auth-sub { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 22px; }

/* =====================================================================
   APP SHELL (sidebar + topbar + content)
   ===================================================================== */
.app { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--brand-blue) 0%, var(--brand-blue-700) 100%);
  color: #eaf2fb;
  display: flex;
  flex-direction: column;
  z-index: 1040;
}
.sidebar .sb-head {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  display: flex; align-items: center; gap: 12px;
}
.sidebar .sb-head img { height: 44px; width: 44px; object-fit: contain;
  background: #fff; border-radius: 12px; padding: 5px; }
.sidebar .sb-head .sb-name { font-weight: 700; font-size: .98rem; line-height: 1.25; color:#fff; }
.sidebar .sb-head .sb-org  { font-size: .72rem; color: #bcd6ee; letter-spacing:.02em; }

.sidebar .nav-section { padding: 16px 14px 4px; font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: #9cc1e3; }
.sidebar .nav-link {
  color: #d7e6f6;
  border-radius: 10px;
  padding: .62rem .8rem;
  margin: 2px 10px;
  display: flex; align-items: center; gap: 12px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.sidebar .nav-link i { width: 20px; text-align: center; font-size: 1.02rem; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.sidebar .nav-link.active { background: #fff; color: var(--brand-blue-700); font-weight: 700; }
.sidebar .nav-link.active i { color: var(--brand-orange); }
.sidebar .sb-foot { margin-top: auto; padding: 14px 18px; font-size: .74rem; color: #bcd6ee;
  border-top: 1px solid rgba(255,255,255,.14); }

/* Content area */
.content { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 12px 22px;
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 1020;
}
.topbar .page-title { font-size: 1.12rem; font-weight: 700; margin: 0; }
.topbar .page-sub { font-size: .82rem; color: var(--muted); }

.content-inner { padding: 24px 22px 40px; flex: 1; }

/* Sidebar toggle (mobile) */
.sb-toggle { display: none; border: 1px solid var(--line); background:#fff; border-radius: 10px;
  width: 42px; height: 42px; font-size: 1.2rem; color: var(--brand-blue); }
.sb-backdrop { display:none; position: fixed; inset: 0; background: rgba(15,28,46,.45); z-index: 1035; }

/* =====================================================================
   STAT CARDS
   ===================================================================== */
.stat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat::before { content:""; position:absolute; left:0; top:0; bottom:0; width:5px; background: var(--brand-blue); }
.stat.is-orange::before { background: var(--brand-orange); }
.stat.is-green::before  { background: var(--brand-green); }
.stat.is-red::before    { background: var(--brand-red); }
.stat .stat-ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.25rem; margin-bottom: 10px;
  background: var(--brand-blue-050); color: var(--brand-blue);
}
.stat.is-orange .stat-ico { background: var(--brand-orange-050); color: var(--brand-orange); }
.stat.is-green  .stat-ico { background: var(--brand-green-050); color: var(--brand-green); }
.stat.is-red    .stat-ico { background: #fae9e9; color: var(--brand-red); }
.stat .stat-num { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat .stat-label { color: var(--muted); font-size: .86rem; margin-top: 4px; }

/* =====================================================================
   TABLES
   ===================================================================== */
.table-card { background:#fff; border:1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; }
.table-card .table { margin: 0; }
.table > thead th {
  background: #f7f9fc; color: var(--muted); font-weight: 700; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table > tbody td { vertical-align: middle; }
.table-hover > tbody > tr:hover > * { background: var(--brand-blue-050); }
.badge { font-weight: 600; padding: .4em .65em; border-radius: 7px; }

/* Forms */
.form-label { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.form-control, .form-select { border-radius: 10px; border-color: #d7dde6; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus {
  border-color: var(--brand-blue); box-shadow: 0 0 0 .2rem rgba(0,97,168,.15);
}
.required::after { content:" *"; color: var(--brand-red); }

/* Misc */
.page-head { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; margin-bottom: 20px; }
.text-brand { color: var(--brand-blue) !important; }
.text-accent { color: var(--brand-orange) !important; }
.avatar-circle { width:40px; height:40px; border-radius:50%; background:var(--brand-blue);
  color:#fff; display:grid; place-items:center; font-weight:700; }
.notif-dot { position:absolute; top:6px; right:6px; width:9px; height:9px; border-radius:50%;
  background: var(--brand-orange); border:2px solid #fff; }
.empty-state { text-align:center; padding: 48px 20px; color: var(--muted); }
.empty-state i { font-size: 2.4rem; color: var(--line); display:block; margin-bottom: 10px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .content { margin-left: 0; }
  .sb-toggle { display: inline-flex; align-items:center; justify-content:center; }
  .sb-backdrop.show { display: block; }
}
@media (max-width: 575.98px) {
  .content-inner { padding: 16px 14px 32px; }
  .stat .stat-num { font-size: 1.6rem; }
}

/* =====================================================================
   PRINT (report print view)
   ===================================================================== */
@media print {
  .sidebar, .topbar, .sb-toggle, .no-print, .btn { display: none !important; }
  .content { margin-left: 0 !important; }
  .content-inner { padding: 0 !important; }
  body { background: #fff; font-size: 12px; }
  .print-only { display: block !important; }
  .card, .table-card { box-shadow: none; border: 1px solid #ccc; }
  .brand-band { height: 6px; }
}
.print-only { display: none; }
