/* Reset */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Inter, Arial, sans-serif; background:#0b0d10; color:#e8ecf1;}
a { color: inherit; }

/* Phone frame */
.app-wrapper { display: grid; place-items: center; min-height: 100dvh; padding: 24px; }
.phone {
  width: 390px; height: 780px;
  border-radius: 36px; border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, #141820, #0f1218);
  box-shadow: 0 10px 40px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.06);
  overflow: hidden; position: relative;
}

/* Header */
.app-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 12px 0 8px;
  background: rgba(10,12,16,.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.title { font-weight: 600; opacity: .9; }
.icon-btn {
  background: rgba(255,255,255,.06); color: #e8ecf1;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 6px 10px; cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,.12); }

/* Main view area */
.view {
  position: absolute; inset: 56px 0 76px; /* a bit taller tabbar with labels */
  overflow: auto; padding: 14px;
}

/* Tabbar with icons */
.tabbar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 76px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  padding: 8px 10px; background: rgba(10,12,16,.9); backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255,255,255,.06);
}
.tab {
  background: rgba(255,255,255,.04); color: #cfe2ff;
  border: 1px solid rgba(255,255,255,.08); border-radius: 14px;
  font-weight: 600; cursor: pointer;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  padding: 6px 4px;
}
.tab-icn { width: 20px; height: 20px; opacity: .9; }
.tab-label { font-size: 11px; opacity: .95; line-height: 1; }
.tab.active, .tab:hover { background: rgba(86,156,214,.22); border-color: rgba(86,156,214,.45); color: #fff; }
.tab.active .tab-icn { opacity: 1; }
.tab:focus { outline: 2px solid rgba(86,156,214,.6); outline-offset: 2px; }

/* Cards / Sections */
.card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 14px; margin-bottom: 12px;
}
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; opacity: .9; }
.grid { display: grid; gap: 10px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 10px 12px; border-radius: 12px; cursor:pointer;
  background: #1d2836; border: 1px solid rgba(86,156,214,.45); color:#d7ecff; font-weight:600;
}
.btn:hover { background:#243345; }
.btn.secondary { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color:#e8ecf1; }
.chips { display:flex; flex-wrap:wrap; gap:8px; }
.chip { padding:6px 10px; border-radius:999px; background: rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.10); font-size:12px; }

.list { display: grid; gap: 8px; }
.list .item { display:flex; align-items:flex-start; gap:10px; padding:10px; border-radius:12px;
  background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.06);
}
.kicker { font-size: 12px; opacity: .7; text-transform: uppercase; letter-spacing:.04em; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Scroll box for AI result */
.scrollbox {
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  border-radius: 12px;
  background: rgba(0,0,0,.3);
  border:1px solid rgba(255,255,255,.08);
  white-space: pre-wrap;
}

/* Forms */
.input, .select, .file {
  width:100%;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10); color:#fff;
  padding:10px 12px; border-radius:12px;
}
.label { font-size:12px; opacity:.8; margin: 8px 0 6px; }
.row { display:flex; gap:10px; align-items:center; }
.row > * { flex:1 1 auto; }

/* Helpers */
.hidden { display: none !important; }
.center { text-align:center; }
.small { font-size: 12px; opacity: .8; }
.success { color: #9be7a0; }
.warn { color: #ffd16b; }
.danger { color: #ff9b9b; }
