/* =====================================================
   JomShopping – Neutral Mobile-First Theme
   ===================================================== */

:root{
  --bg: #F4F6F8;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted:#6B7280;

  --border:#E5E7EB;
  --shadow: 0 16px 40px rgba(2,6,23,.08);

  --radius: 18px;
  --radius-sm: 12px;

  --accent: #111827;     /* neutral charcoal */
  --accent-soft: rgba(17,24,39,.06);
  --focus: rgba(17,24,39,.18);
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 40%, var(--bg) 100%);
  overflow-x: hidden;
}

/* =====================================================
   Layout
   ===================================================== */

.page{
  min-height: 100vh;
  padding: calc(18px + env(safe-area-inset-top)) 16px
           calc(18px + env(safe-area-inset-bottom));
  display:flex;
  align-items:center;
  justify-content:center;
}

/* =====================================================
   Card
   ===================================================== */

.card,
.auth-card,
.dash-card{
  width:100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  overflow:hidden;
}

/* =====================================================
   Header / Brand
   ===================================================== */

.brand,
.top{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom: 14px;
}

.brand-badge,
.badge{
  width:44px;
  height:44px;
  border-radius: 14px;
  background: var(--accent);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  letter-spacing:.5px;
  flex: 0 0 auto;
}

.brand h1,
.title-wrap h1{
  margin:0;
  font-size: 20px;
  line-height:1.15;
  letter-spacing:-0.2px;
}

.brand p,
.subtitle{
  margin:5px 0 0;
  font-size:13px;
  color: var(--muted);
  line-height:1.35;
  word-break: break-word;
}

/* =====================================================
   Text Blocks
   ===================================================== */

.welcome{
  margin: 6px 0 14px;
}
.welcome h2{
  margin:0;
  font-size:18px;
}
.welcome p{
  margin:6px 0 0;
  font-size:13px;
  color: var(--muted);
  line-height:1.4;
}

.hint{
  margin-top:14px;
  font-size:12px;
  color: var(--muted);
  text-align:center;
}

/* =====================================================
   Form
   ===================================================== */

form{ width:100%; }

.form-group{ margin-top:12px; }

.label{
  display:block;
  margin-bottom:8px;
  font-size:13px;
  color: var(--muted);
}

.input{
  width:100%;
  padding:13px 14px;
  border-radius: var(--radius-sm);
  border:1px solid var(--border);
  font-size:16px;
  background:#fff;
  outline:none;
  transition:.15s ease;
}

.input:focus{
  border-color: rgba(17,24,39,.35);
  box-shadow: 0 0 0 4px var(--focus);
}

/* input with icon */
.input-wrap{
  position:relative;
}
.input-wrap .input{
  padding-right:48px;
}
.icon-btn{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  border:1px solid var(--border);
  background:#fff;
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
  font-size:14px;
}

/* row */
.form-row{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.check{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
  color: var(--muted);
}
.check input{
  width:16px;
  height:16px;
  accent-color: var(--accent);
}

.link{
  font-size:13px;
  font-weight:700;
  color: var(--accent);
  text-decoration:none;
  white-space:nowrap;
}
.link:hover{ text-decoration:underline; }

/* =====================================================
   Buttons
   ===================================================== */

.btn{
  width:100%;
  padding:14px;
  border-radius: var(--radius-sm);
  border:1px solid var(--border);
  background:#fff;
  color: var(--text);
  font-weight:800;
  font-size:15px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  transition:.15s ease;
}

.btn:active{ transform:translateY(1px); }
.btn:hover{ border-color: rgba(17,24,39,.25); }

.btn-primary{
  background: var(--accent);
  color:#fff;
  border-color: transparent;
}

.btn-danger{
  color:#b91c1c;
  border-color: rgba(185,28,28,.25);
}

.btn-ghost{
  background:#fff;
  border:1px solid var(--border);
}

/* button inner */
.btn .left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.icon{
  width:34px;
  height:34px;
  border-radius:12px;
  background: var(--accent-soft);
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.btn-primary .icon{
  background: rgba(255,255,255,.18);
}

.text{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.text strong{
  font-size:15px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.text span{
  font-size:12px;
  color: var(--muted);
  margin-top:3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.btn-primary .text span{
  color: rgba(255,255,255,.85);
}

.chev{
  opacity:.55;
  flex:0 0 auto;
}

/* =====================================================
   Message
   ===================================================== */

.msg{
  margin-top:12px;
  padding:12px 14px;
  border-radius: var(--radius-sm);
  border:1px solid var(--border);
  background:#fff;
  font-size:14px;
  display:none;
  word-wrap:break-word;
}

.msg.success{
  display:block;
  border-color: rgba(17,24,39,.25);
  background: rgba(17,24,39,.05);
}

.msg.error{
  display:block;
  border-color: rgba(220,38,38,.25);
  background: rgba(220,38,38,.05);
}

/* =====================================================
   Divider
   ===================================================== */

.divider{
  margin:14px 0 10px;
  position:relative;
  text-align:center;
}
.divider:before{
  content:"";
  position:absolute;
  left:0; right:0;
  top:50%;
  height:1px;
  background: var(--border);
}
.divider span{
  position:relative;
  background: var(--card);
  padding:0 10px;
  font-size:12px;
  color: var(--muted);
}

/* =====================================================
   Utilities
   ===================================================== */

.section{
  margin-top:10px;
  padding-top:12px;
  border-top:1px solid var(--border);
}

.grid{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

/* =====================================================
   Small devices
   ===================================================== */

@media (max-width:360px){
  .auth-card,
  .dash-card{
    padding:16px;
    border-radius:16px;
  }
  .brand h1,
  .title-wrap h1{
    font-size:19px;
  }
}
