:root{
  --bg: #f3f6fb;
  --text: #0b1220;
  --muted: #6b7280;
  --line: rgba(15, 23, 42, .12);

  --blue1: #58b5ff;
  --blue2: #2c7dff;
  --blue3: #1a64ff;

  --shadow: 0 20px 60px rgba(2, 12, 36, .18);
  --radius: 16px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}

/* Background “app” imitation */
.app-shell{
  min-height: 100vh;
  display:flex;
  gap: 18px;
  padding: 18px;
}

.sidebar{
  width: 250px;
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(0,0,0,.06);
  display:flex;
  flex-direction: column;
  justify-content: space-between;
}
.k-badge{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display:grid;
  place-items:center;
  font-weight: 800;
  background: rgba(0,0,0,.08);
  margin-bottom: 10px;
}
.side-item{
  padding: 10px 10px;
  border-radius: 10px;
  color: rgba(0,0,0,.65);
}
.side-item.active{
  background: rgba(44,125,255,.14);
  color: rgba(0,0,0,.78);
}
.content{
  flex:1;
  border-radius: 14px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(0,0,0,.06);
  padding: 18px;
}
.ghost-search{
  max-width: 560px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.08);
  display:flex;
  align-items:center;
  padding: 0 14px;
  color: rgba(0,0,0,.45);
}
.tiles{
  margin-top: 16px;
  display:flex;
  gap: 12px;
}
.tile{
  height: 120px;
  flex: 1;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.01));
}

/* Dim overlay */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  backdrop-filter: blur(4px);
}

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(520px, calc(100vw - 28px));
  height: fit-content;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  z-index: 10;
  border: 1px solid rgba(255,255,255,.25);
}

.modal-hero{
  position: relative;
  padding: 26px 26px 22px;
  color: #fff;
  background: radial-gradient(1200px 260px at 30% 20%, rgba(255,255,255,.35), transparent 60%),
              linear-gradient(135deg, var(--blue1), var(--blue2) 55%, var(--blue3));
}
.modal-hero h1{
  margin: 0;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: .2px;
}
.bubbles{
  position:absolute;
  inset: 0;
  pointer-events:none;
  background:
    radial-gradient(circle at 78% 38%, rgba(255,255,255,.35) 0 32px, transparent 33px),
    radial-gradient(circle at 86% 18%, rgba(255,255,255,.25) 0 20px, transparent 21px),
    radial-gradient(circle at 68% 18%, rgba(255,255,255,.18) 0 16px, transparent 17px),
    radial-gradient(circle at 60% 52%, rgba(255,255,255,.14) 0 22px, transparent 23px),
    radial-gradient(circle at 22% 70%, rgba(255,255,255,.14) 0 18px, transparent 19px);
  opacity: .95;
}

.modal-body{
  padding: 22px 26px 24px;
}

/* Buttons */
.btn{
  width:100%;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  color: rgba(0,0,0,.82);
  border-radius: 12px;
  height: 46px;
  padding: 0 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  font-weight: 600;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
}
.btn:active{ transform: translateY(1px); }
.btn:focus-visible{
  outline: 3px solid rgba(44,125,255,.25);
  outline-offset: 2px;
}
.btn-google{
  box-shadow: 0 10px 24px rgba(2,12,36,.07);
}
.gmark{
  display:grid;
  place-items:center;
}
.btn-primary{
  border: none;
  background: linear-gradient(180deg, #2f8cff, #1d72ff);
  color:#fff;
  box-shadow: 0 14px 28px rgba(44,125,255,.25);
}
.btn-primary:disabled{
  opacity: .55;
  cursor:not-allowed;
  box-shadow:none;
}
.btn-ghost{
  width: 132px;
  background: #fff;
  border-color: rgba(0,0,0,.10);
  color: rgba(0,0,0,.72);
}
.btn-ghost:disabled{
  opacity:.55;
  cursor:not-allowed;
}

/* Divider */
.divider{
  margin: 16px 0 10px;
  display:flex;
  align-items:center;
  gap: 10px;
  color: rgba(0,0,0,.45);
  font-weight: 700;
  font-size: 12px;
}
.divider span{
  height: 1px;
  background: rgba(0,0,0,.10);
  flex: 1;
}
.divider em{ font-style: normal; letter-spacing: .4px; }

.subhead{
  margin: 10px 0 14px;
  font-size: 14px;
  font-weight: 750;
  color: rgba(0,0,0,.78);
}

/* Inputs */
.form{
  display:flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.row{
  display:flex;
  gap: 10px;
}
.input{
  flex: 1;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input:focus{
  border-color: rgba(44,125,255,.55);
  box-shadow: 0 0 0 4px rgba(44,125,255,.12);
}

/* Country button */
.country{
  width: 98px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 0 10px 0 12px;
  cursor:pointer;
  color: rgba(0,0,0,.8);
  font-weight: 700;
}
.chev{ opacity: .8; }

/* Dropdown */
.dropdown{
  display:none;
  position:absolute;
  left:0;
  top: 108px;
  width: 240px;
  background:#fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 40px rgba(2,12,36,.12);
  overflow:hidden;
  z-index: 2;
}
.dropdown.open{ display:block; }
.opt{
  width:100%;
  padding: 12px 12px;
  border: none;
  background:#fff;
  text-align:left;
  cursor:pointer;
  font-weight: 650;
  color: rgba(0,0,0,.78);
}
.opt:hover{ background: rgba(44,125,255,.08); }

/* Terms / hint */
.terms{
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(0,0,0,.55);
  text-align:center;
  line-height: 1.35;
}
.terms a{
  color: rgba(0,0,0,.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,.18);
}
.terms a:hover{ border-bottom-color: rgba(0,0,0,.35); }

.hint{
  margin: 0;
  text-align:center;
  font-size: 12px;
  color: rgba(0,0,0,.55);
  min-height: 16px;
}

/* Responsive tweaks */
@media (max-width: 860px){
  .sidebar{ display:none; }
  .app-shell{ padding: 12px; }
  .content{ border-radius: 12px; }
}
@media (max-width: 420px){
  .modal-body{ padding: 18px 16px 18px; }
  .modal-hero{ padding: 22px 16px 18px; }
  .btn-ghost{ width: 120px; }
  .country{ width: 92px; }
  .dropdown{ top: 104px; }
}
