:root {
    --purple: #3b276b;
    --purple-mid: #4b3580;
    --purple-soft: #f0edf7;
    --orange: #e95118;
    --orange-dark: #c93f0f;
    --bg: #f5f4f9;
    --bg-card: #ffffff;
    --ink: #1e1333;
    --ink-soft: #5a5070;
    --ink-muted: #9990b0;
    --border: #e2dff0;
    --radius: 10px;
    --shadow: 0 2px 16px rgba(59, 39, 107, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "Nunito", sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
}
.admin-wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px 60px; }
.admin-header { text-align: center; margin-bottom: 28px; }
.admin-header img { width: 150px; }
.admin-header h1 {
    font-family: "Poppins", sans-serif;
    font-size: 22px;
    color: var(--purple);
    margin-top: 14px;
}
.admin-header p { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 22px;
}
.card-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--orange);
    margin-bottom: 14px;
}
label.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.create-row { display: flex; gap: 10px; }
input[type="text"],
input[type="number"],
input[type="password"] {
    flex: 1;
    font-family: inherit;
    font-size: 14px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus { outline: none; border-color: var(--purple-mid); box-shadow: 0 0 0 3px rgba(75, 53, 128, 0.12); }
.btn {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 11px 18px;
    cursor: pointer;
    transition: filter 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--orange-dark); }
.btn-outline { background: #fff; color: var(--purple); border: 1px solid var(--border); }
.btn-outline:hover:not(:disabled) { background: var(--purple-soft); }
.list-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.list-head .card-title { margin-bottom: 0; }
.project {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 9px;
    background: #fff;
}
.project-info { flex: 1; min-width: 0; }
.project-label { font-weight: 600; font-size: 15px; }
.project-meta { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.project-actions { display: flex; gap: 6px; }
.icon-btn {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    color: var(--purple);
    transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: var(--purple-soft); }
.icon-btn.danger { color: var(--orange-dark); }
.icon-btn.danger:hover { background: var(--orange-soft, #ffeee6); }
.empty { color: var(--ink-muted); font-size: 14px; text-align: center; padding: 18px; }
.status { text-align: center; font-size: 13px; min-height: 20px; margin-bottom: 10px; color: var(--ink-soft); }
.status.error { color: var(--orange-dark); }
/* Login overlay */
.overlay {
    position: fixed; inset: 0;
    background: rgba(30, 19, 51, 0.55);
    display: none;
    align-items: center; justify-content: center;
    padding: 20px;
    z-index: 50;
}
.overlay.open { display: flex; }
.overlay-card {
    background: #fff; border-radius: var(--radius);
    padding: 26px; max-width: 380px; width: 100%;
    box-shadow: 0 8px 40px rgba(59, 39, 107, 0.25);
}
.overlay-card h2 { font-family: "Poppins", sans-serif; font-size: 18px; color: var(--purple); margin-bottom: 6px; }
.overlay-card p { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.overlay-card input { width: 100%; margin-bottom: 14px; }
/* Steps modal */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(30, 19, 51, 0.55);
    display: none; align-items: center; justify-content: center;
    padding: 20px; z-index: 40;
}
.modal-overlay.open { display: flex; }
.modal {
    background: #fff; border-radius: var(--radius);
    padding: 24px; max-width: 460px; width: 100%;
    max-height: 84vh; overflow-y: auto;
    box-shadow: 0 8px 40px rgba(59, 39, 107, 0.25);
}
.modal h2 { font-family: "Poppins", sans-serif; font-size: 18px; color: var(--purple); margin-bottom: 4px; }
.modal .modal-desc { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.config-field input { width: 100%; }
.config-field-full { grid-column: 1 / -1; }
.config-help { color: var(--ink-muted); font-size: 12px; margin-bottom: 14px; }
.step-option { display: flex; align-items: center; gap: 10px; padding: 8px 4px; font-size: 14px; }
.step-option input { width: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@media (max-width: 560px) { .config-grid { grid-template-columns: 1fr; } }
