/* ============================================================
   Agrani Bank OMS — Design System
   Premium solid dark-navy + restrained gold accent. No blur.
   ============================================================ */

:root {
  --navy:        #0f2547;
  --navy-2:      #16335e;
  --navy-3:      #1c3f75;
  --gold:        #c9a227;
  --gold-soft:   #f4e9c3;
  --bg:          #eef2f7;
  --surface:     #ffffff;
  --ink:         #0f172a;
  --muted:       #64748b;
  --border:      #dde3ec;
  --primary:     #1c3f75;
  --primary-hov: #16335e;
  --danger:      #b42318;
  --success:     #067647;
  --warning:     #b25e09;
  --radius:      10px;
  --radius-sm:   7px;
  --shadow:      0 1px 2px rgba(15,37,71,.06), 0 4px 14px rgba(15,37,71,.06);
  --sidebar-w:   248px;
  --font: 'Hind Siliguri', system-ui, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--navy-3); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- App shell ---- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: #cfd9ea;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand b { color: #fff; font-size: 17px; display: block; letter-spacing: .2px; }
.brand span { color: var(--gold); font-size: 12.5px; }

.nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin: 2px 0;
  color: #cfd9ea; border-radius: var(--radius-sm);
  font-size: 14.5px;
}
.nav a:hover { background: var(--navy-2); text-decoration: none; color: #fff; }
.nav a.active { background: var(--navy-3); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav .grp { padding: 14px 14px 6px; font-size: 11px; text-transform: uppercase;
            letter-spacing: 1px; color: #7f93b5; }

.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }

/* ---- Main ---- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 18px; font-weight: 600; color: var(--navy); }
.userbox { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.userbox .role { background: var(--gold-soft); color: #7a5c00; padding: 2px 10px;
                 border-radius: 20px; font-size: 12px; }
.content { padding: 24px; flex: 1; }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.card + .card { margin-top: 18px; }
.card h2 { font-size: 16px; color: var(--navy); margin-bottom: 14px; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Module Center tiles */
.tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; display: block; transition: transform .12s ease, border-color .12s;
}
.tile:hover { transform: translateY(-2px); border-color: var(--gold); text-decoration: none; }
.tile .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--navy);
             color: var(--gold); display: grid; place-items: center; font-size: 20px; margin-bottom: 12px; }
.tile b { color: var(--navy); font-size: 15.5px; display: block; }
.tile p { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 14.5px; font-weight: 500; cursor: pointer;
  background: var(--primary); color: #fff; transition: background .12s;
}
.btn:hover { background: var(--primary-hov); text-decoration: none; }
.btn-gold { background: var(--gold); color: #3a2c00; }
.btn-gold:hover { background: #b8901f; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--navy); }
.btn-ghost:hover { background: #f4f7fb; }
.btn-danger { background: var(--danger); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---- Forms ---- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13.5px; font-weight: 500; color: #334155; margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 13px; font-family: var(--font); font-size: 14.5px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--navy-3); box-shadow: 0 0 0 3px rgba(28,63,117,.12);
}
.textarea { resize: vertical; min-height: 90px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* ---- Auto-suggest dropdown ---- */
.suggest-wrap { position: relative; }
.suggest-box {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); max-height: 260px; overflow-y: auto;
}
.suggest-item { padding: 10px 13px; cursor: pointer; font-size: 14px; border-bottom: 1px solid #f1f4f9; }
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover, .suggest-item.hl { background: #f4f7fb; }
.suggest-item .cnt { float: right; font-size: 11px; color: var(--muted); }

/* ---- Tables ---- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: #f6f8fc; color: var(--navy); font-weight: 600; font-size: 13px; }
.table tbody tr:hover { background: #fafcff; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-draft { background: #eef2f7; color: #475569; }
.badge-finalized { background: #e7f0fb; color: #1c3f75; }
.badge-sent { background: #e3f5ec; color: var(--success); }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fdeceb; color: var(--danger); border: 1px solid #f6cfcb; }
.alert-ok { background: #e3f5ec; color: var(--success); border: 1px solid #bfe6d1; }

/* ---- Login ---- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--navy);
              background-image: radial-gradient(1200px 500px at 50% -10%, #16335e 0%, var(--navy) 60%); padding: 20px; }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 14px;
              box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 34px 30px; }
.login-card .lbrand { text-align: center; margin-bottom: 24px; }
.login-card .lbrand b { color: var(--navy); font-size: 20px; display: block; }
.login-card .lbrand span { color: var(--gold); font-size: 13px; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -100%; z-index: 100; transition: left .2s; }
  .sidebar.open { left: 0; }
  .menu-btn { display: inline-flex !important; }
}
.menu-btn { display: none; background: none; border: 1px solid var(--border);
            border-radius: 8px; padding: 6px 11px; cursor: pointer; font-size: 18px; }

/* ============================================================
   A4 OFFICE ORDER TEMPLATE — screen preview + print
   (Step 3-এ order print/PDF এখানকার base ব্যবহার করবে)
   ============================================================ */
.a4-page {
  width: 210mm; min-height: 297mm; margin: 20px auto; padding: 22mm 20mm;
  background: #fff; color: #111; box-shadow: var(--shadow);
  font-size: 13pt; line-height: 1.9;
}
.a4-head { text-align: center; border-bottom: 2px solid var(--navy); padding-bottom: 10px; margin-bottom: 6px; }
.a4-head .bank { font-size: 20pt; font-weight: 700; color: var(--navy); letter-spacing: .3px; }
.a4-head .office { font-size: 14pt; margin-top: 2px; }
.a4-meta { display: flex; justify-content: space-between; font-size: 12pt; margin: 14px 0; }
.a4-title { text-align: center; font-weight: 700; font-size: 14pt; text-decoration: underline; margin: 16px 0; }
.a4-foot { margin-top: 40px; display: flex; justify-content: flex-end; }
.a4-sign { text-align: center; border-top: 1px solid #333; padding-top: 6px; min-width: 200px; }

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .no-print { display: none !important; }
  .content { padding: 0; }
  .a4-page { margin: 0; box-shadow: none; width: auto; min-height: auto; padding: 0; }
  @page { size: A4; margin: 18mm; }
}
