/* LANA SMS — shared look for app.lanasms.com and admin.lanasms.com (on top of Bootstrap 5.3).
   Colours are tokens; [data-bs-theme="dark"] redefines them, so every component follows the theme. */
:root {
  --lana: #198754;
  --lana-dark: #0f5c39;
  --lana-soft: #e8f5ee;
  --ink: #14211a;
  --muted: #64748b;
  --line: #e6ebe8;
  --bg: #f5f7f6;
  --card: #ffffff;
  --card-2: #fafcfb;
  --hover: #f2f6f4;
  --input-border: #d7dfda;
  --topbar: rgba(245, 247, 246, .92);
  --sidebar-bg: #ffffff;
  --sidebar-ink: #3d4b44;
  --sidebar-icon: #7c8a83;
  --shadow: 0 1px 2px rgba(16, 24, 20, .04);
  --shadow-lg: 0 18px 50px rgba(16, 24, 20, .16);
  --sidebar-w: 248px;
  --bottom-nav-h: 64px;
  --radius: 12px;
  --bs-primary: #198754;
  --bs-primary-rgb: 25, 135, 84;
  --bs-link-color: #198754;
  --bs-link-color-rgb: 25, 135, 84;
  --bs-link-hover-color: #0f5c39;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-bs-theme="dark"] {
  --lana: #22a86b;
  --lana-dark: #46c98c;
  --lana-soft: rgba(34, 168, 107, .16);
  --ink: #e6efe9;
  --muted: #94a59c;
  --line: #233029;
  --bg: #0d1511;
  --card: #131d18;
  --card-2: #18231d;
  --hover: #1b2721;
  --input-border: #2d3b33;
  --topbar: rgba(13, 21, 17, .9);
  --sidebar-bg: #111a15;
  --sidebar-ink: #c5d2ca;
  --sidebar-icon: #7f9188;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .5);
  --bs-body-bg: #0d1511;
  --bs-body-color: #e6efe9;
  --bs-border-color: #233029;
  --bs-link-color: #46c98c;
  --bs-link-color-rgb: 70, 201, 140;
  --bs-link-hover-color: #7ee0b0;
  --bs-secondary-color: #94a59c;
  --bs-tertiary-bg: #18231d;
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-size: .935rem; transition: background .2s, color .2s; }
a { text-decoration: none; }

/* No native scrollbars; everything still scrolls (wheel, touch, keyboard) */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

