:root {
    --att-blue: #0b4a86;
    --att-dark: #07345f;
    --att-darker: #052844;
    --background: #eef3f8;
    --white: #ffffff;
    --text: #1f2933;
    --muted: #6b7b8c;
    --border: #d9e2ea;
    --success: #178346;
    --warning: #b7791f;
    --danger: #b42318;
    --shadow: 0 10px 28px rgba(7, 52, 95, .10);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, var(--att-dark), var(--att-darker));
    color: var(--white);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-brand {
    min-height: 84px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--white);
    color: var(--att-dark);
    display: grid;
    place-items: center;
    font-weight: 900;
    letter-spacing: -1px;
}

.sidebar-brand-text {
    min-width: 0;
    flex: 1;
}

.sidebar-brand-text strong,
.sidebar-brand-text small {
    display: block;
}

.sidebar-brand-text strong {
    font-size: 18px;
}

.sidebar-brand-text small {
    margin-top: 4px;
    color: #c9d9e8;
}

.sidebar-close {
    display: none;
    border: 0;
    background: transparent;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
}

.sidebar-navigation {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section-title {
    display: block;
    padding: 0 12px 8px;
    color: #9fb8cf;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.sidebar-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 10px;
    color: #eaf2f8;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, .10);
}

.sidebar-link.active {
    background: var(--white);
    color: var(--att-dark);
    font-weight: 700;
}

.sidebar-icon {
    width: 22px;
    text-align: center;
    flex: 0 0 auto;
}

.sidebar-counter {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e11d48;
    color: var(--white);
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
}

.sidebar-footer {
    padding: 13px 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.sidebar-footer small {
    display: block;
    padding: 8px 12px 0;
    color: #9fb8cf;
}

.sidebar-logout {
    color: #ffd9d6;
}

.sidebar-backdrop {
    display: none;
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    min-height: 84px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(280px, 620px) auto;
    align-items: center;
    gap: 20px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--att-dark);
    cursor: pointer;
}

.page-heading {
    min-width: 0;
}

.page-heading h1 {
    margin: 0;
    color: var(--att-dark);
    font-size: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.global-search {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.global-search:focus-within {
    border-color: var(--att-blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(11, 74, 134, .10);
}

.global-search-icon {
    color: var(--muted);
}

.global-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-action-button {
    position: relative;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--att-dark);
    display: inline-grid;
    place-items: center;
    text-decoration: none;
    cursor: pointer;
}

.topbar-action-button:hover {
    background: #f4f8fb;
}

.topbar-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e11d48;
    color: var(--white);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
}

.user-menu {
    position: relative;
}

.user-menu-button {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 9px 5px 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--att-blue);
    color: var(--white);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.user-menu-details {
    min-width: 0;
    text-align: left;
}

.user-menu-details strong,
.user-menu-details small {
    display: block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-details small {
    margin-top: 2px;
    color: var(--muted);
}

.user-menu-arrow {
    color: var(--muted);
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 270px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 13px;
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 1200;
}

.user-dropdown-header {
    padding: 15px 16px;
    background: #f7fafc;
    border-bottom: 1px solid var(--border);
}

.user-dropdown-header strong,
.user-dropdown-header small {
    display: block;
    overflow-wrap: anywhere;
}

.user-dropdown-header small {
    margin-top: 4px;
    color: var(--muted);
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
}

.user-dropdown a:hover {
    background: #f5f8fb;
}

.user-dropdown-divider {
    border-top: 1px solid var(--border);
}

.dropdown-logout {
    color: var(--danger);
}

.notification-panel {
    position: fixed;
    top: 92px;
    right: 22px;
    z-index: 1100;
    width: min(390px, calc(100vw - 32px));
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.notification-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 17px;
    border-bottom: 1px solid var(--border);
}

.notification-panel-header button {
    border: 0;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.notification-panel-content {
    padding: 17px;
}

.notification-empty {
    margin: 0;
    color: var(--muted);
}

.page-content {
    flex: 1;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 24px;
    color: var(--muted);
    font-size: 13px;
}

.alert {
    padding: 13px 15px;
    margin-bottom: 18px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.alert.success {
    background: #e8f8ef;
    border-color: #b8e5ca;
    color: var(--success);
}

.alert.error {
    background: #fff0ef;
    border-color: #f4c7c3;
    color: var(--danger);
}

.alert.warning {
    background: #fff7e8;
    border-color: #f2d49a;
    color: var(--warning);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
}

.dashboard-grid.single {
    grid-template-columns: 1fr;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.card,
.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: 0 5px 18px rgba(7, 52, 95, .05);
}

.card {
    padding: 20px;
}

.card-icon {
    font-size: 28px;
}

.card h2 {
    margin: 12px 0 3px;
    color: var(--att-dark);
    font-size: 29px;
}

.card p {
    margin: 0;
    color: var(--muted);
}

.panel {
    padding: 21px;
}

.panel h2 {
    margin: 0 0 16px;
    color: var(--att-dark);
}

.dashboard-grid section > .panel {
    margin-top: 20px;
}

.online-list {
    display: grid;
    gap: 13px;
}

.online-user {
    display: flex;
    gap: 10px;
    align-items: center;
}

.online-user strong,
.online-user small {
    display: block;
}

.online-user small {
    margin-top: 3px;
    color: var(--muted);
}

.online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(23, 131, 70, .10);
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 16px;
}

.button,
button {
    border: 0;
    border-radius: 9px;
    background: var(--att-blue);
    color: var(--white);
    padding: 11px 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.button:hover,
button:hover {
    filter: brightness(.96);
}

.table-panel {
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    background: #f7f9fb;
    color: var(--att-dark);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.actions form {
    display: inline;
}

.actions button,
.actions a {
    display: inline-block;
    padding: 7px 9px;
    border-radius: 7px;
    font-size: 13px;
    text-decoration: none;
}

.badge {
    display: inline-block;
    padding: 5px 8px;
    margin: 2px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge.success,
.badge.online {
    background: #dcfae6;
    color: var(--success);
}

.badge.danger {
    background: #fee4e2;
    color: var(--danger);
}

.form-panel {
    max-width: 900px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.form-grid h2,
.form-grid fieldset,
.form-grid > div:last-child {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: var(--white);
    color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: var(--att-blue);
    box-shadow: 0 0 0 3px rgba(11, 74, 134, .10);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

fieldset {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 7px 0;
    font-weight: 400;
}

.checkbox input {
    width: auto;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 13px;
}

.connection-notice {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 2000;
    transform: translate(-50%, -150%);
    opacity: 0;
    background: var(--success);
    color: var(--white);
    padding: 11px 16px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: .25s ease;
}

.connection-notice.offline {
    background: var(--danger);
}

.connection-notice.visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2100;
    display: grid;
    gap: 10px;
}

@media (max-width: 1200px) {
    .topbar {
        grid-template-columns: minmax(200px, 1fr) minmax(220px, 420px) auto;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 280px;
        transform: translateX(-102%);
        transition: transform .25s ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 950;
        background: rgba(15, 23, 42, .48);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .topbar-center {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .topbar {
        padding: 12px 14px;
        gap: 12px;
    }

    .page-heading p,
    .user-menu-details,
    .user-menu-arrow {
        display: none;
    }

    .page-heading h1 {
        font-size: 20px;
    }

    .topbar-actions {
        gap: 5px;
    }

    .page-content {
        padding: 14px;
    }

    .cards,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid h2,
    .form-grid fieldset,
    .form-grid > div:last-child {
        grid-column: auto;
    }

    .app-footer {
        flex-direction: column;
        padding: 16px 14px;
    }
}
/* ===== Loginpagina ===== */

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 30px;
    background: linear-gradient(135deg, #0b5ed7 0%, #0d6efd 100%);
}

.auth-card {
    width: 100%;
    max-width: 480px;
    margin-left: 120px;
    padding: 40px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
}

.auth-card h1 {
    margin: 0 0 10px;
    color: #0d6efd;
    font-size: 32px;
    text-align: center;
}

.auth-card p {
    margin: 0 0 30px;
    color: #666666;
    text-align: center;
}

.auth-card label {
    display: block;
    margin-bottom: 18px;
    font-weight: 600;
}

.auth-card input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-size: 15px;
}

.auth-card button {
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 8px;
    background: #0d6efd;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.auth-card button:hover {
    background: #0b5ed7;
}

.auth-card a {
    display: block;
    margin-top: 18px;
    color: #0d6efd;
    text-align: center;
    text-decoration: none;
}

.auth-card a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .auth-page {
        padding: 18px;
    }

    .auth-card {
        max-width: 100%;
        margin-left: 0;
        padding: 25px;
    }

    .auth-card h1 {
        font-size: 28px;
    }
}
