/* Seitenrahmen: Navigation, Grundbausteine und Fusszeile. Farben, Abstaende und Radien stammen aus den Variablen in base.css. */

/* ----------------------------------------------------------------
   Navigation
---------------------------------------------------------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(11, 12, 11, 0.9);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--border);
}

/* Etwas breiter als der Inhalt: Sieben Menuepunkte mit Beschriftung brauchen Platz */
.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    flex: 0 0 auto;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-decoration: none;
    text-transform: uppercase;
}

.brand-accent {
    color: var(--accent);
}

.brand:hover {
    color: var(--text);
}

.iconnav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.iconnav::-webkit-scrollbar {
    display: none;
}

.iconlink {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: var(--radius-pill);
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--ease), color var(--ease);
}

.iconlink:hover {
    background: var(--surface-sunken);
    color: var(--text);
}

.iconlink.active {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.iconlink svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Kurzform eines Menuepunkts, nur auf dem Handy */
.iconlink .nav-short {
    display: none;
}

/* Nachrichten und Einstellungen: Symbole direkt neben dem Konto */
.topbar-icon {
    position: relative;
    flex: 0 0 auto;
    padding: 8px;
}

/* Zahl ungelesener Nachrichten: rot, oben rechts am Symbol */
.topbar-badge {
    position: absolute;
    top: 1px;
    right: -3px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border: 2px solid var(--bg);
    border-radius: 999px;
    background: var(--alert);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 13px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    box-sizing: border-box;
    pointer-events: none;
}

.account {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex: 0 0 auto;
    font-size: 13px;
    color: var(--muted);
}

.account-name {
    font-weight: 600;
    color: var(--text);
}

.profile.overlay {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-link {
    display: inline-flex;
    border-radius: var(--radius-sm);
}

.avatar-link:hover .avatar,
.avatar-link:focus-visible .avatar {
    box-shadow: 0 0 0 2px var(--accent);
}

.avatar.small {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--panel);
    box-shadow: 0 0 0 1px var(--border);
}

.logout-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.logout-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.inline-form {
    display: inline;
}

/* ----------------------------------------------------------------
   Grundbausteine
---------------------------------------------------------------- */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 20px 64px;
}

/* Schmale Spalte fuer Formulare und Einzelseiten */
.container.narrow {
    max-width: 760px;
}

h1 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h2 {
    margin: 32px 0 12px;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 650;
}

.panel > h2:first-child,
.panel > h3:first-child {
    margin-top: 0;
}

.lead {
    margin: 0 0 28px;
    max-width: 62ch;
    color: var(--muted);
    font-size: 16px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 18px;
}

.notice {
    display: block;
    padding: 12px 16px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-left-width: 4px;
    border-radius: var(--radius-sm);
    background: var(--panel);
}

.notice p {
    margin: 0 0 4px;
}

.notice p:last-child {
    margin-bottom: 0;
}

.notice.success {
    border-color: var(--ok-line);
    border-left-color: var(--ok);
    background: var(--ok-bg);
    color: var(--ok);
}

.notice.error {
    border-color: var(--error-line);
    border-left-color: var(--error);
    background: var(--error-bg);
    color: var(--error);
}

.notice.info {
    border-color: var(--accent-line);
    border-left-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 13px;
}

/* Seitenkopf mit Titel links und Aktionen rechts */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 28px;
}

.page-head .lead {
    margin-bottom: 0;
}

/* ----------------------------------------------------------------
   Fusszeile
---------------------------------------------------------------- */

.footer {
    flex-shrink: 0;
    padding: 22px 16px;
    border-top: 1px solid var(--border);
    color: var(--faint);
    font-size: 13px;
    text-align: center;
}

.footer a {
    color: var(--muted);
    text-decoration: none;
}

.footer a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}
