:root {
  color-scheme: light;
  --ink: #10203b;
  --muted: #62708a;
  --line: #dfe6f1;
  --surface: #ffffff;
  --soft: #f3f7fc;
  --navy: #edf5f7;
  --navy-2: #e4eff3;
  --blue: #4668b1;
  --cyan: #2f94a2;
  --green: #0b9b6f;
  --red: #c43d50;
  --amber: #ae6d08;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(15, 36, 71, .1);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--soft); }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

.portal-shell { min-height: 100vh; display: grid; grid-template-columns: 278px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 20px; color: #38566b; background: radial-gradient(circle at 20% 0, #dceafa 0, var(--navy) 44%, #e7f2f3 100%); border-right: 1px solid rgba(43,82,102,.12); overflow-y: auto; }
.brand { display: inline-flex; align-items: center; }
.sidebar-brand { padding: 5px 10px 23px; border-bottom: 1px solid rgba(43,82,102,.12); }
.sidebar-brand img { filter: none; }
.account-chip { display: flex; gap: 11px; align-items: center; margin: 22px 4px; padding: 12px; border: 1px solid rgba(43,82,102,.12); border-radius: 16px; background: rgba(255,255,255,.72); box-shadow: 0 9px 24px rgba(39,72,89,.06); }
.account-chip .avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; color: #031127; font-weight: 900; border-radius: 12px; background: linear-gradient(135deg, var(--cyan), #9cf4fb); }
.account-chip strong, .account-chip small { display: block; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-chip strong { color: #173b55; font-size: 13px; }
.account-chip small { color: #6a7d8d; font-size: 11px; }
.side-nav { display: grid; gap: 6px; }
.nav-item { min-height: 46px; display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; color: #4b6578; border: 0; border-radius: 13px; background: transparent; cursor: pointer; text-align: left; transition: .18s ease; }
.nav-item span { width: 20px; text-align: center; color: #2f8794; font-size: 17px; }
.nav-item:hover, .nav-item:focus-visible { color: #173b55; background: rgba(255,255,255,.78); outline: none; }
.nav-item.active { color: #fff; font-weight: 750; background: linear-gradient(105deg, #4668b1, #3c8795); box-shadow: 0 9px 24px rgba(54,96,150,.18); }
.sidebar-note { display: grid; grid-template-columns: 10px 1fr; column-gap: 9px; margin-top: auto; padding: 17px 14px; border: 1px solid #c7e8dc; border-radius: 15px; background: #e5f5ee; }
.sidebar-note .status-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: #3fe0ac; box-shadow: 0 0 0 5px rgba(63,224,172,.1); }
.sidebar-note strong, .sidebar-note small { grid-column: 2; }
.sidebar-note strong { color: #245f4c; font-size: 12px; }
.sidebar-note small { color: #5d7d71; font-size: 11px; }
.logout-form { margin-top: 9px; }
.logout { color: #64798a; }

.portal-main { min-width: 0; }
.topbar { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(22px, 4vw, 52px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.93); backdrop-filter: blur(12px); }
.topbar small, .topbar strong { display: block; }
.topbar small { color: var(--muted); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.topbar strong { font-size: 18px; }
.topbar-support { padding: 10px 15px; color: #fff; font-weight: 750; font-size: 13px; border-radius: 12px; background: var(--blue); box-shadow: 0 8px 22px rgba(23,105,255,.22); }
.content { width: min(1400px, 100%); margin: 0 auto; padding: 34px clamp(22px, 4vw, 52px) 60px; }

.flash-stack { display: grid; gap: 10px; margin-bottom: 22px; }
.flash { padding: 13px 16px; border: 1px solid; border-radius: 13px; font-weight: 650; }
.flash.success { color: #0a704f; border-color: #a9e5d0; background: #ecfff7; }
.flash.error { color: #a32538; border-color: #f0bdc5; background: #fff1f3; }
.flash.warning { color: #835109; border-color: #efd39e; background: #fff9e9; }
.flash.info { color: #1450a1; border-color: #b6d4ff; background: #eef6ff; }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { margin: 5px 0 4px; font-size: clamp(27px, 4vw, 39px); line-height: 1.12; letter-spacing: -.04em; }
.page-heading p { max-width: 680px; margin: 0; color: var(--muted); }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.grid { display: grid; gap: 18px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.two-col { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 20px rgba(15,36,71,.04); }
.card h2, .card h3 { margin: 0; letter-spacing: -.02em; }
.card h2 { font-size: 20px; }
.card h3 { font-size: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.card-head a { color: var(--blue); font-size: 13px; font-weight: 750; }
.stat-card { min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; }
.stat-card small { color: var(--muted); font-weight: 650; }
.stat-card strong { font-size: 28px; letter-spacing: -.04em; }
.stat-card span { color: var(--green); font-size: 12px; font-weight: 700; }

.hero-panel { position: relative; overflow: hidden; color: var(--ink); border: 1px solid #d6e3ec; background: linear-gradient(120deg, #edf3fc, #e7f4f2 58%, #e2f1f2); box-shadow: var(--shadow); }
.hero-panel::after { content: ""; position: absolute; width: 260px; height: 260px; right: -70px; top: -100px; border-radius: 50%; background: rgba(52,215,232,.18); }
.hero-panel > * { position: relative; z-index: 1; }
.hero-panel h2 { color: #173b55; font-size: 25px; }
.hero-panel p { max-width: 640px; color: #607486; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 780; cursor: pointer; }
.button:hover, .button:focus-visible { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15,36,71,.1); outline: none; }
.button.primary { color: #fff; border-color: var(--blue); background: var(--blue); }
.button.ghost-light { color: #284d64; border-color: rgba(43,82,102,.18); background: rgba(255,255,255,.76); }
.button.danger { color: #a32538; border-color: #f0bdc5; background: #fff4f5; }
.button.block { width: 100%; }
.button.small { min-height: 36px; padding: 7px 12px; font-size: 12px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.feature { position: relative; min-height: 150px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.feature .icon-box { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 18px; color: var(--blue); border-radius: 11px; background: #edf4ff; font-size: 18px; font-weight: 900; }
.feature h3 { margin: 0 0 5px; font-size: 15px; }
.feature p { margin: 0; color: var(--muted); font-size: 12px; }
.feature-link { display: inline-flex; margin-top: 13px; color: var(--blue); font-size: 12px; font-weight: 800; }
a.feature { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
a.feature:hover, a.feature:focus-visible { transform: translateY(-2px); border-color: #b9cff4; box-shadow: 0 12px 30px rgba(15,36,71,.09); outline: none; }
.feature.locked { background: #f9fbfd; }
.feature.locked::after { content: "Entegrasyon bekliyor"; position: absolute; top: 15px; right: 14px; padding: 4px 7px; color: #6e7789; border-radius: 20px; background: #e8edf4; font-size: 9px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }

.list { display: grid; gap: 10px; }
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row strong, .list-row small { display: block; }
.list-row small { margin-top: 2px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; color: #38617f; border-radius: 999px; background: #eaf2f8; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.badge.aktif, .badge.acik, .badge.destek_yaniti, .badge.onaylandi { color: #08704f; background: #e4f8f1; }
.badge.bekliyor, .badge.hazirlaniyor, .badge.musteri_yaniti { color: #88570a; background: #fff1d4; }
.badge.iptal, .badge.askida, .badge.kapali, .badge.sona_erdi { color: #9d3040; background: #ffe8eb; }
.badge.pending, .badge.claimed, .badge.creating, .badge.importing, .badge.exporting, .badge.applying, .badge.provisioning { color: #88570a; background: #fff1d4; }
.badge.running, .badge.updating, .badge.restoring { color: #1450a1; background: #e8f2ff; }
.badge.succeeded, .badge.active, .badge.ready { color: #08704f; background: #e4f8f1; }
.badge.failed, .badge.cancelled, .badge.dead_letter, .badge.deleted, .badge.deleting { color: #9d3040; background: #ffe8eb; }
.empty-state { padding: 30px 20px; text-align: center; border: 1px dashed #cbd6e5; border-radius: 16px; background: #fbfdff; }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { margin-bottom: 5px; }
.empty-state span { max-width: 480px; margin: 0 auto 16px; color: var(--muted); font-size: 13px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #283a58; font-size: 12px; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); border: 1px solid #ccd7e6; border-radius: 12px; background: #fff; outline: none; }
.field textarea { min-height: 145px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(23,105,255,.1); }
.field small, .form-note { color: var(--muted); font-size: 11px; }
.card form > .field + .field, .card form > .form-grid + .field { margin-top: 14px; }
.card form > .button { margin-top: 17px; }
.inline-form { display: inline; }
.inline-form .button { margin-top: 0; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 15px 0; }
.check-field { display: grid; grid-template-columns: 20px 1fr; gap: 9px; align-items: start; color: var(--muted); font-size: 12px; }
.check-field input { margin-top: 3px; }
.check-field a, .inline-link { color: var(--blue); font-weight: 700; }
.error-list { margin: 0 0 18px; padding: 13px 16px 13px 35px; color: #9d3040; border: 1px solid #f0bdc5; border-radius: 13px; background: #fff2f4; }

.ticket-message { max-width: 80%; padding: 14px 16px; border-radius: 15px 15px 15px 4px; background: #eef3f9; }
.ticket-message.customer { margin-left: auto; color: #fff; border-radius: 15px 15px 4px 15px; background: #1769ff; }
.ticket-message + .ticket-message { margin-top: 12px; }
.ticket-message p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-message small { display: block; margin-top: 7px; color: #718199; font-size: 10px; }
.ticket-message.customer small { color: #c6dcff; }
.notice { padding: 15px; color: #59677e; border: 1px solid #dbe4ef; border-radius: 14px; background: #f8fafc; font-size: 12px; }
.notice.warning { color: #835109; border-color: #efd39e; background: #fff9e9; }
.notice.success { color: #0a704f; border-color: #a9e5d0; background: #ecfff7; }
.notice.danger { color: #9d3040; border-color: #f0bdc5; background: #fff2f4; }
.service-row-actions { display: flex; align-items: center; gap: 10px; }
.hosting-switcher { min-width: min(340px, 100%); }
.hosting-switcher select { width: 100%; min-height: 43px; padding: 9px 12px; color: var(--ink); border: 1px solid #ccd7e6; border-radius: 12px; background: #fff; }
.hosting-tabs { display: flex; gap: 8px; margin: -4px 0 22px; padding: 6px; overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.hosting-tabs a { flex: 0 0 auto; padding: 9px 12px; color: var(--muted); border-radius: 10px; font-size: 12px; font-weight: 800; }
.hosting-tabs a:hover, .hosting-tabs a:focus-visible { color: var(--ink); background: var(--soft); outline: none; }
.hosting-tabs a.active { color: #fff; background: var(--blue); }
.status-line { display: flex; align-items: center; gap: 9px; }
.status-indicator { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: #98a4b6; box-shadow: 0 0 0 5px rgba(152,164,182,.12); }
.status-indicator.online { background: var(--green); box-shadow: 0 0 0 5px rgba(11,155,111,.12); }
.status-indicator.pending { background: #d58a17; box-shadow: 0 0 0 5px rgba(213,138,23,.13); }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.tool-card { min-height: 130px; display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.tool-card strong { font-size: 15px; }
.tool-card small { margin: 5px 0 14px; color: var(--muted); }
.tool-card .inline-link { margin-top: auto; }
.tool-card.disabled { color: #657086; background: #f8fafc; }
.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.data-table td { font-size: 13px; }
.data-table tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.danger-zone { border-color: #f0bdc5; background: #fffafa; }
.button[disabled], .field input[disabled], .field select[disabled], .field textarea[disabled] { cursor: not-allowed; opacity: .58; }
.button[disabled]:hover { transform: none; box-shadow: none; }
.operation-note { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.operation-note strong, .operation-note span { display: block; }
.operation-note span { color: var(--muted); font-size: 12px; }
.quota-bar { height: 9px; overflow: hidden; border-radius: 999px; background: #e7edf5; }
.quota-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.security-list { margin: 0; padding-left: 19px; color: var(--muted); }
.security-list li + li { margin-top: 7px; }

.guest-body { min-height: 100vh; background: radial-gradient(circle at 10% 0, #dcecff, transparent 34%), linear-gradient(145deg, #f6f9fd, #edf3fa); }
.guest-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px clamp(20px, 5vw, 70px); }
.guest-header .brand { padding: 8px 12px; border: 1px solid rgba(43,82,102,.12); border-radius: 13px; background: rgba(255,255,255,.84); box-shadow: 0 10px 28px rgba(39,72,89,.1); }
.back-link { color: #4d607d; font-size: 13px; font-weight: 700; }
.guest-shell { width: min(480px, calc(100% - 32px)); margin: 35px auto 70px; }
.auth-card { padding: clamp(25px, 5vw, 38px); border: 1px solid rgba(207,220,237,.9); border-radius: 25px; background: rgba(255,255,255,.96); box-shadow: 0 26px 70px rgba(15,36,71,.14); }
.auth-card h1 { margin: 7px 0 8px; font-size: 31px; letter-spacing: -.04em; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); }
.auth-card .field + .field { margin-top: 15px; }
.auth-card .button { margin-top: 19px; }
.auth-footer { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.auth-footer a { color: var(--blue); font-weight: 800; }
.legal-card { width: min(800px, calc(100% - 32px)); margin: 25px auto 70px; }
.legal-card h2 { margin-top: 28px; font-size: 18px; }
.legal-card p, .legal-card li { color: var(--muted); }

@media (max-width: 1050px) {
  .portal-shell { grid-template-columns: 82px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .sidebar-brand { padding-inline: 5px; }
  .account-chip { justify-content: center; padding: 9px; }
  .account-chip > span:last-child, .nav-item:not(.logout) { font-size: 0; }
  .nav-item { justify-content: center; padding-inline: 9px; }
  .nav-item span { font-size: 18px; }
  .sidebar-note { display: none; }
  .logout { font-size: 0; justify-content: center; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .portal-shell { display: block; padding-bottom: 76px; }
  .sidebar { position: fixed; z-index: 20; top: auto; right: 0; bottom: 0; left: 0; height: 68px; display: block; padding: 7px 8px; overflow: visible; border-top: 1px solid rgba(43,82,102,.14); }
  .sidebar-brand, .account-chip, .sidebar-note, .logout-form { display: none; }
  .side-nav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
  .nav-item:not(.logout) { min-height: 54px; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 4px; font-size: 9px; }
  .nav-item span { line-height: 1; }
  .topbar { min-height: 68px; padding: 11px 17px; }
  .topbar small { display: none; }
  .topbar strong { font-size: 15px; }
  .topbar-support { padding: 9px 10px; font-size: 11px; }
  .content { padding: 25px 16px 40px; }
  .page-heading { align-items: start; flex-direction: column; }
  .page-heading h1 { font-size: 28px; }
  .stats-grid, .two-col, .three-col, .feature-grid, .tool-grid, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .card { padding: 19px; border-radius: 17px; }
  .ticket-message { max-width: 93%; }
  .guest-header { padding: 16px 20px; }
  .guest-shell { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
