/* =============================================================
   HANDWERK Admin CSS
   Wird nur für Admin-Seiten geladen
   ============================================================= */
@font-face {
    font-family: 'Montserrat';
    src: url('https://andi24.de/assets/webfonts/Montserrat-VF-latin.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('https://andi24.de/assets/webfonts/Poppins-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('https://andi24.de/assets/webfonts/Poppins-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('https://andi24.de/assets/webfonts/Poppins-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
:root {
    --hw-primary: #1e293b;
    --hw-accent: #f97316;
    --hw-accent-lt: #f97316cc;
    --hw-cream: #f5f0e8;
    --hw-light: #faf8f4;
    --hw-text: #4a4a4a;
    --hw-border: #e8e0d0;
    --ff-heading: 'Montserrat', system-ui, sans-serif;
    --ff-body: 'Poppins', system-ui, sans-serif;
    --adm-sidebar: 240px;
}
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--ff-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--hw-text);
    background: #f4f6f4;
}
a {
    text-decoration: none;
    color: inherit;
    transition: all .2s;
}
ul {
    list-style: none;
}
img {
    max-width: 100%;
}
/* ── LOGIN PAGE ─────────────────────────────────────────── */
body.adm-login {
    background: var(--hw-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.adm-login-box {
    background: #fff;
    border-radius: 20px;
    padding: 50px 44px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.adm-login-logo {
    font-family: var(--ff-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--hw-accent);
    letter-spacing: 6px;
    text-align: center;
    margin-bottom: 4px;
}
.adm-login-sub {
    text-align: center;
    font-size: 11px;
    color: #bbb;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 36px;
}
/* ── FORM ELEMENTS ──────────────────────────────────────── */
.adm-form-group {
    margin-bottom: 20px;
}
.adm-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 8px;
}
.adm-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--hw-border);
    border-radius: 10px;
    font-family: var(--ff-body);
    font-size: 15px;
    color: var(--hw-text);
    outline: none;
    transition: border-color .2s;
    background: #fff;
}
.adm-input:focus {
    border-color: var(--hw-accent);
}
/* ── BUTTONS ────────────────────────────────────────────── */
.adm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 40px;
    font-family: var(--ff-body);
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all .3s;
    text-decoration: none;
}
.adm-btn-gold {
    background: var(--hw-accent);
    color: var(--hw-primary);
}
.adm-btn-gold:hover {
    background: var(--hw-accent-lt);
    transform: translateY(-1px);
}
.adm-btn-full {
    width: 100%;
}
/* ── ALERT ──────────────────────────────────────────────── */
.adm-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}
.adm-alert-error {
    background: rgba(220, 60, 60, .08);
    color: #c03030;
    border: 1px solid rgba(220, 60, 60, .2);
}
.adm-alert-success {
    background: rgba(60, 160, 60, .08);
    color: #2a7a2a;
    border: 1px solid rgba(60, 160, 60, .2);
}
/* Passwort-Toggle */
.adm-input-wrap {
    position: relative;
}
.adm-input-wrap .adm-input {
    padding-right: 44px;
}
.adm-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity .2s;
}
.adm-pw-toggle:hover {
    opacity: 1;
}
/* Fehlversuche */
.adm-attempts {
    font-size: 12px;
    color: #e07000;
    text-align: center;
    margin-bottom: 12px;
}
/* Zurück-Link */
.adm-login-back {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
}
.adm-login-back a {
    color: #bbb;
}
.adm-login-back a:hover {
    color: var(--hw-accent);
}
/* ═══════════════════════════════════════════════════════════
   ADMIN DASHBOARD LAYOUT
   ═══════════════════════════════════════════════════════════ */

/* ── LAYOUT WRAPPER ─────────────────────────────────────── */
.hw-admin-wrap {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.hw-admin-sidebar {
    width: var(--adm-sidebar);
    background: var(--hw-primary);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}
.hw-admin-sidebar-logo {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.hw-admin-nav {
    padding: 16px 0;
    flex: 1;
}
.hw-admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 24px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,.55);
    transition: all .2s;
    border-left: 3px solid transparent;
}
.hw-admin-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,.05);
}
.hw-admin-nav a.active {
    color: var(--hw-accent);
    border-left-color: var(--hw-accent);
    background: rgba(249,115,22,.08);
}
.hw-admin-nav a i {
    font-size: 15px;
    width: 18px;
    flex-shrink: 0;
}
.hw-admin-badge {
    margin-left: auto;
    background: var(--hw-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    line-height: 1.4;
}

/* ── MAIN CONTENT ───────────────────────────────────────── */
.hw-admin-main {
    flex: 1;
    margin-left: var(--adm-sidebar);
    padding: 32px 36px;
    min-height: 100vh;
    background: #f1f5f9;
}
.hw-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}
.hw-admin-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* ── STAT CARDS ─────────────────────────────────────────── */
.hw-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.hw-admin-stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hw-admin-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(249,115,22,.10);
    color: var(--hw-accent);
    margin-bottom: 4px;
}
.hw-admin-stat-num {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}
.hw-admin-stat-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

