@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --line: #E4E8F0;
  --line-2: #EEF1F6;
  --ink-1: #0F172A;
  --ink-2: #1F2937;
  --ink-3: #475569;
  --ink-4: #64748B;
  --ink-5: #94A3B8;
  --nav-bg: #0B1426;
  --nav-bg-2: #0F1B33;
  --brand-50: #EFF5FF;
  --brand-100: #DCE8FF;
  --brand-200: #B9D2FF;
  --brand-400: #5E89F6;
  --brand-500: #3B6FE8;
  --brand-600: #2A57CC;
  --brand-700: #1E40AF;
  --ice-100: #D2F4FF;
  --ice-200: #A5E7F9;
  --ice-400: #38BDF8;
  --ice-500: #06AED5;
  --good: #10B981;
  --danger: #DC2626;
  --warn: #F59E0B;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius-sm: 6px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
}

/* ── LAYOUT ── */
.ktu-login-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  font-family: var(--font-sans);
  color: var(--ink-1);
  -webkit-font-smoothing: antialiased;
}

/* ── LEFT BRAND PANEL ── */
.ktu-login-brand {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(59,111,232,0.28), transparent 55%),
    linear-gradient(165deg, #13203A 0%, #0B1426 55%, #080F1E 100%);
  color: #E6ECF6;
  padding: 48px 52px;
  display: flex;
  flex-direction: column;
}

.ktu-login-brand-rings {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(94,137,246,0.25);
  box-shadow: 0 0 0 40px rgba(94,137,246,0.06), 0 0 0 90px rgba(94,137,246,0.04);
  pointer-events: none;
}

.ktu-login-crest {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.ktu-login-seal {
  flex-shrink: 0;
  color: var(--ice-200);
}

.ktu-login-seal svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ktu-login-seal.lg {
  width: 100px;
  height: 100px;
}

.ktu-login-seal.sm {
  width: 48px;
  height: 48px;
}

.ktu-login-crest-text {
  display: flex;
  flex-direction: column;
}

.ktu-login-crest-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.ktu-login-crest-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ice-200);
  letter-spacing: .06em;
  margin-top: 5px;
  font-family: var(--font-mono);
}

.ktu-login-brand-mid {
  position: relative;
  z-index: 1;
  margin-top: auto;
  margin-bottom: auto;
  max-width: 42ch;
}

.ktu-login-brand-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ice-400);
  margin-bottom: 16px;
}

.ktu-login-brand-head {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.02em;
  margin: 0 0 16px;
  color: #fff;
}

.ktu-login-brand-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: #A9B6CC;
  margin: 0 0 28px;
}

.ktu-login-brand-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ktu-login-brand-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #C1CDDF;
}

.ktu-login-brand-list li svg {
  width: 16px;
  height: 16px;
  color: var(--ice-400);
  flex-shrink: 0;
}

.ktu-login-brand-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #5E6B85;
  font-family: var(--font-mono);
  letter-spacing: .03em;
}

.ktu-login-brand-ver {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

/* ── RIGHT PANEL ── */
.ktu-login-panel {
  display: grid;
  place-items: center;
  background: var(--surface);
  padding: 40px;
}

.ktu-login-box {
  width: 100%;
  max-width: 430px;
}

.ktu-login-form-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.ktu-login-form-titles {
  display: flex;
  flex-direction: column;
}

.ktu-login-form-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-500);
  margin-bottom: 4px;
}

.ktu-login-form-title {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--ink-1);
}

/* ── TABS ── */
.ktu-login-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1.5px solid var(--line-2);
}

.ktu-login-tab {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-4);
  padding: 12px 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  user-select: none;
}

.ktu-login-tab:hover {
  color: var(--ink-2);
}

.ktu-login-tab.active {
  color: var(--brand-600);
}

.ktu-login-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1.5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--brand-500);
  border-radius: 99px;
}

