:root {
    --tabliya-green: #1f6b3f;
    --tabliya-green-dark: #16512f;
    --text-dark: #1a252f;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --bg: #f5f6f4;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header.site-header {
    background: var(--tabliya-green);
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

header.site-header .brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

header.site-header .brand img {
    height: 36px;
    width: auto;
    display: block;
    background: #fff;
    border-radius: 6px;
    padding: 3px 6px;
}

header.site-header .brand span {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.lang-switcher {
    display: flex;
    gap: 6px;
}

.lang-switcher button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
}

.lang-switcher button.active {
    background: #fff;
    color: var(--tabliya-green-dark);
    font-weight: 600;
}

main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 32px;
    width: 100%;
    max-width: 480px;
}

.card h1 {
    font-size: 22px;
    margin: 0 0 8px;
}

.card p.prompt {
    color: var(--text-muted);
    margin: 0 0 24px;
    font-size: 14px;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.field input:focus {
    outline: none;
    border-color: var(--tabliya-green);
    box-shadow: 0 0 0 3px rgba(31, 107, 63, 0.15);
}

button.primary {
    width: 100%;
    background: var(--tabliya-green);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

button.primary:hover { background: var(--tabliya-green-dark); }
button.primary:disabled { opacity: 0.6; cursor: default; }

.error-message {
    background: #fdecea;
    color: #a12622;
    border: 1px solid #f5c2c0;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    margin-top: 16px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    font-size: 13px;
    color: var(--tabliya-green);
    text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

.meta-row {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.timeline li {
    position: relative;
    padding: 0 0 26px 34px;
    font-size: 14px;
}

[dir="rtl"] .timeline li {
    padding: 0 34px 26px 0;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border);
}

[dir="rtl"] .timeline li::before { left: auto; right: 8px; }

.timeline li::after {
    content: '';
    position: absolute;
    left: 14px;
    top: 16px;
    width: 2px;
    bottom: -10px;
    background: var(--border);
}

[dir="rtl"] .timeline li::after { left: auto; right: 14px; }

.timeline li:last-child::after { display: none; }

.timeline li.done::before {
    background: var(--tabliya-green);
    border-color: var(--tabliya-green);
}

.timeline li.done::after { background: var(--tabliya-green); }

.timeline li.current .stage-label {
    font-weight: 700;
    color: var(--tabliya-green-dark);
}

.spinner {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 14px;
}

footer.site-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.hidden { display: none !important; }

@media (max-width: 480px) {
    .card { padding: 22px; }
    header.site-header .brand span { font-size: 15px; }
}