/* ── CARD ───────────────────────────────────────────────── */
.hw-admin-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    margin-bottom: 24px;
    overflow: hidden;
}
.hw-admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}
.hw-admin-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* ── TABLE ──────────────────────────────────────────────── */
.adm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.adm-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #94a3b8;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.adm-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}
.adm-table tbody tr:hover {
    background: #f8fafc;
}
.adm-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── SMALL BUTTONS ──────────────────────────────────────── */
.adm-btn-xs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    border: none;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.adm-btn-xs:hover {
    background: var(--hw-accent);
    color: #fff;
}
.adm-btn-accent {
    background: var(--hw-accent);
    color: #fff !important;
}
.adm-btn-accent:hover {
    background: #ea6c0a;
    transform: translateY(-1px);
}

/* ── ALERT (Dashboard) ──────────────────────────────────── */
.hw-admin-alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}
.hw-admin-alert-error {
    background: rgba(220,60,60,.08);
    color: #c03030;
    border: 1px solid rgba(220,60,60,.2);
}
.hw-admin-alert-success {
    background: rgba(60,160,60,.08);
    color: #2a7a2a;
    border: 1px solid rgba(60,160,60,.2);
}

/* ── BACK LINK ──────────────────────────────────────────── */
.adm-back-link {
    color: #94a3b8;
    font-size: 13px;
}
.adm-back-link:hover {
    color: var(--hw-accent);
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .hw-admin-sidebar {
        width: 60px;
    }
    .hw-admin-sidebar-logo,
    .hw-admin-nav a span,
    .hw-admin-nav a .hw-admin-badge {
        display: none;
    }
    .hw-admin-nav a {
        justify-content: center;
        padding: 14px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    .hw-admin-nav a.active {
        border-left: none;
        border-bottom-color: var(--hw-accent);
    }
    .hw-admin-main {
        margin-left: 60px;
        padding: 20px 16px;
    }
    :root { --adm-sidebar: 60px; }
}
@media (max-width: 600px) {
    .hw-admin-stats {
        grid-template-columns: 1fr 1fr;
    }
}
/* ── MOBILE (unter 600px) ───────────────────────────────── */
@media (max-width: 600px) {
    :root { --adm-sidebar: 0px; }

    .hw-admin-sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        flex-direction: row;
        align-items: center;
        z-index: 200;
        overflow: visible;
    }
    .hw-admin-sidebar-logo {
        padding: 0 16px;
        border-bottom: none;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .hw-admin-nav {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--hw-primary);
        padding: 8px 0 16px;
        z-index: 199;
        box-shadow: 0 8px 24px rgba(0,0,0,.3);
    }
    .hw-admin-nav.open {
        display: block;
    }
    .hw-admin-nav a {
        border-left: none;
        border-bottom: none;
        padding: 14px 20px;
        color: rgba(255,255,255,.75);
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 15px;
    }
    .hw-admin-nav a span {
        display: inline !important;
    }
    .hw-admin-nav a.active {
        border-left: 3px solid var(--hw-accent);
        border-bottom: none;
        color: #fff;
    }
    .hw-admin-nav a:hover {
        background: rgba(255,255,255,.06);
        color: #fff;
    }
    .hw-admin-main {
        margin-left: 0;
        margin-top: 56px;
        padding: 16px 14px;
    }
    .hw-admin-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .hw-admin-header h1 {
        font-size: 20px;
    }
    .hw-admin-stats {
        grid-template-columns: 1fr 1fr;
    }
    .hw-admin-hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 56px;
        cursor: pointer;
        flex-shrink: 0;
        background: none;
        border: none;
        color: rgba(255,255,255,.7);
        font-size: 22px;
    }
}
@media (min-width: 601px) {
    .hw-admin-hamburger { display: none; }
}