/* ── FIELDS ── */
.ktu-login-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.ktu-login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.ktu-login-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}

.ktu-login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ktu-login-input-ico {
  position: absolute;
  left: 14px;
  color: var(--ink-4);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.ktu-login-input-ico svg {
  width: 18px;
  height: 18px;
}

.ktu-login-input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--ink-1);
  transition: all 0.15s ease;
}

.ktu-login-input-wrap input:hover {
  border-color: var(--ink-5);
}

.ktu-login-input-wrap input:focus {
  outline: none;
  border-color: var(--brand-500);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--brand-50);
}

.ktu-login-eye {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--ink-4);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
  transition: color 0.15s ease;
}

.ktu-login-eye svg {
  width: 18px;
  height: 18px;
}

.ktu-login-eye:hover {
  color: var(--ink-2);
}

/* ── ROW & CHECKBOX ── */
.ktu-login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-top: 4px;
}

.ktu-login-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--ink-3);
  user-select: none;
}

.ktu-login-check input {
  display: none;
}

.ktu-login-box-check {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  transition: all 0.15s ease;
  color: #fff;
  flex-shrink: 0;
}

.ktu-login-box-check svg {
  width: 12px;
  height: 12px;
  display: none;
}

.ktu-login-check:hover .ktu-login-box-check {
  border-color: var(--ink-5);
}

.ktu-login-check input:checked + .ktu-login-box-check {
  background: var(--brand-500);
  border-color: var(--brand-500);
}

.ktu-login-check input:checked + .ktu-login-box-check svg {
  display: block;
}

.ktu-login-forgot {
  color: var(--brand-600);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.ktu-login-forgot:hover {
  text-decoration: underline;
  color: var(--brand-700);
}

/* ── SUBMIT BUTTON ── */
.ktu-login-submit {
  width: 100%;
  height: 48px;
  border: none;
  cursor: pointer;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px -8px rgba(42,87,204,0.6), inset 0 1px 0 rgba(255,255,255,0.18);
  transition: all 0.15s ease;
}

.ktu-login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -8px rgba(42,87,204,0.7), inset 0 1px 0 rgba(255,255,255,0.24);
}

.ktu-login-submit:disabled {
  background: var(--line) !important;
  color: var(--ink-5) !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

.ktu-login-submit svg {
  width: 16px;
  height: 16px;
}

/* ── E-DEVLET ── */
.ktu-login-edevlet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 4px;
}

.ktu-login-or {
  display: flex;
  align-items: center;
  width: 100%;
  color: var(--ink-4);
  font-size: 13px;
  gap: 12px;
  user-select: none;
}

.ktu-login-or i {
  flex: 1;
  height: 1px;
  background: var(--line-2);
}

.ktu-login-edevlet-btn {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ktu-login-edevlet-btn:hover {
  background: var(--surface-2);
  border-color: var(--ink-5);
}

.ktu-login-edevlet-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #E30A17;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-sans);
}

/* ── FOOTER ── */
.ktu-login-form-foot {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
  text-align: center;
  font-size: 13px;
  color: var(--ink-4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ktu-login-form-foot a {
  color: var(--brand-600);
  text-decoration: none;
  font-weight: 500;
}

.ktu-login-form-foot a:hover {
  text-decoration: underline;
}

/* ── SECURITY NOTE CARD (Left Brand Column) ── */
.ktu-login-sec-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ktu-login-sec-card .sc-ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(56,189,248,0.12);
  color: var(--ice-400);
}

.ktu-login-sec-card .sc-ico svg {
  width: 19px;
  height: 19px;
}

.ktu-login-sec-card .sc-t {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}

.ktu-login-sec-card .sc-s {
  font-size: 12.5px;
  line-height: 1.5;
  color: #9DAAC2;
}

/* ── VERIFICATION CODE VIEW (MobilOnay) ── */
.ktu-login-v-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-50), #fff);
  border: 1px solid var(--brand-100);
  color: var(--brand-600);
  box-shadow: 0 8px 22px -12px rgba(42,87,204,0.4);
}

