 :root {
  --primary: #ef6d25;
  --primary-dark: #c94f14;
  --ink: #090909;
  --paper: #ffffff;
  --wash: #f7f4ef;
  --line: rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-shell,
.control-panel,
.message-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.08);
}

.auth-shell { padding: 28px; }
.control-panel { padding: 20px; align-self: start; }
.message-panel { display: flex; min-height: 620px; flex-direction: column; overflow: hidden; }

.brand-mark {
  display: grid;
  height: 48px;
  width: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--primary);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark.small { height: 40px; width: 40px; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }

.field {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 8px;
  background: #fff;
  color: #000;
  padding: 11px 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(239, 109, 37, 0.14); }

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-btn { background: var(--primary); color: #fff; }
.primary-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.secondary-btn { border: 1px solid rgba(0, 0, 0, 0.16); background: #fff; color: #000; }
.secondary-btn:hover, .ghost-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.ghost-btn { border: 1px solid rgba(0, 0, 0, 0.14); background: transparent; color: #000; }
.compact { min-height: 38px; padding: 8px 12px; }

.toggle-wrap { display: flex; align-items: center; gap: 10px; color: rgba(0, 0, 0, 0.72); font-size: 14px; font-weight: 700; }
.toggle { position: relative; height: 30px; width: 58px; border-radius: 999px; background: #111; transition: background 160ms ease; }
.toggle span { position: absolute; left: 4px; top: 4px; height: 22px; width: 22px; border-radius: 999px; background: #fff; transition: transform 160ms ease; }
.toggle[aria-pressed="true"] { background: var(--primary); }
.toggle[aria-pressed="true"] span { transform: translateX(28px); }

.status-pill,
.status-dot {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}
.status-dot { background: rgba(239, 109, 37, 0.12); color: var(--primary-dark); }

.phone-stage { display: grid; min-height: 620px; place-items: center; }

.feature-phone {
  width: min(360px, 100%);
  border: 4px solid #090909;
  border-radius: 28px 28px 38px 38px;
  background: linear-gradient(145deg, #242424, #050505 48%, #343434);
  padding: 24px 22px 28px;
  box-shadow: inset 0 2px 10px rgba(255,255,255,0.08), 0 24px 60px rgba(0,0,0,0.18);
}

.speaker,
.phone-bar { margin: 0 auto 16px; height: 8px; width: 74px; border-radius: 999px; background: #050505; }

.basic-screen {
  height: 230px;
  overflow: hidden;
  border: 8px solid #1b1b1b;
  border-radius: 10px;
  background: #d7e7b5;
  color: #15210b;
  padding: 12px;
  font-family: "Courier New", monospace;
  image-rendering: pixelated;
  box-shadow: inset 0 0 28px rgba(30, 64, 20, 0.28);
}

.screen-title { border-bottom: 2px solid rgba(21, 33, 11, 0.35); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; padding-bottom: 4px; }
.basic-screen pre, .ussd-dialog pre { white-space: pre-wrap; word-break: break-word; }
.basic-screen pre { height: 112px; margin: 8px 0; overflow: auto; font-size: 14px; line-height: 1.25; }
.sms-mini { max-height: 46px; overflow: hidden; font-size: 12px; }
.screen-input { margin-top: 6px; border-top: 1px solid rgba(21, 33, 11, 0.28); padding-top: 5px; }

.nav-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 32px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.nav-pad button, .keypad button { border: 1px solid #3a3a3a; background: linear-gradient(#4a4a4a, #151515); color: #fff; box-shadow: inset 0 1px rgba(255,255,255,0.16), 0 3px 0 #000; }
.nav-pad button { height: 42px; border-radius: 999px; }
.keypad button { min-height: 58px; border-radius: 12px; font-weight: 800; }
.keypad small { display: block; color: rgba(255,255,255,0.68); font-size: 10px; letter-spacing: 0.08em; }

.smart-phone { width: min(390px, 100%); border: 10px solid #050505; border-radius: 42px; background: #050505; box-shadow: 0 24px 70px rgba(0,0,0,0.2); padding: 12px; }
.smart-screen { position: relative; min-height: 700px; overflow: hidden; border-radius: 30px; background: #111; }
.home-wallpaper { min-height: 700px; background: radial-gradient(circle at 28% 18%, rgba(239,109,37,0.38), transparent 26%), linear-gradient(145deg, #0a0a0a, #2a160c 52%, #ef6d25); padding: 28px; }
.app-pill { display: inline-grid; height: 58px; width: 58px; place-items: center; border-radius: 14px; background: rgba(255,255,255,0.92); color: var(--primary); font-size: 18px; font-weight: 900; }
.ussd-dialog { position: absolute; left: 22px; right: 22px; top: 118px; border-radius: 18px; background: rgba(255,255,255,0.97); color: #000; padding: 18px; box-shadow: 0 18px 60px rgba(0,0,0,0.34); }
.ussd-dialog h2 { margin-bottom: 8px; font-weight: 800; }
.ussd-dialog pre { max-height: 270px; overflow: auto; color: #222; }
.ussd-field { margin-top: 12px; width: 100%; border-radius: 8px; border: 1px solid rgba(0,0,0,0.18); padding: 10px; outline: none; }

.message-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 16px; }
.chat-list { display: flex; min-height: 360px; flex: 1; flex-direction: column; gap: 10px; overflow: auto; padding: 16px; background: linear-gradient(#fff, #faf7f2); }
.message-compose { border-top: 1px solid var(--line); background: #fff; padding: 14px; }
.bubble { max-width: min(82%, 560px); border-radius: 18px; padding: 11px 13px; color: #fff; line-height: 1.35; }
.bubble.outbound { align-self: flex-end; border-bottom-right-radius: 5px; background: var(--primary); }
.bubble.inbound { align-self: flex-start; border-bottom-left-radius: 5px; background: #111; }
.bubble time { display: block; margin-top: 6px; font-size: 10px; color: rgba(255,255,255,0.72); }
.smart-keyboard { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.smart-keyboard button { min-height: 34px; border-radius: 7px; background: #ececec; color: #111; font-size: 12px; font-weight: 800; }

@media (max-width: 760px) {
  .phone-stage { min-height: auto; }
  .feature-phone, .smart-phone { transform: scale(0.92); transform-origin: top center; }
  .message-panel { min-height: 520px; }
  .toggle-wrap { width: 100%; justify-content: space-between; }
}