.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); --bs-btn-color: #fff; --bs-btn-hover-color: #fff; }
[data-bs-theme="dark"] .btn-primary { --bs-btn-hover-bg: #1b8f5a; --bs-btn-hover-border-color: #1b8f5a; --bs-btn-active-bg: #1b8f5a; }
.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); --bs-btn-hover-color: #fff; }
.btn { border-radius: 8px; font-weight: 500; }
.btn-light { --bs-btn-bg: var(--card-2); --bs-btn-border-color: var(--line); --bs-btn-color: var(--ink); --bs-btn-hover-bg: var(--hover); --bs-btn-hover-border-color: var(--line); --bs-btn-hover-color: var(--ink); }
.form-control, .form-select { border-radius: 8px; border-color: var(--input-border); background-color: var(--card); color: var(--ink); }
.form-control:focus, .form-select:focus { border-color: var(--lana); box-shadow: 0 0 0 .2rem rgba(25, 135, 84, .15); background-color: var(--card); color: var(--ink); }
.form-control::placeholder { color: var(--muted); opacity: .8; }
.form-check-input { background-color: var(--card-2); border-color: var(--muted); }
.form-check-input:checked, .form-check-input:indeterminate { background-color: var(--lana); border-color: var(--lana); }
.form-check-input: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; }
.dropdown-menu { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-lg); border-radius: 10px; }
.dropdown-item { color: var(--ink); border-radius: 6px; }
.dropdown-item:hover { background: var(--hover); color: var(--ink); }
.dropdown-menu { padding: 6px; }
.modal-content { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal-header, .modal-footer { border-color: var(--line); }
.list-group-item { background: var(--card); color: var(--ink); border-color: var(--line); }
.accordion-item, .accordion-button { background: var(--card); color: var(--ink); border-color: var(--line); }
.accordion-button:not(.collapsed) { background: var(--lana-soft); color: var(--ink); }

/* ── Shell ─────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--sidebar-bg); border-right: 1px solid var(--line); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 1045; transition: transform .25s ease; }
.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; }
.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: var(--sidebar-icon); padding: 14px 10px 6px; }
.sidebar .nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--sidebar-ink); font-weight: 500; margin-bottom: 2px; transition: background .15s, color .15s; }
.sidebar .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; color: var(--sidebar-icon); }
.sidebar .nav-link:hover { background: var(--hover); 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; }
.sidebar-backdrop { display: none; }
.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: var(--topbar); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 12px 28px; display: flex; align-items: center; gap: 14px; }
.topbar .search { flex: 1; max-width: 560px; position: relative; }
.topbar .search input { padding-left: 38px; padding-right: 40px; background: var(--card); height: 40px; }
.topbar .search > i { position: absolute; left: 13px; top: 20px; transform: translateY(-50%); color: var(--muted); }
.topbar .search kbd { position: absolute; right: 10px; top: 20px; transform: translateY(-50%); background: var(--card-2); color: var(--muted); border: 1px solid var(--line); font-size: .7rem; padding: 2px 6px; }
.topbar .search .spinner-border { position: absolute; right: 12px; top: 12px; width: 16px; height: 16px; border-width: 2px; color: var(--lana); display: none; }
.topbar .search.loading .spinner-border { display: block; }
.topbar .search.loading kbd, .topbar .search input:not(:placeholder-shown) ~ kbd { display: none; }
.topbar .user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 1.05rem; flex-shrink: 0; }
.icon-btn:hover { background: var(--hover); }
.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; width: 100%; animation: page-in .25s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.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; }

/* Theme toggle icon follows the theme */
[data-bs-theme="dark"] .theme-light-only, :root:not([data-bs-theme="dark"]) .theme-dark-only { display: none !important; }

/* ── Live search dropdown ─────────────────────────────── */
.search-panel { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); max-height: min(70vh, 520px); overflow-y: auto; padding: 8px; display: none; z-index: 1060; }
.search.open .search-panel { display: block; animation: page-in .15s ease; }
.search-panel .sp-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 10px 10px 4px; }
.search-panel a.sp-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; color: var(--ink); }
.search-panel a.sp-item i { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--lana-soft); color: var(--lana); flex-shrink: 0; }
.search-panel a.sp-item .t { font-weight: 600; display: block; line-height: 1.25; }
.search-panel a.sp-item .s { font-size: .8rem; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-panel a.sp-item:hover, .search-panel a.sp-item.active { background: var(--hover); }
.search-panel .sp-empty { padding: 18px 10px; text-align: center; color: var(--muted); }
.search-panel .sp-all { display: block; text-align: center; padding: 9px; margin-top: 4px; border-top: 1px solid var(--line); font-weight: 600; font-size: .85rem; }

/* ── Cards, stats, tables ─────────────────────────────── */
.card { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { background: var(--card); color: var(--ink); 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-bg: transparent; --bs-table-color: var(--ink); --bs-table-hover-bg: var(--hover); --bs-table-hover-color: var(--ink); }
.table > :not(caption) > * > * { padding: .7rem .9rem; border-color: var(--line); vertical-align: middle; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: var(--card-2); 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: var(--muted); opacity: .5; 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; }
[data-bs-theme="dark"] .badge-soft-success { background: rgba(34, 168, 107, .18); color: #6fdcaa; }
[data-bs-theme="dark"] .badge-soft-warning { background: rgba(245, 180, 40, .16); color: #f5c860; }
[data-bs-theme="dark"] .badge-soft-danger { background: rgba(240, 80, 80, .16); color: #f39494; }
[data-bs-theme="dark"] .badge-soft-secondary { background: rgba(255, 255, 255, .08); color: #b9c6bf; }
[data-bs-theme="dark"] .badge-soft-info { background: rgba(80, 160, 240, .16); color: #8cc4f5; }
.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; }
.alert { border-radius: 10px; }
.pagination { --bs-pagination-bg: var(--card); --bs-pagination-color: var(--ink); --bs-pagination-border-color: var(--line); --bs-pagination-hover-bg: var(--hover); --bs-pagination-disabled-bg: var(--card-2); }

/* ── 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: var(--card-2); border: 1px dashed var(--input-border); 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; transition: border-color .15s, background .15s; }
.group-check:has(input:checked) { border-color: var(--lana); background: var(--lana-soft); }

/* Recipient chips */
.chip-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 52px; max-height: 180px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--input-border); border-radius: 10px; background: var(--card); cursor: text; transition: border-color .15s, box-shadow .15s; }
.chip-box:focus-within { border-color: var(--lana); box-shadow: 0 0 0 .2rem rgba(25, 135, 84, .15); }
.chip-box input { flex: 1; min-width: 160px; border: 0; outline: 0; background: transparent; color: var(--ink); padding: 4px 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 20px; font-size: .82rem; font-weight: 600; background: var(--lana-soft); color: var(--lana-dark); animation: page-in .15s ease; }
.chip small { font-weight: 500; opacity: .75; }
.chip.bad { background: rgba(229, 72, 77, .12); color: #c53337; }
[data-bs-theme="dark"] .chip.bad { color: #f39494; }
.chip button { border: 0; background: rgba(0, 0, 0, .08); color: inherit; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; line-height: 1; padding: 0; }
.picker { position: relative; }
.picker-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 240px; overflow-y: auto; padding: 4px; display: none; }
.picker-list.show { display: block; }
.picker-list button { display: flex; width: 100%; justify-content: space-between; gap: 10px; border: 0; background: none; color: var(--ink); text-align: left; padding: 8px 10px; border-radius: 7px; font-size: .88rem; }
.picker-list button:hover, .picker-list button.active { background: var(--hover); }
.pill-check { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: .85rem; transition: all .15s; user-select: none; background: var(--card); }
.pill-check input { display: none; }
.pill-check .n { font-weight: 500; color: var(--muted); font-size: .78rem; }
.pill-check:has(input:checked) { background: var(--lana); border-color: var(--lana); color: #fff; }
.pill-check:has(input:checked) .n { color: rgba(255, 255, 255, .8); }
.dropzone { border: 2px dashed var(--input-border); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; transition: all .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--lana); background: var(--lana-soft); color: var(--ink); }
.file-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card-2); }
.file-card .ico { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: #e7f6ec; color: #1d7a46; font-size: 1.2rem; }
.part-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 8px; }
.part-bar span { display: block; height: 100%; background: var(--lana); transition: width .15s; }
.composer-textarea { border-radius: 10px; resize: vertical; min-height: 150px; font-size: .95rem; line-height: 1.5; }
.phone-preview { background: var(--card-2); border: 1px solid var(--line); border-radius: 22px; padding: 14px; }
.phone-preview .bar { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.phone-preview .bar .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--lana); color: #fff; font-weight: 800; font-size: .8rem; }
.bubble { background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 12px; font-size: .88rem; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow-y: auto; min-height: 40px; }
.bubble.empty-msg { color: var(--muted); font-style: italic; }
.cost-big { font-size: 2rem; font-weight: 800; line-height: 1; }
.send-sticky { position: sticky; top: 84px; }

/* ── Search results page ──────────────────────────────── */
.result-section h6 { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); 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: var(--hover); }
.result-item i { color: var(--lana); }
mark { background: #fff1b8; color: inherit; padding: 0 2px; border-radius: 3px; }
[data-bs-theme="dark"] mark { background: rgba(245, 200, 80, .3); }

/* ── Loaders ──────────────────────────────────────────── */
#lana-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000; background: linear-gradient(90deg, #22c55e, #198754); box-shadow: 0 0 10px rgba(34, 197, 94, .6); opacity: 0; transition: width .3s ease, opacity .3s; }
#lana-progress.run { opacity: 1; width: 75%; transition: width 8s cubic-bezier(.1, .7, .2, 1), opacity .2s; }
#lana-progress.done { opacity: 0; width: 100%; transition: width .2s, opacity .4s .2s; }
.btn .btn-spinner { width: 1em; height: 1em; border-width: .15em; vertical-align: -.15em; margin-right: 6px; }
.skeleton { background: linear-gradient(90deg, var(--card-2) 25%, var(--hover) 50%, var(--card-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Toasts ───────────────────────────────────────────── */
.lana-toasts { position: fixed; top: 16px; right: 16px; z-index: 2100; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.lana-toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--lana); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-lg); animation: toast-in .25s ease; position: relative; overflow: hidden; }
.lana-toast.out { animation: toast-out .25s ease forwards; }
.lana-toast i.ico { font-size: 1.25rem; line-height: 1.2; }
.lana-toast .msg { flex: 1; font-size: .9rem; }
.lana-toast .x { background: none; border: 0; color: var(--muted); padding: 0 2px; font-size: 1.1rem; line-height: 1; }
.lana-toast .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: currentColor; opacity: .25; animation: toast-bar linear forwards; }
.lana-toast.success { border-left-color: #22a86b; } .lana-toast.success i.ico { color: #22a86b; }
.lana-toast.danger { border-left-color: #e5484d; } .lana-toast.danger i.ico { color: #e5484d; }
.lana-toast.warning { border-left-color: #f5a524; } .lana-toast.warning i.ico { color: #f5a524; }
.lana-toast.info { border-left-color: #3b82f6; } .lana-toast.info i.ico { color: #3b82f6; }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); height: 0; padding: 0; margin: 0; } }
@keyframes toast-bar { from { width: 100%; } to { width: 0; } }

/* ── Bottom navigation (phones) ───────────────────────── */
.bottom-nav { display: none; }

/* ── Payment modal ────────────────────────────────────── */
.pay-stage { text-align: center; padding: 8px 4px 4px; }
.pay-phone { width: 92px; height: 92px; margin: 6px auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 2.4rem; position: relative; background: var(--lana-soft); color: var(--lana); }
.pay-phone::before, .pay-phone::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--lana); opacity: 0; animation: ring 2s infinite; }
.pay-phone::after { animation-delay: 1s; }
@keyframes ring { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.7); opacity: 0; } }
.pay-phone.ok { background: rgba(34, 168, 107, .15); color: #22a86b; }
.pay-phone.fail { background: rgba(229, 72, 77, .12); color: #e5484d; }
.pay-phone.ok::before, .pay-phone.ok::after, .pay-phone.fail::before, .pay-phone.fail::after { display: none; }
.pay-phone.ok i, .pay-phone.fail i { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.pay-steps { display: flex; justify-content: center; gap: 6px; margin: 14px 0 6px; }
.pay-steps span { width: 34px; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.pay-steps span.on { background: var(--lana); }
.pay-amount { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.pin-hint { display: inline-flex; gap: 6px; margin: 10px 0; }
.pin-hint span { width: 12px; height: 12px; border-radius: 50%; background: var(--line); animation: pin 1.4s infinite; }
.pin-hint span:nth-child(2) { animation-delay: .15s; } .pin-hint span:nth-child(3) { animation-delay: .3s; } .pin-hint span:nth-child(4) { animation-delay: .45s; } .pin-hint span:nth-child(5) { animation-delay: .6s; }
@keyframes pin { 0%, 60%, 100% { background: var(--line); } 30% { background: var(--lana); } }
.cashmora-badge { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--muted); }
.cashmora-badge img { height: 22px; width: auto; }
[data-bs-theme="dark"] .cashmora-badge .on-light, :root:not([data-bs-theme="dark"]) .cashmora-badge .on-dark { display: none; }
.verify-line { font-size: .82rem; margin-top: 6px; min-height: 1.2em; display: flex; align-items: center; gap: 6px; }
.quick-amounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.quick-amounts button { border: 1px solid var(--line); background: var(--card-2); color: var(--ink); border-radius: 9px; padding: 8px 4px; font-weight: 700; font-size: .85rem; transition: all .15s; }
.quick-amounts button:hover { border-color: var(--lana); }
.quick-amounts button.on { background: var(--lana); border-color: var(--lana); color: #fff; }

/* ── 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: var(--card); position: relative; }
.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; }
.auth-card .form-control { height: 44px; }
.auth-theme { position: absolute; top: 16px; right: 16px; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 1044; animation: page-in .2s; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .content { padding: 18px 14px calc(var(--bottom-nav-h) + 28px); }
  .topbar .search kbd { display: none; }
  .topbar .user .d-md-block { display: none !important; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .lana-toasts { top: auto; bottom: calc(var(--bottom-nav-h) + 12px); right: 12px; left: 12px; width: auto; }

  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--topbar); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .68rem; font-weight: 600; background: none; border: 0; position: relative; }
  .bottom-nav i { font-size: 1.25rem; line-height: 1; }
  .bottom-nav a.active { color: var(--lana); }
  .bottom-nav a.active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--lana); }
  .bottom-nav .fab { flex: 0 0 64px; }
  .bottom-nav .fab i { width: 48px; height: 48px; margin-top: -22px; border-radius: 16px; display: grid; place-items: center; background: var(--lana); color: #fff; font-size: 1.3rem; box-shadow: 0 8px 20px rgba(25, 135, 84, .4); }
  .quick-amounts { grid-template-columns: repeat(3, 1fr); }
}

/* ── Desktop scale ────────────────────────────────────── */
/* Everything from Bootstrap is in rem, so the root size scales it; the fixed sizes above are matched here.
   Phones and tablets keep 16px: smaller inputs make iPhones zoom in on focus. */
@media (min-width: 992px) {
  html { font-size: 13px; }
  body { font-size: .96rem; }
  :root { --sidebar-w: 204px; --radius: 10px; }
  .sidebar .brand { padding: 14px 16px; gap: 8px; }
  .sidebar .brand img { width: 28px; height: 28px; }
  .sidebar nav { padding: 4px 10px; }
  .sidebar .nav-section { padding: 11px 8px 5px; }
  .sidebar .nav-link { gap: 9px; padding: 7px 10px; border-radius: 8px; }
  .sidebar .nav-link i { width: 16px; }
  .sidebar .credits-box { margin: 10px; padding: 11px; }
  .topbar { padding: 9px 22px; gap: 11px; }
  .topbar .search input { height: 32px; padding-left: 30px; }
  .topbar .search > i { left: 10px; top: 16px; }
  .topbar .search kbd { top: 16px; }
  .topbar .search .spinner-border { top: 9px; width: 14px; height: 14px; }
  .icon-btn { width: 31px; height: 31px; border-radius: 8px; }
  .avatar { width: 29px; height: 29px; }
  .content { padding: 20px 22px 32px; }
  .page-head { margin-bottom: 16px; }
  .card-header { padding: 11px 14px; }
  .card-body, .stat { padding: 14px; }
  .stat .label i { width: 25px; height: 25px; border-radius: 7px; }
  .summary-box { padding: 11px; }
  .send-sticky { top: 66px; }
  .chip-box { min-height: 42px; padding: 6px 8px; }
  .phone-preview { padding: 11px; border-radius: 18px; }
  .phone-preview .bar .av { width: 28px; height: 28px; }
  .file-card .ico { width: 31px; height: 31px; }
  .pay-phone { width: 74px; height: 74px; }
  .auth-card { max-width: 340px; }
  .auth-card .form-control { height: 36px; }
  .auth-card .brand img { width: 29px; height: 29px; }
  .auth-side { padding: 38px; }
}
.retry-bar { position: sticky; top: 70px; z-index: 10; }
@media (max-width: 991px) { .retry-bar { top: 66px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Admin: partner logos, on white so dark logos stay visible in dark mode */
.partner-logo { width: 56px; height: 36px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px; border: 1px solid var(--line); flex-shrink: 0; vertical-align: middle; }
.partner-logo-empty { display: inline-grid; place-items: center; background: var(--lana-soft); color: var(--lana); }

/* SMS chart: sent, or sent vs every attempt */
.sms-chart { display: flex; align-items: flex-end; gap: 4px; height: 170px; }
.sms-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.sms-num { color: var(--muted); font-size: .62rem; margin-bottom: 3px; }
.sms-bar { width: 100%; max-width: 28px; transition: height .2s; }
.sms-bar.sent { background: var(--lana); border-radius: 5px 5px 0 0; }
.sms-bar.sent.none { background: var(--line); }
.sms-bar.failed { background: #e5484d; border-radius: 5px 5px 0 0; margin-bottom: 1px; }
.sms-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.sms-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.sms-legend .dot.sent { background: var(--lana); }
.sms-legend .dot.failed { background: #e5484d; }

/* Tabs and notifications */
.lana-tabs { border-color: var(--line); }
.lana-tabs .nav-link { color: var(--muted); font-weight: 600; border: 0; border-bottom: 2px solid transparent; background: none; }
.lana-tabs .nav-link:hover { color: var(--ink); }
.lana-tabs .nav-link.active { color: var(--lana-dark); border-bottom-color: var(--lana); background: none; }
.notice.unread { border-left: 3px solid var(--lana); }
.notice-icon { font-size: 1.3rem; line-height: 1.2; }
.notice-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; border: 1px solid var(--card); }
.filters input[type="date"] { min-width: 0; }
[data-chart-mode].active, [data-chart-mode].active:hover { background: var(--lana); border-color: var(--lana); color: #fff; }
