/*
 * theme.css – Wspólny design system: Pasieka Mańkosie App
 * Jasny, elegancki, "pergaminowy" design w pełnej zgodności z mankosie.pl
 * Importuj na każdej stronie: <link rel="stylesheet" href="theme.css">
 */

/* ── Google Fonts (te same co na mankosie.pl) ── */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,400&display=swap');

/* ── Zmienne (paleta 1:1 z mankosie.pl) ── */
:root {
    --ink:          #b8680a;
    --ink-mid:      #3D2E1A;
    --ink-soft:     #6B5740;
    --ink-pale:     #9A8B78;
    --parchment:    #FAF7F0;
    --parchment-dark: #F0EAD8;
    --parchment-mid:  #E8DFC8;
    --honey:        #B8680A;
    --honey-warm:   #D4820C;
    --honey-light:  #F0C040;
    --honey-pale:   #FBF0D0;
    --sepia:        #7A5C38;
    --white:        #FFFFFF;
    --border:       rgba(26,18,8,0.12);
    --border-strong: rgba(26,18,8,0.22);

    /* Aliasy zgodne z dawnym systemem (żeby stare odwołania w PHP nadal działały) */
    --amber:   var(--honey-warm);
    --dark:    var(--ink);
    --dark-2:  var(--parchment-dark);
    --panel:   var(--white);
    --panel2:  var(--parchment-dark);
    --text:    var(--ink);
    --muted:   var(--ink-soft);
    --green:   #4d7c4a;
    --red:     #b8453a;
    --blue:    #4a6f8a;
    --violet:  #7a5c8a;

    --serif:   'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --serif-2: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sans:    'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius:  5px;
    --radius-lg: 3px;
    --shadow:  0 10px 32px rgba(26,18,8,.10);
    --shadow-sm: 0 2px 10px rgba(26,18,8,.06);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--parchment);
    color: var(--ink);
    font-family: var(--serif-2);
    font-weight: 400;
    min-height: 100vh;
    line-height: 1.65;
    font-size: 16px;
}

/* Delikatny, ciepły radial-overlay zamiast ciemnego gradientu */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
    background: radial-gradient(circle at 15% 0%, rgba(184, 104, 10, 0.05) 0%, transparent 45%),
                radial-gradient(circle at 85% 100%, rgba(212, 130, 12, 0.04) 0%, transparent 45%);
}

/* ── Layout ── */
.page-wrap {
    position: relative; z-index: 1;
    max-width: 1100px; margin: 0 auto;
    padding: 1.6rem 1.2rem 5rem;
    width: 100%;
}
.page-wrap--narrow { max-width: 660px; }
.page-wrap--center {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 2rem 1rem;
}

