/* ============ NORDIC SIDEBAR THEME ============ */
/* Basiert auf design-templates/08-nordic-sidebar.html */

@import url('fonts.css');

/* ---- Variablen ---- */
body.theme-nordic-sidebar {
    --paper:        #faf9f7;
    --paper2:       #f3f0eb;
    --paper3:       #ede9e2;
    --white:        #ffffff;
    --ink:          #1e1c18;
    --ink2:         #3a3830;
    --muted:        #7d7a72;
    --muted2:       #a8a49c;
    --rule:         #e0dbd2;
    --forest:       #2d5a3d;
    --forest-light: #3d7a53;
    --forest-pale:  #e8f0ea;
    --forest-deep:  #1e3d2a;
    --sidebar-w:    240px;
    --topbar-h:     56px;

    /* Standard-Variablen */
    --font-main:           'Plus Jakarta Sans', sans-serif;
    --font-display:        'Plus Jakarta Sans', sans-serif;
    --bg-body:             var(--paper);
    --bg-header:           var(--white);
    --bg-card:             var(--white);
    --bg-input:            var(--white);
    --bg-dropzone:         var(--white);
    --color-text:          var(--ink);
    --color-text-muted:    var(--muted);
    --color-primary:       var(--forest);
    --color-primary-hover: var(--forest-light);
    --color-border:        var(--rule);
    --color-border-focus:  var(--forest);
    --shadow-focus:        0 0 0 3px var(--forest-pale);
    --radius-card:         14px;
    --radius-input:        8px;
    --radius-btn:          7px;
    --gradient-primary:    linear-gradient(135deg, var(--forest), var(--forest-light));
}

/* ---- Body ---- */
body.theme-nordic-sidebar {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
    display: flex;
    min-height: 100vh;
}

/* Paper texture */
body.theme-nordic-sidebar::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ---- Top-Nav ausblenden ---- */
body.theme-nordic-sidebar .header {
    display: none !important;
}

/* ============================================================
   SIDEBAR: WEISSER HINTERGRUND (wie in Vorlage 08)
   ============================================================ */
body.theme-nordic-sidebar .sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--white);               /* ← WEISS, nicht dunkel */
    border-right: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transform: none;
    transition: transform 0.25s ease;
}

/* Logo-Bereich */
body.theme-nordic-sidebar .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    height: var(--topbar-h);
    border-bottom: 1px solid var(--rule);
    flex-shrink: 0;
    text-decoration: none;
}

body.theme-nordic-sidebar .sidebar-logo .logo-leaf {
    width: 34px;
    height: 34px;
    background: var(--forest);
    border-radius: 50% 50% 50% 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.5px;
    transform: rotate(-10deg);
    flex-shrink: 0;
}

body.theme-nordic-sidebar .sidebar-logo .logo-texts {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

body.theme-nordic-sidebar .sidebar-logo .logo-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
}

body.theme-nordic-sidebar .sidebar-logo .logo-sub {
    font-size: 10px;
    font-weight: 400;
    color: var(--muted2);
    letter-spacing: 0.04em;
    margin-top: 2px;
}

/* Search-Box */
body.theme-nordic-sidebar .sidebar-search {
    padding: 0.75rem 1rem;
    flex-shrink: 0;
}

body.theme-nordic-sidebar .search-box {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    background: var(--paper2);
    border: 1px solid var(--rule);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s;
}

body.theme-nordic-sidebar .search-box:hover {
    border-color: var(--muted2);
}

body.theme-nordic-sidebar .search-box svg {
    flex-shrink: 0;
    color: var(--muted2);
}

body.theme-nordic-sidebar .search-placeholder {
    font-size: 12.5px;
    color: var(--muted2);
    flex: 1;
}

body.theme-nordic-sidebar .search-kbd {
    font-size: 10px;
    color: var(--muted2);
    background: var(--paper3);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 0 4px;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* Nav */
body.theme-nordic-sidebar .sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

body.theme-nordic-sidebar .nav-section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--muted2);
    padding: 1rem 0.5rem 0.4rem;
    text-transform: uppercase;
}

