/* REDIGI 1.8.4 — responsive layout and action polish.
   Main theme remains untouched; this file only fixes module presentation. */

/* Consistent action controls across public pages and dashboards. */
main .btn{
    position:relative;
    max-width:100%;
    min-height:44px;
    padding:0 18px;
    border-radius:12px;
    line-height:1.2;
    text-align:center;
    white-space:normal;
    cursor:pointer;
    overflow:hidden;
    isolation:isolate;
    font-weight:800;
    letter-spacing:-.01em;
}
main .btn .icon{flex:0 0 auto}
main .btn-primary{
    background:linear-gradient(135deg,var(--primary-2),var(--primary-dark));
    border-color:rgba(255,106,123,.28);
    box-shadow:0 10px 28px rgba(239,35,60,.22),inset 0 1px 0 rgba(255,255,255,.12);
}
main .btn-ghost{
    color:#f4f5f7;
    background:linear-gradient(180deg,#181b23,#12151b);
    border-color:#313642;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 9px 24px rgba(0,0,0,.16);
}
main .btn-danger{
    color:#ff93a0;
    background:linear-gradient(180deg,#3b121b,#271016);
    border-color:#6c2632;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
main .btn:hover{transform:translateY(-1px)}
main .btn:active{transform:translateY(0) scale(.985)}
main .btn:disabled,main .btn[aria-disabled="true"]{opacity:.52;cursor:not-allowed;transform:none;box-shadow:none}
main .btn-xs{min-height:34px;padding:0 11px;border-radius:9px;font-size:11px;gap:6px}
main .form-actions,main .dashboard-action-row,main .table-actions{gap:9px}
main .table-actions form,main .form-actions form{margin:0}

/* Public Rekber page: stop horizontal overflow and keep the flow readable. */
body[data-current-page="rekber"] main{overflow:hidden}
body[data-current-page="rekber"] .rekber-hero .hero-grid{
    grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
    gap:clamp(28px,5vw,68px);
    align-items:center;
}
body[data-current-page="rekber"] .rekber-copy{min-width:0}
body[data-current-page="rekber"] .rekber-copy h1{
    max-width:760px;
    overflow-wrap:normal;
    word-break:normal;
}
body[data-current-page="rekber"] .rekber-copy>p{max-width:650px;line-height:1.75}
body[data-current-page="rekber"] .rekber-actions{display:flex;flex-wrap:wrap;align-items:center}
body[data-current-page="rekber"] .rekber-actions .btn{min-width:210px}
body[data-current-page="rekber"] .rekber-flow{
    min-width:0;
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr);
    align-items:center;
    gap:10px;
    padding:24px;
    border-radius:22px;
    background:linear-gradient(180deg,rgba(23,26,34,.96),rgba(14,16,21,.96));
    box-shadow:0 24px 65px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.035);
}
body[data-current-page="rekber"] .flow-step{min-width:0;display:grid;grid-template-columns:38px minmax(0,1fr);gap:11px;align-items:center}
body[data-current-page="rekber"] .flow-step>span{width:38px;height:38px}
body[data-current-page="rekber"] .flow-step div{min-width:0}
body[data-current-page="rekber"] .flow-step strong{font-size:12px;line-height:1.35}
body[data-current-page="rekber"] .flow-step small{font-size:10px;line-height:1.45}
body[data-current-page="rekber"] .rekber-flow>i{display:block;width:100%;height:1px;background:linear-gradient(90deg,#353a46,#4b515f,#353a46)}
body[data-current-page="rekber"] .steps-grid>*{min-width:0}
body[data-current-page="rekber"] .form-and-info>*{min-width:0}
body[data-current-page="rekber"] .form-card,body[data-current-page="rekber"] .info-card,body[data-current-page="rekber"] .table-card{box-shadow:0 18px 50px rgba(0,0,0,.12)}
body[data-current-page="rekber"] .fee-preview{border-radius:12px}

/* Seller inventory page: contain wide tables and create clear visual hierarchy. */
.inventory-layout{grid-template-columns:minmax(230px,270px) minmax(0,1fr);align-items:start;gap:18px}
.inventory-layout>*,.inventory-content,.inventory-stock-form,.inventory-history-card,.inventory-history-card .table-responsive{min-width:0;max-width:100%}
.inventory-content{display:grid;gap:18px;align-content:start}
.inventory-products{
    position:sticky;
    top:98px;
    padding:12px;
    gap:8px;
    border-radius:18px;
    box-shadow:0 18px 48px rgba(0,0,0,.16);
}
.inventory-products-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 8px 12px;border-bottom:1px solid var(--line)}
.inventory-products-head>div{min-width:0}
.inventory-products-head small,.inventory-kicker{display:block;color:#ff6679;font-size:9px;font-weight:900;letter-spacing:.15em}
.inventory-products-head h3{margin:3px 0 0;font-size:16px}
.inventory-products-head>span,.inventory-count{display:inline-flex;align-items:center;justify-content:center;min-width:31px;height:31px;padding:0 9px;border:1px solid rgba(239,35,60,.25);border-radius:10px;background:rgba(239,35,60,.08);color:#ff7182;font-size:10px;font-weight:900;white-space:nowrap}
.inventory-products a.inventory-product-item{
    display:grid;
    grid-template-columns:42px minmax(0,1fr) 18px;
    align-items:center;
    justify-content:initial;
    gap:11px;
    min-width:0;
    padding:11px;
    border:1px solid transparent;
}
.inventory-products a.inventory-product-item.active{border-color:rgba(239,35,60,.28);box-shadow:inset 3px 0 0 var(--primary)}
.inventory-product-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#20242d;font-size:20px}
.inventory-product-item>div{min-width:0}
.inventory-product-item strong,.inventory-product-item small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inventory-product-item strong{font-size:11px;color:#fff}
.inventory-product-item small{margin-top:3px;font-size:9px;color:var(--muted)}
.inventory-product-item>.icon{color:#626978}
.inventory-stock-form{padding:22px}
.inventory-stock-form .form-card-head{padding-bottom:18px;margin-bottom:18px;border-bottom:1px solid var(--line)}
.inventory-stock-form .form-card-head h2{margin-top:3px;line-height:1.3}
.inventory-stock-field{margin-top:15px}
.inventory-stock-field textarea{min-height:260px;line-height:1.7;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.inventory-field-note{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:2px}
.inventory-field-note>span{display:inline-flex;align-items:center;gap:6px;color:#77dc9a;font-size:10px}
.inventory-field-note>small{margin-left:auto;text-align:right}
.inventory-submit-row{display:flex;justify-content:flex-end;margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}
.inventory-history-card{margin:0}
.inventory-history-card .table-card-head{align-items:center}
.inventory-history-card .table-responsive{width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
.inventory-history-card table{min-width:680px}
.inventory-history-card td:last-child{white-space:nowrap}
.inventory-empty-row{display:flex;align-items:center;justify-content:center;gap:12px;min-height:130px;padding:24px;text-align:left}
.inventory-empty-row>span{width:46px;height:46px;display:grid;place-items:center;border-radius:13px;background:rgba(239,35,60,.09);color:#ff7181}
.inventory-empty-row>div{display:flex;flex-direction:column;gap:4px}
.inventory-empty-row strong{color:#fff;font-size:13px}
.inventory-empty-row small{color:var(--muted);font-size:10px;line-height:1.5}

/* Keep action rows usable rather than oversized or cramped. */
.dashboard-main .form-actions{flex-wrap:wrap}
.dashboard-main .table-actions{justify-content:flex-start;flex-wrap:wrap}
.dashboard-main .table-actions .btn{width:auto}

@media(max-width:980px){
    body[data-current-page="rekber"] .rekber-hero .hero-grid{grid-template-columns:1fr;gap:28px}
    body[data-current-page="rekber"] .rekber-copy h1{max-width:16ch}
    body[data-current-page="rekber"] .rekber-flow{max-width:760px}
}

@media(max-width:820px){
    .inventory-layout{grid-template-columns:1fr}
    .inventory-products{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}
    .inventory-products-head{grid-column:1/-1}
}

@media(max-width:720px){
    body[data-current-page="rekber"] .rekber-hero{padding:46px 0 52px}
    body[data-current-page="rekber"] .rekber-copy h1{font-size:clamp(35px,10vw,48px);line-height:1.07;letter-spacing:-.045em;max-width:100%}
    body[data-current-page="rekber"] .rekber-copy>p{font-size:14px;line-height:1.65}
    body[data-current-page="rekber"] .rekber-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}
    body[data-current-page="rekber"] .rekber-actions .btn{width:100%;min-width:0;padding-inline:12px;font-size:12px}
    body[data-current-page="rekber"] .rekber-flow{grid-template-columns:1fr;gap:0;padding:18px}
    body[data-current-page="rekber"] .rekber-flow>i{width:1px;height:18px;margin:3px 0 3px 18px;background:linear-gradient(180deg,#343a46,#555c69)}
    body[data-current-page="rekber"] .flow-step{grid-template-columns:38px minmax(0,1fr);padding:4px 0}
    body[data-current-page="rekber"] .flow-step strong{font-size:13px}
    body[data-current-page="rekber"] .flow-step small{font-size:11px}
    body[data-current-page="rekber"] .form-and-info{grid-template-columns:1fr}
    body[data-current-page="rekber"] .form-card,body[data-current-page="rekber"] .info-card{min-width:0}
    .inventory-stock-form{padding:17px}
    .inventory-stock-form .form-card-head{align-items:flex-start}
    .inventory-field-note{align-items:flex-start;flex-direction:column}
    .inventory-field-note>small{margin-left:0;text-align:left}
    .inventory-submit-row{display:grid}
    .inventory-submit-row .btn{width:100%}
    .inventory-history-card .table-card-head{align-items:flex-start;flex-direction:column}
    .inventory-history-card table{min-width:630px}
}

@media(max-width:520px){
    body[data-current-page="rekber"] .rekber-actions{grid-template-columns:1fr}
    body[data-current-page="rekber"] .rekber-actions .btn{min-height:46px}
    .inventory-products{grid-template-columns:1fr}
    .inventory-stock-field textarea{min-height:230px}
    .inventory-empty-row{justify-content:flex-start;padding:20px 16px}
    main .form-actions{display:grid;grid-template-columns:1fr;width:100%}
    main .form-actions .btn,main .form-actions a.btn{width:100%}
}

/* Jarak aman untuk bottom navigation Android dan kartu dashboard mobile. */
@media(max-width:680px){
  body{padding-bottom:calc(104px + env(safe-area-inset-bottom))}
  .dashboard-shell{padding-bottom:118px}
  .site-footer{padding-bottom:36px}
  .dashboard-topbar{margin-bottom:18px}
  .dashboard-topbar h1{line-height:1.12}
  .dashboard-topbar p{font-size:12px;line-height:1.55}
  .dashboard-sidebar{margin-inline:-1px;border-radius:16px}
  .mobile-bottom-nav{height:72px;padding-bottom:env(safe-area-inset-bottom);border-radius:24px 24px 0 0;box-shadow:0 -12px 36px rgba(0,0,0,.36)}
}