/* ── App Shell (sidebar layout) ── */
.app-shell {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Mobile top bar — logo + burger, visible only on small screens */
.mobile-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.2rem;
    border-bottom: 1px solid var(--border);
    background: rgba(250, 247, 240, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 200;
}
.mobile-topbar .nav-brand img.brand-logo { height: 28px; }

/* ── Sidebar (desktop) ── */
.sidebar {
    width: 248px;
    flex-shrink: 0;
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 1.3rem 1.4rem 1.1rem;
    flex-shrink: 0;
}
.sidebar-brand img.brand-logo { height: 32px; width: auto; display: block; }

.sidebar-context {
    margin: 0 1rem 1rem;
    padding: .7rem .9rem;
    background: var(--honey-pale);
    border: 1px solid rgba(184,104,10,.25);
    border-radius: var(--radius-lg);
}
.sidebar-context-label {
    font-family: var(--sans);
    font-size: .65rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--honey);
    font-weight: 500;
    margin-bottom: .25rem;
}
.sidebar-context-name {
    font-family: var(--serif);
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sidebar-section-label {
    font-family: var(--sans);
    font-size: .65rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-pale);
    font-weight: 500;
    padding: 0 1.4rem;
    margin: 1.1rem 0 .4rem;
}
.sidebar-nav {
    flex: 1;
    padding-bottom: 1rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem 1.4rem;
    margin: 0 .6rem;
    border-radius: var(--radius);
    color: var(--ink-mid);
    text-decoration: none;
    font-family: var(--sans);
    font-size: .85rem;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.sidebar-link .icon { font-size: 1rem; width: 1.2rem; text-align: center; flex-shrink: 0; }
.sidebar-link:hover {
    background: var(--honey-pale);
    color: var(--honey);
}
.sidebar-link.active {
    background: var(--ink);
    color: var(--parchment);
}
.sidebar-link.danger { color: var(--red); }
.sidebar-link.danger:hover { background: rgba(184, 69, 58, 0.08); color: var(--red); }

/* ── Rozwijana lista pasiek (sidebar) ── */
.sidebar-collapsible { margin: 0 .6rem; }
.sidebar-collapsible summary {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .8rem;
    border-radius: var(--radius);
    color: var(--ink-mid);
    font-family: var(--sans);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    transition: background .15s, color .15s;
    user-select: none;
}
.sidebar-collapsible summary::-webkit-details-marker { display: none; }
.sidebar-collapsible summary:hover {
    background: var(--honey-pale);
    color: var(--honey);
}
.sidebar-collapsible summary .icon { font-size: 1rem; width: 1.2rem; text-align: center; flex-shrink: 0; }
.sidebar-collapsible summary .chevron {
    margin-left: auto;
    font-size: .65rem;
    color: var(--ink-pale);
    flex-shrink: 0;
}
.sidebar-collapsible summary .chevron::before { content: '▶'; }
.sidebar-collapsible[open] summary .chevron::before { content: '▼'; }
.sidebar-collapsible[open] summary {
    background: var(--honey-pale);
    color: var(--honey);
}
.sidebar-sublist {
    display: flex;
    flex-direction: column;
    padding: .25rem 0 .35rem;
}
.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .8rem .5rem 2.5rem;
    border-radius: var(--radius);
    color: var(--ink-soft);
    text-decoration: none;
    font-family: var(--sans);
    font-size: .8rem;
    font-weight: 500;
    transition: background .15s, color .15s;
    min-width: 0;
}
.sidebar-sublink > * {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.sidebar-sublink:hover {
    background: var(--honey-pale);
    color: var(--honey);
}
.sidebar-sublink.active {
    background: var(--ink);
    color: var(--parchment);
}
.sidebar-sublink-empty {
    padding: .5rem .8rem .5rem 2.5rem;
    color: var(--ink-pale);
    font-family: var(--sans);
    font-size: .78rem;
    font-style: italic;
}

.sidebar-sep {
    height: 1px;
    background: var(--border);
    margin: .8rem 1.4rem;
}

.sidebar-footer {
    padding: .9rem 1.4rem 1.2rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: .7rem;
}
.sidebar-user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--ink);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-size: .9rem; font-weight: bold;
    color: var(--parchment); flex-shrink: 0;
}
.sidebar-user-name { font-size: .85rem; font-weight: 600; color: var(--ink); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-email { font-size: .72rem; color: var(--ink-pale); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
    .sidebar { display: none; }
    .mobile-topbar { display: flex; }
}
@media (min-width: 901px) {
    .nav-burger, .nav-overlay, .nav-drawer { display: none !important; }
}

/* ── Page header (in-content title + contextual actions) ── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.6rem 1.2rem 0;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}
.page-header h1 {
    font-family: var(--serif);
    font-size: 1.5rem;
    color: var(--ink);
    font-weight: 700;
}
.page-header-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}
@media (max-width: 600px) {
    .page-header { padding: 1.2rem 1rem 0; }
    .page-header-actions { width: 100%; }
    .page-header-actions .btn { flex: 1; justify-content: center; }
}
.nav-brand {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    display: flex; align-items: center; gap: .6rem;
    letter-spacing: -0.01em;
}
.nav-brand img.brand-logo {
    height: 34px;
    width: auto;
    display: block;
}
.nav-brand small {
    font-family: var(--sans);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--honey);
    font-weight: 500;
}
.nav-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .65rem 1.4rem;
    border-radius: var(--radius);
    font-size: .8rem; font-family: var(--sans); font-weight: 500;
    cursor: pointer; text-decoration: none; border: none;
    transition: all .2s ease;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.btn-honey {
    background: var(--ink);
    color: var(--parchment);
}
.btn-honey:hover {
    background: var(--honey);
    color: var(--white);
}
.btn-honey:active {
    background: var(--honey-warm);
}
.btn-outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border-strong);
}
.btn-outline:hover {
    border-color: var(--honey);
    color: var(--honey);
    background: var(--honey-pale);
}
.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
}
.btn-ghost:hover {
    color: var(--honey);
    background: var(--honey-pale);
}
.btn-danger {
    background: transparent;
    color: var(--red);
    border: 1px solid rgba(184, 69, 58, 0.35);
}
.btn-danger:hover {
    background: rgba(184, 69, 58, 0.08);
    border-color: var(--red);
}
.btn-sm { padding: .4rem .9rem; font-size: .72rem; }
.btn-lg { padding: .85rem 2.1rem; font-size: .85rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Cards ── */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all .25s ease;
}
.card-pad { padding: 1.8rem; }
.card-hover { transition: border-color .2s, transform .18s, box-shadow .2s; }
.card-hover:hover {
    border-color: var(--honey);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

/* ── Form elements ── */
.field { margin-bottom: 1.3rem; }
.field label {
    display: block;
    font-family: var(--sans);
    font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--honey); margin-bottom: .5rem; font-weight: 500;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    background: var(--parchment);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--ink);
    padding: .75rem 1.1rem;
    font-size: .95rem; font-family: var(--serif-2); font-weight: 400;
    outline: none; transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--honey);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(184, 104, 10, 0.12);
}
.field select option { background: var(--white); color: var(--ink); }
.field textarea { resize: vertical; min-height: 100px; }
.field-hint { font-size: .8rem; color: var(--ink-pale); margin-top: .4rem; }

