/* ALO 153 örnek entegrasyon — kurumsal turkuaz/mavi, dış bağımlılık yok. */

:root {
    --brand-50: #f0fdfa;
    --brand-100: #ccfbf1;
    --brand-300: #5eead4;
    --brand-500: #14b8a6;
    --brand-600: #0d9488;
    --brand-700: #0f766e;
    --blue-500: #0284c7;
    --blue-600: #0369a1;

    --ink: #0f172a;
    --ink-2: #334155;
    --ink-3: #64748b;
    --ink-4: #94a3b8;
    --line: #e2e8f0;
    --surface: #ffffff;
    --bg: #f6f8fb;

    --ok-bg: #ecfdf5;
    --ok-fg: #047857;
    --err-bg: #fef2f2;
    --err-fg: #b91c1c;
    --warn-fg: #b45309;

    --r-sm: 10px;
    --r: 14px;
    --r-lg: 20px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
    --shadow-lg: 0 1px 3px rgba(15, 23, 42, .05), 0 20px 40px -20px rgba(15, 23, 42, .18);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* ---------- Üst çubuk ---------- */
.topbar {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 62px;
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }

.brand-mark {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(140deg, var(--brand-500), var(--blue-600));
    box-shadow: 0 6px 16px -6px rgba(2, 132, 199, .6);
    flex: none;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-mark.lg { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 18px; }
.brand-mark.lg svg { width: 28px; height: 28px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.brand-text small { font-size: 12px; color: var(--ink-3); }

.nav { display: flex; gap: 4px; }
.nav-link {
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 500;
    transition: background .18s, color .18s;
}
.nav-link:hover { background: #eef2f7; }
.nav-link.is-active { background: var(--brand-600); color: #fff; }

/* ---------- Demo şeridi ---------- */
.demo-strip {
    background: linear-gradient(90deg, var(--brand-700), var(--blue-600));
    color: #e7fbf7;
    font-size: 12.5px;
    padding: 9px 0;
}
.demo-strip strong { color: #fff; }

/* ---------- Ana alan ---------- */
.main { padding: 32px 20px 56px; display: flex; flex-direction: column; gap: 20px; }

.hero { text-align: center; margin: 8px 0 4px; }
.hero h1 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 650;
    letter-spacing: -.024em;
}
.hero p { margin: 0 auto; max-width: 620px; color: var(--ink-3); font-size: 15px; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
    padding: 24px;
}
.card h2 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 620;
    letter-spacing: -.01em;
}
.card-sub { margin: 0 0 16px; color: var(--ink-3); font-size: 13.5px; }

/* ---------- Uyarılar ---------- */
.alert {
    display: flex; gap: 11px; align-items: flex-start;
    border-radius: var(--r);
    padding: 13px 16px;
    font-size: 14px;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alert p { margin: 0; }
.alert p + p { margin-top: 3px; }
.alert-ok { background: var(--ok-bg); color: var(--ok-fg); }
.alert-err { background: var(--err-bg); color: var(--err-fg); }
.alert.compact { padding: 10px 13px; font-size: 13px; }

/* ---------- Formlar ---------- */
.form { display: flex; flex-direction: column; gap: 22px; }
.form.compact { gap: 14px; }
.form-section { display: flex; flex-direction: column; gap: 14px; }
.form-section h2 { margin: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-2.gap { gap: 20px; align-items: start; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 550; color: var(--ink-2); }
.field em { color: #dc2626; font-style: normal; }
.field small { font-size: 12px; color: var(--ink-4); line-height: 1.45; }

input[type=text], input[type=tel], input[type=email], input[type=password], select, textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: #fbfcfe;
    color: var(--ink);
    /* iOS'ta odaklanınca sayfayı yakınlaştırmaması için 16px. */
    font-size: 16px;
    font-family: inherit;
    transition: border-color .16s, box-shadow .16s, background .16s;
}
textarea { resize: vertical; line-height: 1.55; }

input:focus, select:focus, textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3.5px rgba(20, 184, 166, .16);
}

input[type=file] {
    width: 100%;
    font-size: 13.5px;
    padding: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--r-sm);
    background: #fbfcfe;
}

.consent {
    display: flex; gap: 11px; align-items: flex-start;
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    border-radius: var(--r);
    padding: 14px 16px;
    font-size: 13.5px;
    color: var(--ink-2);
}
.consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--brand-600); flex: none; }
.consent em { color: #dc2626; font-style: normal; }

.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hint { margin: 0; font-size: 12.5px; color: var(--ink-4); }

/* ---------- Butonlar ---------- */
.btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 11px 22px;
    font-size: 14.5px;
    font-weight: 560;
    font-family: inherit;
    cursor: pointer;
    transition: transform .12s, box-shadow .18s, background .18s, opacity .18s;
}
.btn:active { transform: scale(.985); }
.btn.full { width: 100%; }

.btn-primary {
    color: #fff;
    background: linear-gradient(140deg, var(--brand-600), var(--blue-600));
    box-shadow: 0 8px 20px -10px rgba(3, 105, 161, .7);
}
.btn-primary:hover { box-shadow: 0 10px 26px -10px rgba(3, 105, 161, .85); }

.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: #f8fafc; }

.btn-ok { color: #fff; background: var(--brand-600); }
.btn-quiet { background: #f1f5f9; color: var(--ink-2); border-color: var(--line); }
.btn-quiet:hover { background: #e8eef4; }

/* ---------- Durum etiketi ---------- */
.pill {
    display: inline-flex; align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 570;
    white-space: nowrap;
}
.pill.lg { padding: 7px 16px; font-size: 13.5px; }
.st-received { background: #e0f2fe; color: #075985; }
.st-forwarded { background: #dbeafe; color: #1d4ed8; }
.st-review { background: #fef3c7; color: var(--warn-fg); }
.st-resolved { background: var(--brand-100); color: var(--brand-700); }

/* ---------- Oluşturma başarı kartı ---------- */
.success { text-align: center; border-color: var(--brand-100); background: linear-gradient(180deg, var(--brand-50), #fff); }
.success-icon {
    width: 46px; height: 46px; margin: 0 auto 12px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--brand-600);
    color: #fff;
    animation: pop .42s cubic-bezier(.34, 1.56, .64, 1) both;
}
.success-icon svg { width: 24px; height: 24px; }
.success h2 { font-size: 19px; }
.success p { margin: 4px 0 0; color: var(--ink-3); font-size: 14px; }
.success-number {
    margin: 16px auto 4px;
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--r);
    background: #fff;
    border: 1px dashed var(--brand-300);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 19px;
    font-weight: 600;
    color: var(--brand-700);
    letter-spacing: .02em;
}
.success-hint { font-size: 12.5px !important; color: var(--ink-4) !important; }

@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Detay başlığı ---------- */
.detail-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px; flex-wrap: wrap;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}
.detail-number {
    margin: 0 0 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    color: var(--ink-4);
    letter-spacing: .03em;
}
.detail-head h1 { margin: 0 0 5px; font-size: 21px; font-weight: 620; letter-spacing: -.018em; }
.detail-meta { margin: 0; font-size: 13px; color: var(--ink-3); }

/* ---------- Aşama takibi ---------- */
.tracker { position: relative; padding: 30px 0 4px; }

.tracker-line {
    position: absolute;
    top: 47px; left: 12.5%; right: 12.5%;
    height: 3px;
    background: #e8edf3;
    border-radius: 999px;
    overflow: hidden;
}
.tracker-line span {
    display: block; height: 100%;
    width: var(--w, 0%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-500), var(--blue-500));
    animation: fill 1s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes fill { from { width: 0; } to { width: var(--w, 0%); } }

.tracker-steps {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: relative;
}
.step { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 4px; }

.step-dot {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #dfe6ee;
    color: #fff;
    transition: all .3s;
    position: relative;
    z-index: 2;
}
.step-dot svg { width: 15px; height: 15px; }

.step.is-completed .step-dot {
    background: var(--brand-600);
    border-color: var(--brand-600);
}
.step.is-active .step-dot {
    border-color: var(--brand-500);
    background: #fff;
    box-shadow: 0 0 0 5px rgba(20, 184, 166, .18);
    animation: pulse 1.9s ease-in-out infinite;
}
.step.is-active .step-dot::after {
    content: '';
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--brand-500);
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 5px rgba(20, 184, 166, .18); }
    50% { box-shadow: 0 0 0 10px rgba(20, 184, 166, .06); }
}

.step-label { font-size: 12.5px; font-weight: 560; color: var(--ink-4); }
.step.is-completed .step-label, .step.is-active .step-label { color: var(--ink); }
.step-time { font-size: 11px; color: var(--ink-4); }

/* ---------- İki kolon ---------- */
.grid-side { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: start; }
.col-main, .col-side { display: flex; flex-direction: column; gap: 20px; }

.body-text { margin: 12px 0 0; color: var(--ink-2); line-height: 1.62; }
.empty { margin: 12px 0 0; color: var(--ink-4); font-size: 13.5px; }

.attach {
    display: flex; align-items: center; gap: 7px;
    margin: 16px 0 0; padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 13px; color: var(--ink-3);
}
.attach svg { width: 15px; height: 15px; }

/* ---------- Yazışmalar ---------- */
.thread { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.msg { border-radius: var(--r); padding: 13px 15px; font-size: 14px; }
.msg p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.msg-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.msg-head strong { font-size: 12.5px; font-weight: 600; }
.msg-head time { font-size: 11.5px; color: var(--ink-4); }
.msg-staff { background: #f6f8fb; border: 1px solid var(--line); }
.msg-mine { background: var(--brand-50); border: 1px solid var(--brand-100); }

.reply-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.reply-form textarea { width: 100%; }

/* ---------- Yan panel ---------- */
.pairs { margin: 14px 0 0; display: grid; grid-template-columns: 88px 1fr; gap: 9px 12px; font-size: 13.5px; }
.pairs dt { color: var(--ink-4); font-size: 12.5px; }
.pairs dd { margin: 0; color: var(--ink); word-break: break-word; }

.edit { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.edit summary {
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 560;
    color: var(--brand-700);
    list-style: none;
}
.edit summary::-webkit-details-marker { display: none; }
.edit summary::before { content: '✎  '; }
.edit form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.edit-note { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.edit-note.muted { padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-4); }

.act { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.act + .act { padding-top: 16px; border-top: 1px solid var(--line); }
.act p { margin: 0; font-size: 13px; color: var(--ink-3); }

.track-link p { margin: 10px 0 10px; font-size: 13px; color: var(--ink-3); }
.track-link input { font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Liste ---------- */
.list .count {
    display: inline-block; margin-left: 6px;
    padding: 1px 9px; border-radius: 999px;
    background: #eef2f7; color: var(--ink-3);
    font-size: 12px; font-weight: 600;
}
.list-row {
    display: flex; align-items: center; gap: 14px;
    padding: 15px 4px;
    border-top: 1px solid var(--line);
    text-decoration: none; color: inherit;
    transition: background .16s;
}
.list-row:first-of-type { margin-top: 10px; }
.list-row:hover { background: #fafcfe; }
.list-main { flex: 1; min-width: 0; }
.list-subject { margin: 0 0 3px; font-size: 14.5px; font-weight: 550; }
.list-meta { margin: 0; font-size: 12.5px; color: var(--ink-4); }
.list-arrow { width: 17px; height: 17px; color: var(--ink-4); flex: none; }

/* ---------- Teknik günlük ---------- */
.tech {
    background: #0f172a;
    border-radius: var(--r-lg);
    padding: 18px 22px;
    color: #cbd5e1;
    font-size: 13px;
}
.tech summary { cursor: pointer; font-weight: 550; color: #e2e8f0; }
.tech-item { margin-top: 16px; padding-top: 14px; border-top: 1px solid #1e293b; }
.tech-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; }
.tech-method { padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.m-get { background: #0e7490; color: #ecfeff; }
.m-post { background: #15803d; color: #f0fdf4; }
.tech-head code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: #f1f5f9; }
.tech-status { font-size: 11.5px; font-weight: 600; }
.s-ok { color: #4ade80; }
.s-warn { color: #fbbf24; }
.s-err { color: #f87171; }
.tech-ms { font-size: 11px; color: #64748b; }
.tech-label { margin: 10px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #64748b; }
.tech pre {
    margin: 0; padding: 11px 13px;
    background: #020617; border-radius: 10px;
    overflow-x: auto;
    font-size: 12px; line-height: 1.5;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #a5f3ec;
}
.tech-note { margin: 16px 0 0; font-size: 11.5px; color: #64748b; }

/* ---------- Alt bilgi ---------- */
.foot { border-top: 1px solid var(--line); background: #fff; padding: 22px 0; }
.foot p { margin: 0; font-size: 12.5px; color: var(--ink-4); }
.foot-kvkk { margin-top: 5px !important; max-width: 640px; }

/* ---------- Erişim kapısı ---------- */
.gate-body { background: linear-gradient(160deg, #e6f7f5, #eef4fb 60%, #f6f8fb); }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-card { max-width: 380px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); }
.gate-card h1 { margin: 0 0 8px; font-size: 20px; font-weight: 620; letter-spacing: -.018em; }
.gate-card p { margin: 0 0 20px; font-size: 13.5px; color: var(--ink-3); }
.gate-card form { display: flex; flex-direction: column; gap: 14px; text-align: left; }

/* ---------- Duyarlı ---------- */
@media (max-width: 860px) {
    .grid-side { grid-template-columns: 1fr; }
    .grid-2, .grid-2.gap { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .hero h1 { font-size: 25px; }
    .card { padding: 20px 17px; border-radius: 16px; }
    .main { padding: 22px 14px 44px; gap: 16px; }
    .wrap { padding: 0 14px; }
    /* Dar ekranda başlık satır kırmasın: marka ve menü tek satırda kalır. */
    .topbar-inner { min-height: 56px; gap: 8px; }
    .brand { gap: 8px; }
    .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
    .brand-mark svg { width: 18px; height: 18px; }
    .brand-text small { display: none; }
    .brand-text strong { font-size: 13.5px; white-space: nowrap; }
    .nav { gap: 2px; }
    .nav-link { padding: 6px 11px; font-size: 12.5px; white-space: nowrap; }

    /* Aşamalar dikey listeye döner: dört sütun mobilde okunmuyor. */
    .tracker { padding: 18px 0 0; }
    .tracker-line { display: none; }
    .tracker-steps { grid-template-columns: 1fr; gap: 2px; }
    .step {
        flex-direction: row; align-items: center; gap: 12px;
        text-align: left; padding: 9px 0;
        border-bottom: 1px solid #f1f5f9;
    }
    .step:last-child { border-bottom: none; }
    .step-dot { width: 26px; height: 26px; flex: none; }
    .step-label { flex: 1; font-size: 13.5px; }
    .step-time { font-size: 11px; }
    .detail-head h1 { font-size: 18px; }
    .pairs { grid-template-columns: 78px 1fr; }
}