body.theme-nordic-sidebar .sidebar-link,
body.theme-nordic-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--ink2);
    transition: all 0.12s;
    cursor: pointer;
    margin-bottom: 1px;
    border: none;
    background: transparent;
}

body.theme-nordic-sidebar .sidebar-link:hover,
body.theme-nordic-sidebar .nav-item:hover {
    background: var(--paper2);
    color: var(--ink);
}

body.theme-nordic-sidebar .sidebar-link.active,
body.theme-nordic-sidebar .nav-item.active {
    background: var(--forest-pale);
    color: var(--forest);
    font-weight: 600;
}

body.theme-nordic-sidebar .sidebar-link svg,
body.theme-nordic-sidebar .nav-item svg {
    flex-shrink: 0;
    color: var(--muted);
    transition: color 0.12s;
}

body.theme-nordic-sidebar .sidebar-link:hover svg,
body.theme-nordic-sidebar .nav-item:hover svg {
    color: var(--ink2);
}

body.theme-nordic-sidebar .sidebar-link.active svg,
body.theme-nordic-sidebar .nav-item.active svg {
    color: var(--forest);
}

body.theme-nordic-sidebar .nav-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    background: var(--forest-pale);
    color: var(--forest);
    padding: 1px 6px;
    border-radius: 100px;
}

/* User-Bereich */
body.theme-nordic-sidebar .sidebar-user-section {
    border-top: 1px solid var(--rule);
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

body.theme-nordic-sidebar .sidebar-user-info {
    color: inherit;
}

body.theme-nordic-sidebar .sidebar-user-info:hover {
    background: var(--paper2);
    border-radius: 6px;
}

body.theme-nordic-sidebar .sidebar-logout-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--muted2);
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    margin-left: 0.25rem;
}

body.theme-nordic-sidebar .sidebar-logout-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

body.theme-nordic-sidebar .user-avatar {
    width: 32px;
    height: 32px;
    background: var(--forest);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

body.theme-nordic-sidebar .user-info-block {
    flex: 1;
    min-width: 0;
}

body.theme-nordic-sidebar .user-display-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-nordic-sidebar .user-plan-line {
    font-size: 11px;
    color: var(--muted2);
}

body.theme-nordic-sidebar .user-dots {
    color: var(--muted2);
    font-size: 18px;
    line-height: 1;
    letter-spacing: 1px;
}

/* Letztes Element: Footer-Links in der Sidebar */
body.theme-nordic-sidebar .sidebar-footer {
    border-top: 1px solid var(--rule);
    padding: 0.5rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

body.theme-nordic-sidebar .sidebar-footer a {
    font-size: 11px;
    color: var(--muted2);
    text-decoration: none;
}

body.theme-nordic-sidebar .sidebar-footer a:hover {
    color: var(--ink);
}

/* ============================================================
   MAIN-WRAPPER
   ============================================================ */
body.theme-nordic-sidebar .main-wrapper {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Topbar */
body.theme-nordic-sidebar .main-topbar {
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

body.theme-nordic-sidebar .topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 12.5px;
    color: var(--muted2);
}

body.theme-nordic-sidebar .topbar-sep {
    color: var(--muted2);
    font-size: 16px;
    line-height: 1;
    margin: 0 1px;
}

body.theme-nordic-sidebar .topbar-active {
    color: var(--ink);
    font-weight: 500;
}

body.theme-nordic-sidebar .topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.theme-nordic-sidebar .topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 7px;
    font-family: var(--font-main);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--ink2);
    text-decoration: none;
}

body.theme-nordic-sidebar .topbar-btn:hover {
    background: var(--paper2);
}

body.theme-nordic-sidebar .topbar-btn-primary {
    background: var(--forest);
    color: white;
    border-color: var(--forest);
}

body.theme-nordic-sidebar .topbar-btn-primary:hover {
    background: var(--forest-light);
    border-color: var(--forest-light);
}

/* Hamburger: nur auf Mobile */
body.theme-nordic-sidebar .sidebar-hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--ink2);
    margin-right: 0.5rem;
}