/* Form grid */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

/* ── Alerts ── */
.alert {
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    font-size: .9rem;
    margin-bottom: 1.3rem;
    border-left: 3px solid;
    font-family: var(--serif-2);
}
.alert-error {
    background: rgba(184, 69, 58, 0.06);
    color: #8a3328;
    border-left-color: var(--red);
}
.alert-success {
    background: rgba(77, 124, 74, 0.07);
    color: #345a32;
    border-left-color: var(--green);
}
.alert-info {
    background: var(--honey-pale);
    color: var(--ink-mid);
    border-left-color: var(--honey);
}
.alert ul { margin-left: 1.2rem; }

/* ── Section heading ── */
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin: 2.5rem 0 1.3rem;
}
.section-head h2 {
    font-family: var(--serif);
    font-size: 1.35rem; color: var(--ink); font-weight: 600;
}
.section-divider {
    font-family: var(--serif);
    font-size: 1rem; color: var(--ink);
    margin: 1.8rem 0 1.2rem;
    padding-bottom: .6rem;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
}

/* ── Stats bar ── */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px; margin: 2rem 0;
    background: var(--border);
    border: 1px solid var(--border-strong);
}
@media (max-width: 700px) { .stats-bar { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 380px) { .stats-bar { grid-template-columns: 1fr 1fr; } }
.stat-card {
    background: var(--white);
    padding: 1.5rem 1.6rem;
    transition: background .25s ease;
}
.stat-card:hover {
    background: var(--honey-pale);
}
.stat-val  { font-family: var(--serif); font-size: 2.2rem; color: var(--honey); line-height: 1.1; font-weight: 700; }
.stat-lbl  { font-family: var(--sans); font-size: .7rem; color: var(--ink-pale); letter-spacing: .1em; text-transform: uppercase; margin-top: .35rem; font-weight: 500; }

/* ── Health badges ── */
.badge {
    display: inline-flex; align-items: center;
    font-family: var(--sans);
    font-size: .7rem; font-weight: 500;
    padding: .35rem .8rem; border-radius: 20px;
    letter-spacing: .08em; text-transform: uppercase;
}
.badge-green {
    background: rgba(77, 124, 74, 0.1);
    color: #345a32;
    border: 1px solid rgba(77, 124, 74, 0.3);
}
.badge-honey {
    background: var(--honey-pale);
    color: var(--honey);
    border: 1px solid rgba(184, 104, 10, 0.35);
}
.badge-red {
    background: rgba(184, 69, 58, 0.08);
    color: #8a3328;
    border: 1px solid rgba(184, 69, 58, 0.3);
}
.badge-muted {
    background: var(--parchment-dark);
    color: var(--ink-soft);
    border: 1px solid var(--border);
}

/* ── Tags / chips ── */
.chip {
    display: inline-flex; align-items: center; gap: .3rem;
    font-family: var(--sans);
    font-size: .72rem; padding: .28rem .75rem; border-radius: 20px;
    background: var(--honey-pale);
    border: 1px solid rgba(184, 104, 10, 0.25);
    color: var(--ink-soft);
}

/* ── Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th {
    text-align: left; padding: .8rem 1rem;
    font-family: var(--sans);
    font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--honey); border-bottom: 2px solid var(--border-strong); font-weight: 500;
    background: var(--parchment-dark);
}
.data-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--ink-mid); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--honey-pale); }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 2.2rem; }
.timeline::before {
    content: ''; position: absolute;
    left: .6rem; top: .8rem; bottom: 0;
    width: 1px; background: linear-gradient(180deg, var(--border-strong), transparent);
}
.tl-item { position: relative; margin-bottom: 1.3rem; }
.tl-dot {
    position: absolute; left: -1.65rem; top: 1.2rem;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--honey);
    border: 3px solid var(--parchment);
    box-shadow: 0 0 0 1px var(--border-strong);
}
.tl-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.2rem 1.3rem;
    transition: border-color .2s, box-shadow .2s;
}
.tl-card:hover {
    border-color: var(--honey);
    box-shadow: var(--shadow-sm);
}
.tl-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .5rem; margin-bottom: .4rem; }
.tl-type { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: .45rem; color: var(--ink); font-family: var(--serif); }
.tl-date { font-family: var(--sans); font-size: .72rem; color: var(--ink-pale); letter-spacing: .04em; }
.tl-body { font-size: .9rem; color: var(--ink-soft); line-height: 1.6; }
.tl-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.tl-tag  { font-family: var(--sans); font-size: .68rem; padding: .2rem .6rem; border-radius: 3px; background: var(--parchment-dark); color: var(--ink-soft); border: 1px solid var(--border); letter-spacing: .03em; }
.tl-next { font-family: var(--sans); font-size: .72rem; color: var(--honey); margin-top: .45rem; font-weight: 500; letter-spacing: .03em; }

/* ── Empty state ── */
.empty { text-align: center; color: var(--ink-pale); padding: 3.5rem 1rem; font-size: .95rem; font-style: italic; }
.empty a { color: var(--honey); text-decoration: none; font-weight: 500; font-style: normal; }
.empty a:hover { text-decoration: underline; }

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.anim { animation: fadeUp .4s ease both; }
.anim-1 { animation-delay: .05s } .anim-2 { animation-delay: .1s }
.anim-3 { animation-delay: .15s } .anim-4 { animation-delay: .2s }
.anim-5 { animation-delay: .25s } .anim-6 { animation-delay: .3s }
.anim-7 { animation-delay: .35s } .anim-8 { animation-delay: .4s }

/* ── Auth pages (login / register) ── */
.auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.8rem;
    width: 100%; max-width: 460px;
    box-shadow: var(--shadow);
}
.auth-logo {
    font-family: var(--serif);
    font-size: 1.9rem; color: var(--ink);
    text-align: center; margin-bottom: .5rem;
    font-weight: 700;
}
.auth-logo img.brand-logo {
    height: 56px;
    width: auto;
    display: block;
    margin: 0 auto;
}
.auth-sub {
    text-align: center; font-family: var(--sans);
    font-size: .75rem;
    color: var(--honey); letter-spacing: .14em;
    text-transform: uppercase; margin-bottom: 2rem;
    font-weight: 500;
}
.auth-links { margin-top: 1.6rem; text-align: center; font-size: .9rem; color: var(--ink-soft); }
.auth-links a { color: var(--honey); text-decoration: none; font-weight: 500; }
.auth-links a:hover { text-decoration: underline; }

