/* =================================================================
   ADMIN.CSS
   Styles nur für admin.html.
   Setzt css/base.css voraus (Tokens, Reset).
   ================================================================= */

/* ===== Shell ===== */
.admin-shell {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 16px 80px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.admin-header h1 {
    font-family: var(--font-display);
    font-size: 22px;
    margin: 0;
}

.admin-header .eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-2);
    margin-bottom: 4px;
}

.back-to-site {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
}

.back-to-site:hover {
    color: var(--accent);
}

.admin-header-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== Zugangs-Gate ===== */
.gate-box {
    max-width: 360px;
    margin: 80px auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 22px;
    text-align: center;
}

.gate-box p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.gate-box input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    margin-bottom: 12px;
}

.gate-box button {
    width: 100%;
    background: var(--accent);
    border: none;
    color: #0d1117;
    font-weight: 600;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
}

.gate-warning {
    margin-top: 14px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ===== Tabs ===== */
.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.tab-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tab-btn:hover {
    color: var(--text);
    border-color: var(--accent-2);
}

.tab-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #0d1117;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

/* ===== Cards / Forms ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
}

.card h2 {
    font-size: 15px;
    margin: 0 0 4px;
    color: var(--accent);
}

.card .hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.field-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-grid.two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 560px) {
    .field-grid.two-col {
        grid-template-columns: 1fr 1fr;
    }
}

label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

input,
select,
textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    resize: vertical;
    width: 100%;
}

.checkbox-row {
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
}

.checkbox-row input {
    width: auto;
}

.btn {
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.btn-primary {
    background: var(--accent);
    color: #0d1117;
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border) !important;
}

.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

/* ===== Save-Toast ===== */
.save-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--accent);
    color: #0d1117;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 999px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 300;
}

.save-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== Portfolio-Liste ===== */
.admin-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
}

.admin-list .item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.admin-list .item-info {
    flex: 1;
    min-width: 0;
}

.admin-list .item-info strong {
    display: block;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-list .item-info span {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.admin-list .item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.admin-list .item-actions button {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    width: 28px;
    height: 28px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.admin-list .item-actions button.delete-btn {
    color: var(--danger);
    border-color: var(--danger);
}

.admin-list .item-actions button.featured-btn.is-featured {
    background: var(--accent);
    color: #0d1117;
    border-color: var(--accent);
}

.admin-list .item-actions button.visible-btn {
    opacity: 0.45;
}

.admin-list .item-actions button.visible-btn.is-visible {
    opacity: 1;
    border-color: var(--accent-2);
}

.admin-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.list-header h3 {
    margin: 0;
    font-size: 14px;
}

.io-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.io-actions button,
.import-label {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}