.ktu-login-v-icon svg {
  width: 28px;
  height: 28px;
}

.ktu-login-v-sub {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-3);
  margin: 0 0 4px;
}

.ktu-login-v-dest {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 28px;
}

.ktu-login-dest-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-1);
}

.ktu-login-dest-pill svg {
  width: 15px;
  height: 15px;
  color: var(--brand-500);
}

.ktu-login-change {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-600);
  text-decoration: none;
}

.ktu-login-change:hover {
  text-decoration: underline;
}

/* ── OTP BOXES ── */
.ktu-login-otp {
  display: flex;
  gap: 11px;
  margin-bottom: 8px;
}

.ktu-login-otp input {
  width: 100%;
  height: 64px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  text-align: center;
  color: var(--ink-1);
  transition: all 0.15s ease;
  caret-color: var(--brand-500);
}

.ktu-login-otp input:hover {
  border-color: var(--ink-5);
}

.ktu-login-otp input:focus {
  outline: 0;
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: 0 0 0 4px var(--brand-50);
}

.ktu-login-otp input.filled {
  border-color: var(--brand-400);
  background: #fff;
  color: var(--brand-700);
}

.ktu-login-otp.error input {
  border-color: var(--danger);
  background: #FEF2F2;
  animation: shake 0.35s;
}

.ktu-login-otp.ok input {
  border-color: var(--good);
  background: #F0FDF4;
  color: #047857;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.ktu-login-v-msg {
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ktu-login-v-msg svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.ktu-login-v-msg.err {
  color: var(--danger);
}

.ktu-login-v-msg.okk {
  color: var(--good);
}

/* ── TIMER ── */
.ktu-login-timer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 22px;
}

.ktu-login-timer-ring {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.ktu-login-timer-ring svg {
  transform: rotate(-90deg);
  display: block;
}

.ktu-login-timer-ring .trk {
  stroke: var(--line);
}

.ktu-login-timer-ring .bar {
  stroke: url(#tg);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.ktu-login-timer-ring .t-clock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--brand-600);
}

.ktu-login-timer-ring .t-clock svg {
  width: 18px;
  height: 18px;
  transform: none;
}

.ktu-login-timer-text {
  flex: 1;
  min-width: 0;
}

.ktu-login-timer-text .tt-time {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink-1);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.ktu-login-timer-text .tt-label {
  font-size: 12.5px;
  color: var(--ink-4);
  margin-top: 2px;
}

.ktu-login-timer.expired {
  background: #FEF2F2;
  border-color: #FECACA;
}

.ktu-login-timer.expired .tt-time {
  color: var(--danger);
}

.ktu-login-timer.expired .ktu-login-timer-ring .t-clock {
  color: var(--danger);
}

.ktu-login-v-resend {
  margin-top: 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-4);
}

.ktu-login-rs-btn {
  border: 0;
  background: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-600);
  cursor: pointer;
  text-decoration: none;
}

.ktu-login-rs-btn:hover:not(:disabled) {
  text-decoration: underline;
}

.ktu-login-rs-btn:disabled {
  color: var(--ink-5);
  cursor: not-allowed;
  font-weight: 500;
}

.ktu-login-v-back {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ktu-login-v-back a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-4);
  text-decoration: none;
  transition: color 0.15s ease;
}

.ktu-login-v-back a:hover {
  color: var(--ink-2);
}

.ktu-login-v-back a svg {
  width: 15px;
  height: 15px;
}

/* ── TAB PANE VISIBILITY ── */
.tab-pane {
  display: none;
}

.tab-pane.show.active {
  display: block;
}

/* ── RESPONSIVE DESIGN ── */
@media (max-width: 900px) {
  .ktu-login-split {
    grid-template-columns: 1fr;
  }
  .ktu-login-brand {
    display: none;
  }
}