/* ── Mobile nav – hamburger + drawer ── */

/* Przycisk hamburgera – widoczny tylko mobile */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: var(--honey-pale);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.nav-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--honey);
    border-radius: 2px;
    transition: transform .25s, opacity .2s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nakładka */
.nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(26,18,8,.45);
    z-index: 299;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}
.nav-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* Szuflada (drawer) */
.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(80vw, 300px);
    background: var(--parchment);
    border-left: 1px solid var(--border-strong);
    z-index: 300;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.nav-drawer.open { transform: translateX(0); }

.nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.nav-drawer-brand {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
}
.nav-drawer-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--ink-soft);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sekcja użytkownika w szufladzie */
.nav-drawer-user {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.nav-drawer-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: bold;
    color: var(--parchment);
    flex-shrink: 0;
}
.nav-drawer-username { font-weight: 600; font-size: .95rem; color: var(--ink); }
.nav-drawer-email    { font-size: .78rem; color: var(--ink-pale); margin-top: 1px; }

/* Linki w szufladzie */
.nav-drawer-links {
    flex: 1;
    padding: .5rem 0;
    display: flex;
    flex-direction: column;
}
.nav-drawer-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.2rem;
    color: var(--ink-mid);
    text-decoration: none;
    font-family: var(--sans);
    font-size: .9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background .18s, border-color .18s, color .18s;
}
.nav-drawer-link:hover,
.nav-drawer-link:active {
    background: var(--honey-pale);
    border-left-color: var(--honey);
    color: var(--honey);
}
.nav-drawer-link.primary {
    color: var(--honey);
}
.nav-drawer-link.danger {
    color: var(--red, #b8453a);
}
.nav-drawer-link.danger:hover {
    background: rgba(184, 69, 58, 0.08);
    border-left-color: var(--red, #b8453a);
}
.nav-drawer-sep {
    height: 1px;
    background: var(--border);
    margin: .4rem 1.2rem;
}

/* ── Rozwijana lista pasiek (drawer mobile) ── */
.nav-drawer-collapsible summary {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.2rem;
    color: var(--ink-mid);
    font-family: var(--sans);
    font-size: .9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background .18s, border-color .18s, color .18s;
}
.nav-drawer-collapsible summary::-webkit-details-marker { display: none; }
.nav-drawer-collapsible summary:hover {
    background: var(--honey-pale);
    border-left-color: var(--honey);
    color: var(--honey);
}
.nav-drawer-collapsible summary .chevron {
    margin-left: auto;
    font-size: .68rem;
    color: var(--ink-pale);
}
.nav-drawer-collapsible summary .chevron::before { content: '▶'; }
.nav-drawer-collapsible[open] summary .chevron::before { content: '▼'; }
.nav-drawer-collapsible[open] summary {
    background: var(--honey-pale);
    color: var(--honey);
}
.nav-drawer-sublink {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1.2rem .75rem 2.7rem;
    color: var(--ink-soft);
    text-decoration: none;
    font-family: var(--sans);
    font-size: .85rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s;
}
.nav-drawer-sublink:hover {
    background: var(--honey-pale);
    color: var(--honey);
}
.nav-drawer-sublink.active {
    color: var(--honey);
    font-weight: 600;
}
.nav-drawer-sublink-empty {
    padding: .75rem 1.2rem .75rem 2.7rem;
    color: var(--ink-pale);
    font-family: var(--sans);
    font-size: .82rem;
    font-style: italic;
}

.nav-drawer-section-label {
    font-family: var(--sans);
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-pale);
    padding: .6rem 1.2rem .2rem;
    font-weight: 500;
}

/* Na desktop szuflada niewidoczna, hamburger schowany */
@media (min-width: 601px) {
    .nav-burger  { display: none !important; }
    .nav-overlay { display: none !important; }
    .nav-drawer  { display: none !important; }
}

/* Na mobile chowamy nav-actions, pokazujemy hamburger */
@media (max-width: 600px) {
    .nav-actions { display: none !important; }
    .nav-burger  { display: flex; }
    .nav-overlay { display: block; }
    .auth-card   { padding: 2rem; }
    .hide-mobile { display: none; }
}


/* ── Profile dropdown ── */
.nav-profile {
    position: relative;
    display: flex;
    align-items: center;
}
.profile-button {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    background: var(--honey-pale);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--ink-mid);
    cursor: pointer;
    transition: background .2s, border-color .2s;
    font-family: var(--sans);
    font-size: .85rem;
}
.profile-button:hover { background: var(--honey-light); border-color: var(--honey); }
.profile-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--ink);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif);
    font-size: .85rem; font-weight: bold; color: var(--parchment); flex-shrink: 0;
}
.profile-dropdown {
    position: absolute; top: calc(100% + .5rem); right: 0;
    background: var(--white); border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
    min-width: 220px; opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 200;
}
.profile-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.profile-dropdown-header { padding: 1rem; border-bottom: 1px solid var(--border); }
.profile-dropdown-username { font-weight: 600; color: var(--ink); margin-bottom: .2rem; }
.profile-dropdown-email { font-family: var(--sans); font-size: .8rem; color: var(--ink-pale); }
.profile-dropdown-item {
    padding: .8rem 1.2rem; display: flex; align-items: center; gap: .6rem;
    color: var(--ink-mid); text-decoration: none;
    font-family: var(--sans); font-size: .88rem;
    border-bottom: 1px solid var(--border);
    transition: background .15s, color .15s;
}
.profile-dropdown-item:last-child { border-bottom: none; }
.profile-dropdown-item:hover { background: var(--honey-pale); color: var(--honey); }
.profile-dropdown-item.logout { color: var(--red); }
.profile-dropdown-item.logout:hover { background: rgba(184, 69, 58, 0.08); }