body.theme-nordic-sidebar .sidebar-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

/* ============================================================
   MAIN-CONTENT
   ============================================================ */
body.theme-nordic-sidebar .main-content {
    flex: 1;
    padding: 2rem 4% 3rem;
    width: 80%;
    max-width: none;
    box-sizing: border-box;
}

/* Step indicator (inline in content, kein weißer Balken) */
body.theme-nordic-sidebar .step-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 1.75rem;
    background: transparent;
    border-bottom: none;
    padding: 0;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
    gap: 0;
}

body.theme-nordic-sidebar .step-item {
    display: flex;
    align-items: center;
    gap: 0;
    flex: none;
}

body.theme-nordic-sidebar .step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid var(--rule);
    background: var(--paper);
    color: var(--muted2);
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none;
    transform: none;
    transition: all 0.2s;
}

body.theme-nordic-sidebar .step-num.active {
    border-color: var(--forest);
    background: var(--forest);
    color: white;
    box-shadow: 0 0 0 3px var(--forest-pale);
    transform: none;
}

body.theme-nordic-sidebar .step-num.done {
    border-color: var(--forest);
    background: var(--forest-pale);
    color: var(--forest);
}

body.theme-nordic-sidebar .step-line {
    flex: 1;
    height: 1.5px;
    background: var(--rule);
    margin: 0 0.85rem;
    min-width: 32px;
    max-width: 80px;
    width: auto;
}

/* Step-Label (neben Kreis) */
body.theme-nordic-sidebar .step-label {
    font-size: 12.5px;
    font-weight: 400;
    color: var(--muted);
    margin-left: 0.55rem;
    margin-right: 0.25rem;
}

body.theme-nordic-sidebar .step-item.step-item--active .step-label {
    color: var(--ink);
    font-weight: 500;
}

/* ============================================================
   CARDS
   ============================================================ */
body.theme-nordic-sidebar .card,
body.theme-nordic-sidebar [class*="form-card"],
body.theme-nordic-sidebar [class*="invoice-card"],
body.theme-nordic-sidebar [class*="review-card"],
body.theme-nordic-sidebar .kpi-card,
body.theme-nordic-sidebar .admin-nav-card,
body.theme-nordic-sidebar .model-card,
body.theme-nordic-sidebar .theme-card,
body.theme-nordic-sidebar .pricing-card {
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 4px 14px rgba(0,0,0,0.04);
    border: 1px solid var(--rule);
    overflow: hidden;
}

/* ============================================================
   DROPZONE
   ============================================================ */
body.theme-nordic-sidebar .dropzone {
    background: var(--white);
    border: none;
    border-radius: 0;
    padding: 3rem 1.5rem;
    position: relative;
    transition: background 0.2s;
}

body.theme-nordic-sidebar .dropzone::before {
    content: '';
    position: absolute;
    inset: 1rem;
    border: 1.5px dashed var(--rule);
    border-radius: 10px;
    transition: all 0.2s;
    pointer-events: none;
}

body.theme-nordic-sidebar .dropzone:hover {
    background: var(--paper);
    transform: none;
}

body.theme-nordic-sidebar .dropzone:hover::before {
    border-color: var(--forest-light);
}

body.theme-nordic-sidebar .dropzone.dragover {
    background: var(--forest-pale);
    transform: none;
}

body.theme-nordic-sidebar .dropzone.dragover::before {
    border-color: var(--forest);
}

body.theme-nordic-sidebar .dropzone-icon {
    font-size: 1rem;
    width: 56px;
    height: 56px;
    background: var(--paper2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    transition: all 0.2s;
}

body.theme-nordic-sidebar .dropzone:hover .dropzone-icon {
    background: var(--forest-pale);
    transform: translateY(-2px);
}

body.theme-nordic-sidebar .dropzone-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 0.35rem;
}

