:root {
    color-scheme: light;
    --bg: #f5f5f7;
    --surface: rgba(255, 255, 255, 0.74);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --text: #1d1d1f;
    --muted: #6e6e73;
    --hairline: rgba(60, 60, 67, 0.16);
    --hairline-strong: rgba(60, 60, 67, 0.24);
    --blue: #0071e3;
    --blue-dark: #005bb5;
    --red: #ff3b30;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(0, 113, 227, 0.12), transparent 34rem),
        linear-gradient(135deg, #fbfbfd 0%, #f5f5f7 48%, #ededf0 100%);
    color: var(--text);
    line-height: 1.5;
    letter-spacing: 0;
}

.login-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

a {
    color: inherit;
}

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

button,
select {
    cursor: pointer;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

.login-shell {
    width: min(100%, 520px);
}

.login-panel {
    padding: 28px;
    border: 1px solid var(--hairline);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.68)),
        linear-gradient(135deg, rgba(0, 113, 227, 0.12), rgba(52, 199, 89, 0.08));
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.login-logo {
    padding: 0;
}

.login-copy {
    margin: 42px 0 22px;
}

.login-copy h2 {
    margin-top: 7px;
    font-size: clamp(34px, 7vw, 54px);
    font-weight: 750;
    line-height: 1.04;
}

.login-copy p:not(.eyebrow) {
    margin-top: 14px;
    color: var(--muted);
    font-size: 17px;
}

.login-actions {
    display: grid;
    margin-top: 20px;
}

.login-actions .primary-action {
    border: 0;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 22px 16px;
    overflow-y: auto;
    background: rgba(245, 245, 247, 0.78);
    border-right: 1px solid var(--hairline);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 4px 8px;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: min(190px, 100%);
    height: auto;
    max-height: 58px;
    object-fit: contain;
}

.logo-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff, #f2f2f4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 24px rgba(0, 0, 0, 0.07);
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.logo h1 {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.15;
}

.logo p,
.eyebrow {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.nav-menu ul,
.profile-dropdown ul,
.groups ul {
    list-style: none;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin-bottom: 3px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #3a3a3c;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.64);
    border-color: var(--hairline);
}

.nav-menu a.active {
    background: var(--surface-strong);
    border-color: var(--hairline-strong);
    color: var(--text);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.icon,
.card-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(0, 113, 227, 0.1);
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}

.sidebar-footer {
    margin-top: auto;
}

.logout-btn {
    display: block;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 59, 48, 0.18);
    border-radius: 8px;
    color: #d70015;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    background: rgba(255, 59, 48, 0.06);
}

.logout-btn:hover {
    background: rgba(255, 59, 48, 0.1);
}

.main-area {
    flex: 1;
    min-width: 0;
    margin-left: 280px;
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    padding: 14px 34px;
    background: rgba(251, 251, 253, 0.72);
    border-bottom: 1px solid var(--hairline);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
}

.search-container {
    position: relative;
    width: min(440px, 45vw);
}

.search-container input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 42px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    outline: none;
    background: rgba(118, 118, 128, 0.12);
    color: var(--text);
    font-size: 15px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-container input:focus {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(0, 113, 227, 0.46);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.search-icon {
    position: absolute;
    left: 17px;
    top: 50%;
    width: 13px;
    height: 13px;
    border: 2px solid #8e8e93;
    border-radius: 50%;
    transform: translateY(-58%);
}

.search-icon::after {
    position: absolute;
    right: -6px;
    bottom: -5px;
    width: 7px;
    height: 2px;
    border-radius: 999px;
    background: #8e8e93;
    content: "";
    transform: rotate(45deg);
}

.top-right {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.notification,
.profile {
    border: 1px solid var(--hairline);
    background: var(--surface);
    cursor: pointer;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.notification {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
}

.notification-wrap {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 120;
    display: none;
    width: min(360px, calc(100vw - 28px));
    max-height: 440px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
}

.notification-dropdown.is-open {
    display: block;
}

.notification-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 10px 8px;
}

.notification-dropdown-head strong {
    font-size: 15px;
}

.notification-dropdown-head span,
.notification-dropdown-note,
.notification-dropdown-item small {
    color: var(--muted);
    font-size: 12px;
}

.notification-dropdown-note {
    padding: 10px;
}

.notification-dropdown-item {
    display: grid;
    gap: 3px;
    padding: 10px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
}

.notification-dropdown-item:hover {
    background: rgba(118, 118, 128, 0.12);
}

.notification-dropdown-item strong {
    font-size: 14px;
}

.notification-dropdown-item span {
    color: var(--muted);
    font-size: 13px;
}

.bell {
    position: relative;
    width: 15px;
    height: 17px;
    border: 2px solid #3a3a3c;
    border-bottom: 0;
    border-radius: 9px 9px 5px 5px;
}

.bell::before,
.bell::after {
    position: absolute;
    content: "";
}

.bell::before {
    left: 50%;
    top: -5px;
    width: 5px;
    height: 5px;
    border: 2px solid #3a3a3c;
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
    transform: translateX(-50%);
}

.bell::after {
    left: 50%;
    bottom: -5px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #3a3a3c;
    transform: translateX(-50%);
}

.badge {
    position: absolute;
    top: -4px;
    right: -3px;
    display: grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    padding: 0 5px;
    border: 2px solid #fbfbfd;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 5px 6px 5px 14px;
    border-radius: 999px;
}

.profile-info {
    display: grid;
    gap: 1px;
    text-align: right;
}

.name {
    max-width: 170px;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role {
    color: var(--muted);
    font-size: 12px;
}

.avatar {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(180deg, #0a84ff, #0066cc);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: none;
    width: 190px;
    padding: 6px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
}

.profile-dropdown.is-open {
    display: block;
}

.profile-dropdown a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
}

.profile-dropdown a:hover {
    background: rgba(118, 118, 128, 0.12);
}

.content {
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
    padding: 42px 0 58px;
}

.welcome {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
    padding: 34px;
    border: 1px solid var(--hairline);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.58)),
        linear-gradient(135deg, rgba(0, 113, 227, 0.12), rgba(52, 199, 89, 0.08));
    box-shadow: var(--shadow);
}

.welcome h2 {
    margin-top: 7px;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 750;
    line-height: 1.03;
}

.welcome h2 span {
    color: var(--blue);
}

.welcome p:not(.eyebrow) {
    max-width: 590px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 18px;
}

.primary-action {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-size: 15px;
    font-weight: 650;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0, 113, 227, 0.22);
}

.primary-action:hover {
    background: var(--blue-dark);
}

.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
}

