:root {
    --navy: #0d3d6e;
    --navy-dark: #082a4d;
    --steel: #7fa3cf;
    --grey: #c9ccd1;
    --bg: #eef1f5;
    --card-bg: #ffffff;
    --text: #1e2733;
    --muted: #647184;
    --border: #e1e5eb;
    --danger: #c0392b;
    --danger-bg: #fdecea;
    --success: #1e7e34;
    --success-bg: #e9f7ef;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* --- Kurumsal ust bilgi (logo) --- */
.site-header {
    background: #fff;
    border-bottom: 4px solid var(--navy);
    box-shadow: 0 1px 4px rgba(13, 40, 70, 0.08);
}
.site-header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.site-header .logo { height: 46px; display: block; }
.portal-tag {
    color: var(--navy);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer {
    margin-top: 56px;
    padding: 22px 16px 32px;
    text-align: center;
    color: #8a93a3;
    font-size: 12.5px;
    letter-spacing: 0.02em;
}

/* --- Eski basit topbar (yalnizca fallback / admin icin) --- */
.topbar {
    background: var(--navy);
    color: #fff;
    padding: 18px 24px;
    font-size: 20px;
    font-weight: 600;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar-brand { display: flex; align-items: center; gap: 14px; }
.topbar-brand img { height: 30px; }
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.topbar-title { font-size: 15px; font-weight: 600; opacity: 0.9; }

.page {
    max-width: 640px;
    margin: 48px auto;
    padding: 0 16px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: 4px solid var(--navy);
    border-radius: 12px;
    padding: 36px 40px;
    box-shadow: 0 8px 24px rgba(13, 40, 70, 0.07);
}

h1 { font-size: 21px; margin-top: 0; color: var(--navy-dark); letter-spacing: -0.01em; }
p.lead { color: var(--muted); margin-bottom: 26px; line-height: 1.5; }

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13.5px;
    color: #3a4657;
}

input[type=text], input[type=password], input[type=file], select, textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 15px;
    margin-bottom: 18px;
    background: #fbfcfd;
    font-family: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input[type=text]:focus, input[type=password]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--steel);
    box-shadow: 0 0 0 3px rgba(127, 163, 207, 0.25);
    background: #fff;
}

button, .btn {
    background: var(--navy);
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.01em;
    transition: background .15s ease;
}

button:hover, .btn:hover { background: var(--navy-dark); }

.btn-secondary { background: #78828e; }
.btn-secondary:hover { background: #5f6874; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #96281c; }

.alert {
    padding: 13px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f3c5c0; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #bfe6c9; }

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
th, td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 14px;
}
th { background: #f6f9fc; font-weight: 600; color: #3a4657; }

.admin-wrap { max-width: 1080px; margin: 0 auto; padding: 24px 16px; }
.nav { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.dl-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.dl-row span:first-child { color: var(--muted); }
.badge { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-open { background: #fdf3d8; color: #8a6d1a; }
.badge-partial { background: #fdeecb; color: #a05a00; }
.badge-paid { background: var(--success-bg); color: var(--success); }
.badge-closed { background: #e4e7eb; color: #555; }
.muted { color: var(--muted); font-size: 13px; }
.actions a { margin-right: 10px; font-size: 13px; }
.search-bar { display: flex; gap: 10px; margin-bottom: 18px; }
.search-bar input { margin-bottom: 0; }

/* --- Surec/adim gostergesi (buyuk ikonlu) --- */
.steps-intro { max-width: 640px; margin: 0 auto 28px; }
.steps-title {
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 20px;
}
.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 118px;
}
.step-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    color: var(--grey);
    border: 2px solid var(--grey);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    flex-shrink: 0;
    transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.step-icon svg { width: 30px; height: 30px; }
.step-text { display: flex; flex-direction: column; }
.step-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--grey);
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.step-label { font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.35; }
.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    color: var(--grey);
    flex-shrink: 0;
    padding-top: 0;
}
.step-arrow.is-passed { color: var(--steel); }

.step.is-done .step-icon, .step.is-active .step-icon {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
    box-shadow: 0 6px 14px rgba(13, 61, 110, 0.28);
}
.step.is-active .step-icon {
    box-shadow: 0 0 0 4px rgba(13, 61, 110, 0.15), 0 6px 14px rgba(13, 61, 110, 0.28);
}
.step.is-done .step-num, .step.is-active .step-num { color: var(--steel); }
.step.is-done .step-label, .step.is-active .step-label { color: var(--navy-dark); }

@media (max-width: 620px) {
    .steps { flex-direction: column; align-items: stretch; gap: 6px; }
    .step { width: 100%; flex-direction: row; justify-content: center; gap: 16px; }
    .step-icon { margin-bottom: 0; }
    .step-text { text-align: left; }
    .step-arrow { transform: rotate(90deg); height: 28px; }
}

/* --- Canli chat widget --- */
#chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 1000; }
#chat-fab {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    border: none;
    box-shadow: 0 8px 20px rgba(13, 61, 110, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
#chat-fab:hover { background: var(--navy-dark); }
#chat-fab svg { width: 28px; height: 28px; }
.chat-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--danger);
    border: 2px solid #fff;
}
.chat-dot[hidden] { display: none; }

.chat-panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(13, 40, 70, 0.22);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}
.chat-panel[hidden] { display: none; }
.chat-header {
    background: var(--navy);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
}
.chat-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.chat-body {
    padding: 14px 16px;
    overflow-y: auto;
    max-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f7f9fb;
}
.chat-msg { padding: 9px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.4; max-width: 85%; }
.chat-msg-bot { background: #e8edf3; color: var(--text); align-self: flex-start; border-bottom-left-radius: 2px; }
.chat-msg-user { background: var(--navy); color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; }
.chat-msg-admin { background: var(--success-bg); color: #1e5631; align-self: flex-start; border-bottom-left-radius: 2px; border: 1px solid #bfe6c9; }
.chat-msg-error { background: var(--danger-bg); color: var(--danger); align-self: stretch; max-width: 100%; }

.chat-form { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: #fff; }
.chat-form[hidden] { display: none; }
.chat-form input { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 7px; font-size: 13.5px; margin: 0; }
.chat-form button { padding: 9px 14px; font-size: 13.5px; border-radius: 7px; margin: 0; }
.chat-message-row { flex-direction: row; }
.chat-message-row input { flex: 1; }
.chat-message-row button { flex-shrink: 0; }

@media (max-width: 420px) {
    .chat-panel { width: calc(100vw - 24px); right: -8px; }
}

/* --- Desteklenen odeme yontemleri --- */
.payment-methods { max-width: 640px; margin: 28px auto 0; text-align: center; }
.payment-methods-title {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 14px;
}
.payment-icons { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.payment-icon {
    width: 66px;
    height: 46px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a6472;
    box-shadow: 0 2px 6px rgba(13, 40, 70, 0.05);
}
.payment-icon svg { width: 32px; height: 32px; }
.payment-icon.payment-sepa { flex-direction: column; gap: 2px; }
.payment-icon.payment-sepa svg { width: 20px; height: 20px; }
.payment-icon.payment-sepa span { font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em; color: var(--muted); }