body.theme-nordic-sidebar .dropzone-text {
    font-size: 12.5px;
    color: var(--muted2);
    margin-bottom: 1.5rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
body.theme-nordic-sidebar .btn-primary,
body.theme-nordic-sidebar button[type="submit"].btn-primary {
    background: var(--forest);
    color: white;
    border: none;
    border-radius: 9px;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

body.theme-nordic-sidebar .btn-primary:hover {
    background: var(--forest-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(45,90,61,0.22);
}

body.theme-nordic-sidebar .btn-secondary {
    border-color: var(--rule);
    color: var(--ink2);
    border-radius: 7px;
}

body.theme-nordic-sidebar .btn-secondary:hover {
    background: var(--paper2);
    border-color: var(--muted2);
    transform: none;
}

/* ============================================================
   FORM-ELEMENTE
   ============================================================ */
body.theme-nordic-sidebar input[type="text"],
body.theme-nordic-sidebar input[type="email"],
body.theme-nordic-sidebar input[type="number"],
body.theme-nordic-sidebar input[type="date"],
body.theme-nordic-sidebar textarea,
body.theme-nordic-sidebar select {
    border-radius: 8px;
    border-color: var(--rule);
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 300;
}

body.theme-nordic-sidebar input:focus,
body.theme-nordic-sidebar textarea:focus,
body.theme-nordic-sidebar select:focus {
    border-color: var(--forest);
    box-shadow: var(--shadow-focus);
    outline: none;
}

body.theme-nordic-sidebar input[type="checkbox"] {
    accent-color: var(--forest);
}

/* ============================================================
   PAGE-TITEL
   ============================================================ */
body.theme-nordic-sidebar .page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

body.theme-nordic-sidebar .page-subtitle {
    font-size: 14px;
    color: var(--muted);
    font-weight: 300;
}

/* ============================================================
   FOOTER
   ============================================================ */
body.theme-nordic-sidebar footer {
    background: var(--white);
    border-top: 1px solid var(--rule);
    padding: 0.75rem 2.5rem;
    margin-top: auto;
}

body.theme-nordic-sidebar footer > div {
    max-width: none;
    padding: 0;
    justify-content: space-between;
}

body.theme-nordic-sidebar footer a {
    font-size: 11px;
    color: var(--muted2);
}

body.theme-nordic-sidebar footer a:hover {
    color: var(--ink);
}

/* Compliance-Dots im Footer */
body.theme-nordic-sidebar .footer-compliance {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

body.theme-nordic-sidebar .fc-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 11px;
    color: var(--muted2);
}

body.theme-nordic-sidebar .fc-dot {
    width: 6px;
    height: 6px;
    background: var(--forest);
    border-radius: 50%;
    display: inline-block;
}

/* ============================================================
   OVERLAY + MOBILE
   ============================================================ */
body.theme-nordic-sidebar .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 199;
}

body.theme-nordic-sidebar .sidebar-overlay.sidebar-overlay--visible {
    display: block;
}

@media (max-width: 900px) {
    body.theme-nordic-sidebar .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    body.theme-nordic-sidebar .sidebar.sidebar--open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    }

    body.theme-nordic-sidebar .main-wrapper {
        margin-left: 0;
        width: 100%;
    }

    body.theme-nordic-sidebar .sidebar-hamburger {
        display: flex;
    }

    body.theme-nordic-sidebar .main-content {
        padding: 1.5rem 1rem 2rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body.theme-nordic-sidebar footer {
        padding: 0.75rem 1.25rem;
    }

    body.theme-nordic-sidebar .main-topbar {
        padding: 0 1rem;
    }

    body.theme-nordic-sidebar .topbar-actions {
        display: none;
    }

    body.theme-nordic-sidebar .footer-compliance {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

@media (max-width: 600px) {
    body.theme-nordic-sidebar .main-topbar {
        padding: 0 0.75rem;
    }

    body.theme-nordic-sidebar .topbar-breadcrumb {
        font-size: 12px;
    }
}