.secondary-action:hover {
    border-color: rgba(0, 113, 227, 0.34);
    color: var(--blue);
}

.secondary-action.danger-soft {
    color: #d70015;
}

.secondary-action.danger-soft:hover {
    border-color: rgba(255, 59, 48, 0.28);
    color: #a80011;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 16px;
}

.overview h3 {
    margin-top: 4px;
    font-size: 26px;
    font-weight: 720;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.card {
    min-height: 164px;
    padding: 18px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 113, 227, 0.34);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.08);
}

.card h4 {
    margin-top: 26px;
    font-size: 18px;
    font-weight: 700;
}

.card p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 14px;
}

.page-title {
    max-width: 760px;
    margin-bottom: 24px;
}

.page-title h2 {
    margin-top: 6px;
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 750;
    line-height: 1.04;
}

.page-title p:not(.eyebrow) {
    margin-top: 10px;
    color: var(--muted);
    font-size: 17px;
}

.notice {
    padding: 12px 14px;
    border: 1px solid rgba(255, 149, 0, 0.24);
    border-radius: 8px;
    background: rgba(255, 149, 0, 0.1);
    color: #8a4b00 !important;
}

.wall-composer,
.admin-panel,
.empty-state,
.post-card,
.table-wrap {
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.wall-composer,
.admin-panel {
    margin-bottom: 24px;
    padding: 18px;
}

.wall-composer form,
.admin-form {
    display: grid;
    gap: 12px;
}

.wall-composer label,
.admin-form label {
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
}

textarea,
.admin-form input,
.admin-form select {
    width: 100%;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    outline: none;
    background: rgba(118, 118, 128, 0.1);
    color: var(--text);
    font-size: 15px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

textarea {
    min-height: 130px;
    resize: vertical;
    padding: 13px 14px;
}

.admin-form input,
.admin-form select {
    height: 42px;
    padding: 0 12px;
}

textarea:focus,
.admin-form input:focus,
.admin-form select:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 113, 227, 0.46);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.form-actions span {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-error,
.form-success {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.form-error {
    border: 1px solid rgba(255, 59, 48, 0.2);
    background: rgba(255, 59, 48, 0.08);
    color: #d70015;
}

.form-success {
    border: 1px solid rgba(52, 199, 89, 0.2);
    background: rgba(52, 199, 89, 0.1);
    color: #1f7a34;
}

.wall-feed {
    display: grid;
    gap: 14px;
}

.empty-state,
.post-card {
    padding: 18px;
}

.empty-state h3,
.post-header h3,
.admin-list h3 {
    font-size: 18px;
    font-weight: 720;
}

.empty-state p {
    margin-top: 6px;
    color: var(--muted);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 14px;
}

.post-header p {
    color: var(--muted);
    font-size: 13px;
}

.avatar.small {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

.post-content {
    color: #2c2c2e;
    font-size: 16px;
    white-space: normal;
}

.post-actions {
    margin-top: 14px;
}

.text-danger {
    border: 0;
    background: transparent;
    color: #d70015;
    font-size: 14px;
    font-weight: 650;
}

.text-danger:hover {
    color: #a80011;
}

.admin-form {
    max-width: 520px;
}

.admin-form .primary-action {
    justify-self: start;
    border: 0;
}

.admin-list {
    margin-top: 30px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

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

th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

td {
    color: var(--text);
    font-size: 14px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: rgba(118, 118, 128, 0.1);
    color: #3a3a3c;
    font-size: 13px;
    font-weight: 650;
}

.is-hidden {
    display: none !important;
}

.ticket-layout {
    display: grid;
    gap: 26px;
}

.ticket-menu {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: rgba(118, 118, 128, 0.1);
}

.ticket-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.ticket-menu a.active {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.ticket-list {
    display: grid;
    gap: 12px;
}

.ticket-card {
    padding: 18px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.ticket-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.ticket-card-header > span:last-child,
.ticket-meta {
    color: var(--muted);
    font-size: 13px;
}

.ticket-card h3 {
    font-size: 18px;
    font-weight: 720;
}

.ticket-meta {
    margin: 2px 0 14px;
}

.ticket-state-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 14px;
}

.status-pill,
.priority-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(0, 113, 227, 0.1);
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.priority-pill {
    background: rgba(118, 118, 128, 0.12);
    color: #3a3a3c;
}

.status-uj {
    background: rgba(142, 142, 147, 0.14);
    color: #515154;
}

.status-atveve {
    background: rgba(0, 113, 227, 0.12);
    color: #005bb5;
}

.status-folyamatban {
    background: rgba(255, 149, 0, 0.14);
    color: #945200;
}

.status-kesz {
    background: rgba(52, 199, 89, 0.14);
    color: #1f7a34;
}

.status-elutasitva {
    background: rgba(255, 59, 48, 0.12);
    color: #d70015;
}

.priority-alacsony {
    background: rgba(52, 199, 89, 0.12);
    color: #1f7a34;
}

.priority-normal {
    background: rgba(0, 113, 227, 0.1);
    color: #005bb5;
}

.priority-magas {
    background: rgba(255, 149, 0, 0.14);
    color: #945200;
}

.priority-surgos {
    background: rgba(255, 59, 48, 0.12);
    color: #d70015;
}

.ticket-owner,
.ticket-ownership {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.ticket-ownership {
    display: grid;
    gap: 4px;
    margin: 0 0 14px;
}

.ticket-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.ticket-modal {
    position: fixed;
    inset: 0;
    width: min(680px, calc(100% - 28px));
    max-height: min(760px, calc(100vh - 32px));
    margin: auto;
    padding: 0;
    border: 1px solid var(--hairline);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.ticket-modal::backdrop {
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-content {
    display: grid;
    gap: 18px;
    padding: 0;
}

.modal-content h3 {
    font-size: 32px;
    font-weight: 740;
    line-height: 1.05;
}

.modal-close-form {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}

.modal-close-form button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: rgba(118, 118, 128, 0.12);
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.modal-hero {
    padding: 28px 28px 22px;
    background:
        linear-gradient(135deg, rgba(0, 113, 227, 0.12), rgba(52, 199, 89, 0.08)),
        rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--hairline);
}

.modal-hero .ticket-state-row {
    margin-bottom: 0;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 0 28px;
}

.modal-grid > div,
.modal-note {
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(118, 118, 128, 0.08);
}

.modal-grid > div {
    display: grid;
    gap: 3px;
    min-height: 92px;
    padding: 12px;
}

.modal-grid span,
.modal-note span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.modal-grid strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 15px;
}

.modal-grid small {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 12px;
}

.modal-note {
    display: grid;
    gap: 8px;
    margin: 0 28px;
    padding: 14px;
}

.modal-note p {
    color: #2c2c2e;
    font-size: 15px;
}

.status-form {
    display: grid;
    gap: 10px;
    margin: 0 28px 28px;
    padding-top: 2px;
}

.status-form label {
    font-size: 14px;
    font-weight: 650;
}

.status-form select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    outline: none;
    background: rgba(118, 118, 128, 0.1);
    color: var(--text);
}

.status-form .primary-action {
    justify-self: start;
    border: 0;
}

.ticket-content {
    width: min(1380px, calc(100% - 48px));
}

.ticket-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.ticket-title .form-success,
.ticket-title .form-error {
    max-width: 520px;
}

.ticket-shell {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.ticket-request-panel {
    position: sticky;
    top: 96px;
}

.ticket-request-form,
.ticket-kpis,
.ticket-toolbar {
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.ticket-request-form {
    padding: 18px;
}

.form-section-title h3 {
    margin-top: 3px;
    font-size: 22px;
    line-height: 1.15;
}

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

.ticket-workspace {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.ticket-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
}

.ticket-kpis > div {
    display: grid;
    gap: 5px;
    min-height: 86px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.54);
}

.ticket-kpis span,
.ticket-scope {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.ticket-kpis strong {
    font-size: 30px;
    line-height: 1;
}

.ticket-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px;
}

.ticket-toolbar .ticket-menu {
    margin: 0;
}

.ticket-menu button {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
}

.ticket-menu button.active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.ticket-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
    gap: 18px;
}

.ticket-plain-list {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.ticket-plain-item {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
}

.ticket-plain-item strong,
.ticket-plain-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ticket-plain-item span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.ticket-row-main,
.ticket-row-side {
    min-width: 0;
}

.ticket-row .post-content {
    display: -webkit-box;
    overflow: hidden;
    color: #2c2c2e;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.ticket-inline-details {
    margin-top: 14px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(118, 118, 128, 0.06);
}

.ticket-inline-details summary {
    min-height: 42px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ticket-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0 12px 12px;
}

.ticket-detail-grid > div,
.ticket-inline-note,
.ticket-inline-form {
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
}

.ticket-detail-grid > div {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 10px;
}

.ticket-detail-grid span,
.ticket-inline-note span,
.ticket-inline-form label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.ticket-detail-grid strong,
.ticket-detail-grid small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ticket-detail-grid small {
    color: var(--muted);
}

.ticket-inline-note,
.ticket-inline-form {
    display: grid;
    gap: 8px;
    margin: 0 12px 12px;
    padding: 12px;
}

.ticket-inline-form textarea,
.ticket-inline-form select,
.ticket-inline-form input[type="number"] {
    width: 100%;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    outline: none;
    background: rgba(118, 118, 128, 0.1);
    color: var(--text);
}

.ticket-inline-form textarea {
    min-height: 92px;
    padding: 11px 12px;
}

.ticket-inline-form select,
.ticket-inline-form input[type="number"] {
    height: 40px;
    padding: 0 11px;
}

.inline-control-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.inline-control-row select {
    flex: 1 1 220px;
}

.inline-control-row input[type="number"] {
    flex: 0 1 120px;
}

.ticket-row-side {
    display: grid;
    align-content: space-between;
    gap: 12px;
}

.compact-action {
    min-height: 36px;
    padding-inline: 13px;
    border: 0;
    font-size: 14px;
}

.complete-form .status-form {
    margin-top: 0;
}

.ticket-modal {
    overflow-y: auto;
}

.ticket-modal.is-open {
    display: block;
}

.status-form input,
.status-form textarea {
    width: 100%;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    outline: none;
    background: rgba(118, 118, 128, 0.1);
    color: var(--text);
}

.status-form input {
    height: 42px;
    padding: 0 12px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text);
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--blue);
}

.staff-tools {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.staff-import {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.staff-import label {
    width: 100%;
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
}

.staff-import input[type="file"] {
    max-width: 320px;
    padding: 9px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(118, 118, 128, 0.1);
    color: var(--muted);
}

.staff-table-section {
    margin-top: 22px;
}

.staff-table th,
.staff-table td {
    white-space: nowrap;
}

.staff-table a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

.staff-table a:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.pagination a {
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.pagination a.active {
    border-color: rgba(0, 113, 227, 0.34);
    background: var(--blue);
    color: #fff;
}

.payroll-list {
    display: grid;
    gap: 12px;
}

.payroll-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.payroll-card h3 {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 720;
}

.payroll-card p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.payroll-modal {
    position: fixed;
    inset: 0;
    width: min(980px, calc(100% - 28px));
    height: min(860px, calc(100vh - 32px));
    margin: auto;
    padding: 0;
    border: 1px solid var(--hairline);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.payroll-modal::backdrop {
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.payroll-modal-content {
    display: grid;
    grid-template-rows: auto 1fr;
    width: 100%;
    height: 100%;
}

.payroll-modal-content iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #f5f5f7;
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.notification-card:hover {
    border-color: rgba(0, 113, 227, 0.34);
    background: rgba(255, 255, 255, 0.94);
}

.notification-card h3 {
    font-size: 18px;
    font-weight: 720;
}

.notification-card p {
    margin-top: 4px;
    color: var(--text);
}

.notification-card small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.profile-container {
    max-width: 800px;
    margin: 32px auto;
    padding: 24px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.profile-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid var(--hairline);
}

.profile-detail:last-child {
    border-bottom: 0;
}

.profile-detail span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
}

.profile-detail strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 16px;
    text-align: right;
}

.profile-container header {
    margin-bottom: 20px;
    text-align: center;
}

.user-info {
    margin-bottom: 20px;
    color: var(--text);
    font-size: 18px;
}

.groups ul li {
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background-color: rgba(118, 118, 128, 0.08);
}

@media (max-width: 980px) {
    .sidebar {
        width: 238px;
    }

    .main-area {
        margin-left: 238px;
    }

    .top-bar {
        padding-inline: 22px;
    }
}

@media (max-width: 780px) {
    .dashboard {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--hairline);
    }

    .nav-menu ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
    }

    .sidebar-footer {
        margin-top: 0;
    }

    .main-area {
        margin-left: 0;
    }

    .top-bar {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .search-container {
        order: 2;
        width: 100%;
    }

    .top-right {
        width: 100%;
        justify-content: flex-end;
    }

    .content {
        width: min(100% - 28px, 720px);
        padding-top: 28px;
    }

    .welcome {
        align-items: flex-start;
        flex-direction: column;
        padding: 24px;
    }

    .welcome h2 {
        font-size: 38px;
    }

    .welcome p:not(.eyebrow) {
        font-size: 16px;
    }

    .primary-action {
        width: 100%;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-form,
    .admin-form .primary-action {
        width: 100%;
    }

    .profile-detail {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .profile-detail strong {
        text-align: left;
    }

    .modal-grid {
        grid-template-columns: 1fr;
        padding-inline: 18px;
    }

    .modal-hero {
        padding: 24px 18px 18px;
    }

    .modal-note,
    .status-form {
        margin-inline: 18px;
    }

    .status-form {
        margin-bottom: 18px;
    }

    .staff-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .staff-tools .primary-action,
    .staff-import .secondary-action,
    .staff-import input[type="file"] {
        width: 100%;
        max-width: none;
    }

    .payroll-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .payroll-card .ticket-actions,
    .payroll-card .secondary-action {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nav-menu ul,
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .profile-info {
        display: none;
    }

    .welcome h2 {
        font-size: 32px;
    }
}

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

    .ticket-request-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .ticket-title,
    .ticket-toolbar,
    .ticket-row {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

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

    .ticket-menu {
        width: 100%;
        overflow-x: auto;
    }

    .ticket-menu button {
        flex: 0 0 auto;
    }

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

    .ticket-actions,
    .ticket-actions form,
    .ticket-actions .primary-action,
    .ticket-actions .secondary-action {
        width: 100%;
    }
}
