/* LANA SMS — shared look for app.lanasms.com and admin.lanasms.com (on top of Bootstrap 5.3) */
:root {
  --lana: #198754;
  --lana-dark: #0f5c39;
  --lana-soft: #e8f5ee;
  --ink: #14211a;
  --muted: #64748b;
  --line: #e6ebe8;
  --bg: #f5f7f6;
  --card: #ffffff;
  --sidebar-w: 248px;
  --radius: 12px;
  --bs-primary: #198754;
  --bs-primary-rgb: 25, 135, 84;
  --bs-link-color: #198754;
  --bs-link-hover-color: #0f5c39;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body { background: var(--bg); color: var(--ink); font-size: .935rem; }
a { text-decoration: none; }
.btn-primary { --bs-btn-bg: var(--lana); --bs-btn-border-color: var(--lana); --bs-btn-hover-bg: var(--lana-dark); --bs-btn-hover-border-color: var(--lana-dark); --bs-btn-active-bg: var(--lana-dark); --bs-btn-disabled-bg: var(--lana); --bs-btn-disabled-border-color: var(--lana); }
.btn-outline-primary { --bs-btn-color: var(--lana); --bs-btn-border-color: var(--lana); --bs-btn-hover-bg: var(--lana); --bs-btn-hover-border-color: var(--lana); --bs-btn-active-bg: var(--lana); }
.btn { border-radius: 8px; font-weight: 500; }
.form-control, .form-select { border-radius: 8px; border-color: #d7dfda; }
.form-control:focus, .form-select:focus { border-color: var(--lana); box-shadow: 0 0 0 .2rem rgba(25,135,84,.15); }
.form-label { font-weight: 600; font-size: .85rem; margin-bottom: .35rem; }
.text-muted { color: var(--muted) !important; }

/* ── Shell ─────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--line); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 1040; transition: transform .2s; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.sidebar .brand img { width: 34px; height: 34px; padding: 5px; border-radius: 9px; background: var(--lana); }
.sidebar .brand small { display: block; font-weight: 600; font-size: .7rem; color: var(--lana); letter-spacing: .08em; text-transform: uppercase; }
.sidebar nav { padding: 6px 12px; overflow-y: auto; flex: 1; }
.sidebar .nav-section { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #9aa7a0; padding: 14px 10px 6px; }
.sidebar .nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: #3d4b44; font-weight: 500; margin-bottom: 2px; }
.sidebar .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; color: #7c8a83; }
.sidebar .nav-link:hover { background: #f2f6f4; color: var(--ink); }
.sidebar .nav-link.active { background: var(--lana-soft); color: var(--lana-dark); font-weight: 600; }
.sidebar .nav-link.active i { color: var(--lana); }
.sidebar .credits-box { margin: 12px; padding: 14px; border-radius: var(--radius); background: linear-gradient(135deg, #198754, #0f5c39); color: #fff; }
.sidebar .credits-box .label { font-size: .75rem; opacity: .85; }
.sidebar .credits-box .value { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.sidebar .credits-box a { color: #fff; font-weight: 600; font-size: .8rem; }
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1030; background: rgba(245,247,246,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 12px 28px; display: flex; align-items: center; gap: 14px; }
.topbar .search { flex: 1; max-width: 520px; position: relative; }
.topbar .search input { padding-left: 38px; background: #fff; height: 40px; }
.topbar .search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.topbar .search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: #f1f5f3; color: #64748b; border: 1px solid var(--line); font-size: .7rem; padding: 2px 6px; }
.topbar .user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--lana-soft); color: var(--lana-dark); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.content { padding: 26px 28px 40px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.45rem; font-weight: 800; margin: 0; }
.page-head p { color: var(--muted); margin: 4px 0 0; }
.menu-toggle { display: none; }

/* ── Cards, stats, tables ─────────────────────────────── */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16,24,20,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 18px; font-weight: 700; border-radius: var(--radius) var(--radius) 0 0 !important; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-body { padding: 18px; }
.stat { padding: 18px; }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat .label i { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--lana-soft); color: var(--lana); font-size: .95rem; }
.stat .value { font-size: 1.7rem; font-weight: 800; margin-top: 10px; line-height: 1.1; }
.stat .hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.table { margin: 0; --bs-table-hover-bg: #f7faf8; }
.table > :not(caption) > * > * { padding: .7rem .9rem; border-color: #eef2ef; vertical-align: middle; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #7a8780; font-weight: 700; background: #fafcfb; white-space: nowrap; }
.table .msg { max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty i { font-size: 2.2rem; color: #b8c6be; display: block; margin-bottom: 8px; }
.badge { font-weight: 600; border-radius: 6px; }
.badge-soft-success { background: #e3f4ea; color: #0f6b3e; }
.badge-soft-warning { background: #fff4dc; color: #8a5a00; }
.badge-soft-danger { background: #fde8e8; color: #a11b1b; }
.badge-soft-secondary { background: #eef1f0; color: #4b5852; }
.badge-soft-info { background: #e3f0fb; color: #1d5b8f; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.key-reveal { background: #0f1b15; color: #b6f3cf; padding: 14px 16px; border-radius: 10px; word-break: break-all; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .form-control, .filters .form-select { width: auto; min-width: 180px; }

/* ── Composer ─────────────────────────────────────────── */
.counter { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.counter b { color: var(--ink); }
.recipient-tabs .nav-link { color: var(--muted); font-weight: 600; border-radius: 8px; padding: 7px 14px; }
.recipient-tabs .nav-link.active { background: var(--lana-soft); color: var(--lana-dark); }
.summary-box { background: #f8fbf9; border: 1px dashed #cfe3d7; border-radius: 10px; padding: 14px; }
.summary-box .row-line { display: flex; justify-content: space-between; padding: 3px 0; font-size: .88rem; }
.group-check { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.group-check:has(input:checked) { border-color: var(--lana); background: var(--lana-soft); }

/* ── Search results ───────────────────────────────────── */
.result-section h6 { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: #7a8780; font-weight: 700; margin: 0 0 8px; }
.result-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 9px; color: var(--ink); }
.result-item:hover { background: #f2f6f4; }
.result-item i { color: var(--lana); }
mark { background: #fff1b8; padding: 0 2px; border-radius: 3px; }

/* ── Auth pages ───────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(150deg, #198754 0%, #0b4a2d 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { font-size: 2.1rem; font-weight: 800; line-height: 1.2; }
.auth-side ul { list-style: none; padding: 0; margin: 24px 0 0; }
.auth-side li { padding: 6px 0; opacity: .92; }
.auth-side li i { margin-right: 8px; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; background: #fff; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.6rem; font-weight: 800; }
.auth-card .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; margin-bottom: 26px; color: var(--ink); }
.auth-card .brand img { width: 36px; height: 36px; padding: 5px; border-radius: 9px; background: var(--lana); }
.auth-card .form-control { height: 44px; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 10px 40px rgba(0,0,0,.15); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px 32px; }
  .topbar .search kbd { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
