/* Takanama back office */

[hidden] { display: none !important; }

/* Sign in screen styles live in takanama.css (.lg-*) */

/* Dashboard */
.p-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.p-head .h-section { margin-bottom: 0; }
.sms-banner { margin: 0 0 20px; padding: 14px 18px; border-radius: 16px; background: var(--step); font-size: 15px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.tbl tr.is-off td { color: var(--muted); }
.bar-tag { font-weight: 700; color: var(--muted); }
.a-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 24px var(--margin) clamp(40px, 5vw, 72px); }
.a-stats > div { padding: 20px 22px; border-radius: 22px; background: var(--step); animation: rise .9s var(--ease-out) both; }
.a-stats > div:nth-child(2) { animation-delay: 70ms; }
.a-stats > div:nth-child(3) { animation-delay: 140ms; }
.a-stats > div:nth-child(4) { animation-delay: 210ms; }
.a-stats p { margin: 0; font-weight: 600; color: var(--muted); }
.a-stats .display { margin-top: 8px; color: var(--fg); font-size: clamp(40px, 5vw, 80px); line-height: 1; overflow-wrap: anywhere; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.a-panel { min-height: 70vh; padding: 28px var(--margin) 96px; }
.a-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.a-panel [role="tabpanel"] { animation: rise .6s var(--ease-out) both; }
.a-panel .h-section { margin-bottom: 28px; font-size: clamp(52px, 7vw, 112px); }
.a-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.a-tools .search { position: relative; flex: 1 1 280px; }
.a-tools .search svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.a-tools .search .input { padding-left: 46px; }
.a-tools > label:not(.search) { flex: 0 1 220px; }
.a-sum { margin: 0 0 0 auto; font-weight: 600; }
.a-sum b { font-family: var(--display); font-weight: 400; font-size: 28px; }
.status-filter { display: flex; gap: 6px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; border-radius: 18px; }
.tbl { width: 100%; border-collapse: collapse; min-width: 900px; }
.tbl th { text-align: left; font-size: 14px; font-weight: 700; color: var(--muted); padding: 12px 14px; background: var(--step); }
.tbl th:first-child { border-radius: 14px 0 0 14px; }
.tbl th:last-child { border-radius: 0 14px 14px 0; }
.tbl td { padding: 16px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 15px; }
.tbl tr { transition: background var(--t-fast) var(--ease-out); }
.tbl tbody tr:hover { background: var(--step); }
.tbl tbody tr.is-gone { animation: row-out 380ms var(--ease-in) both; }
@keyframes row-out { to { opacity: 0; transform: translateX(40px); } }
.tbl tbody tr.is-flash { animation: row-flash 1.2s var(--ease-out); }
@keyframes row-flash { 0%, 25% { background: var(--fg); color: var(--bg); } }
.tbl .r { text-align: right; }
.tbl b { font-weight: 700; }
.tbl small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.tbl .amt { font-family: var(--display); font-size: 26px; line-height: 1; text-align: right; white-space: nowrap; }
.tbl .select { min-height: 44px; padding: 8px 40px 8px 14px; min-width: 150px; }
.tbl .del { color: var(--fg); }
.tbl .del:hover { background: var(--fg); color: var(--bg); }
.tbl .empty-row td { padding: 48px 14px; font-size: 18px; font-weight: 600; color: var(--muted); border: 0; }
.more { display: flex; justify-content: center; padding-top: 20px; }

.data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); }
.data-block { display: grid; gap: 18px; align-content: start; padding: clamp(22px, 3vw, 40px); border-radius: 28px; background: var(--step); }
.data-block p { margin: 0; font-size: 17px; max-width: 56ch; }
.data-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.drop {
  position: relative; display: grid; justify-items: center; gap: 12px; padding: 36px 20px; border-radius: 20px;
  background: var(--bg); text-align: center; font-weight: 600; cursor: pointer;
  outline: 2px dashed var(--step2); outline-offset: -10px;
  transition: background var(--t-fast) var(--ease-out), outline-color var(--t-fast) var(--ease-out);
}
.drop svg { width: 32px; height: 32px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop:hover, .drop.is-over { outline-color: var(--fg); }
.drop:focus-within { outline: 3px solid var(--fg); outline-offset: 2px; }
.preview { display: grid; gap: 8px; font-size: 16px; }
.preview b { font-family: var(--display); font-weight: 400; font-size: 32px; }
.preview .bad { font-weight: 700; }

@media (max-width: 900px) {
  .a-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .bar-tag { display: none; }
  .bar .btn--ghost { display: none; }
  .table-wrap { overflow: visible; }
  .tbl { min-width: 0; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody { display: block; }
  .tbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 18px; margin-bottom: 10px; border-radius: 20px; background: var(--step); }
  .tbl td { display: grid; gap: 2px; padding: 0; border: 0; }
  .tbl td::before { content: attr(data-label); font-size: 13px; font-weight: 700; color: var(--muted); }
  .tbl td.full { grid-column: 1 / -1; }
  .tbl td.r, .tbl .amt { text-align: left; }
  .tbl td.act { grid-column: 1 / -1; justify-self: end; }
  .tbl td.act::before { display: none; }
  .tbl .empty-row { display: block; background: none; }
  .a-sum { margin: 0; width: 100%; }
}
