/* ================================================================
   app-header.css — Global application header + sidebar separator styles
   ================================================================ */

/* --app-header-h je u variables.css */

/* ── App Header ─────────────────────────────────────────────── */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 10px;
    background: #1a1d23;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
    flex-shrink: 0;
}

/* Push body content below the fixed header */
body {
    padding-top: var(--app-header-h, 52px);
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    flex: 1;
    overflow: visible; /* must NOT be hidden — clips dropdown panels */
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Hamburger ─────────────────────────────────────────────────── */
.app-header-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .14s ease, color .14s ease;
}
.app-header-hamburger:hover,
.app-header-hamburger:focus-visible {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    outline: none;
}

/* Brand ─────────────────────────────────────────────────────── */
.app-header-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 8px;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity .14s;
}
.app-header-brand:hover { color: #fff; opacity: .85; }
.app-header-brand img   { border-radius: 4px; }
.app-header-brand-text  { display: none; }
@media (min-width: 480px) {
    .app-header-brand-text { display: inline; }
}

/* Divider ───────────────────────────────────────────────────── */
.app-header-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, .14);
    margin: 0 6px;
    flex-shrink: 0;
}

/* Quick-links row ───────────────────────────────────────────── */
.app-header-quicklinks {
    display: flex;
    align-items: center;
    gap: 1px;
    overflow: visible;
}

.app-header-ql {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 7px;
    color: rgba(255, 255, 255, .75);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
    flex-shrink: 0;
    transition: background .14s ease, color .14s ease;
}
.app-header-ql:hover,
.app-header-ql:focus-visible {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    outline: none;
}
.app-header-ql i {
    font-size: 13px;
    flex-shrink: 0;
    opacity: .9;
}

/* Hide text labels on small screens, show on wider */
.app-header-ql span {
    display: none;
}
@media (min-width: 600px) {
    .app-header-ql span { display: inline; }
}

/* Action variants (Dodaj kupca / artikal) */
.app-header-ql.is-action {
    color: rgba(255, 255, 255, .90);
    font-weight: 600;
}
.app-header-ql.is-action:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}
.app-header-ql.is-action i {
    opacity: .85;
}

/* Badge dot */
.app-header-ql-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 9.5px;
    font-style: normal;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
}

/* ── Header dropdown groups ──────────────────────────────────── */
.app-header-ql-group {
    position: relative;
    display: flex;
    align-items: center;
}

/* Small caret icon inside the trigger link */
.app-header-ql-caret {
    font-size: 9px !important;
    opacity: .55;
    margin-left: 3px;
    flex-shrink: 0;
    transition: transform .15s ease, opacity .15s ease;
}
.app-header-ql-group:hover .app-header-ql-caret,
.app-header-ql-group:focus-within .app-header-ql-caret {
    transform: rotate(180deg);
    opacity: .9;
}

/* Dropdown panel */
.app-header-ql-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 195px;
    background: #1a1d23;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    z-index: 1050;
}
.app-header-ql-group:hover .app-header-ql-dropdown,
.app-header-ql-group:focus-within .app-header-ql-dropdown {
    display: block;
}

/* Keep dropdown open while hovering it */
.app-header-ql-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    color: rgba(255, 255, 255, .75);
    font-size: 12.5px;
    font-weight: 400;
    text-decoration: none;
    border-radius: 7px;
    white-space: nowrap;
    transition: background .12s ease, color .12s ease;
}
.app-header-ql-dropdown a:hover {
    background: rgba(255, 255, 255, .09);
    color: #fff;
}
.app-header-ql-dropdown a i {
    font-size: 11px;
    opacity: .6;
    min-width: 14px;
    text-align: center;
    flex-shrink: 0;
}

/* Admin-only links — slightly dimmer, no orange tint */
.app-header-ql.is-admin {
    color: rgba(255, 255, 255, .48);
}
.app-header-ql.is-admin:hover {
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .82);
}
.app-header-ql.is-admin i {
    opacity: .7;
}

/* ── Sidebar section separators ──────────────────────────────── */
li.nav-item-separator {
    list-style: none;
    padding: 16px 14px 5px;
    pointer-events: none;
    user-select: none;
}
li.nav-item-separator span {
    display: block;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .28);
    border-top: 1px solid rgba(255, 255, 255, .07);
    padding-top: 10px;
}
/* First separator needs no big top padding */
li.nav-item-separator:first-child {
    padding-top: 6px;
}
li.nav-item-separator:first-child span {
    border-top: none;
    padding-top: 0;
}
