:root {
    --ink: #172626;
    --muted: #617070;
    --primary: #006767;
    --primary-dark: #004c4c;
    --accent: #b8892f;
    --accent-soft: #f7f1e4;
    --surface: #ffffff;
    --canvas: #f3f6f5;
    --line: #d9e3e1;
    --success: #176b45;
    --success-bg: #e9f8f0;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
}

.brand-panel {
    min-height: 100vh;
    padding: 56px clamp(32px, 6vw, 96px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background: url('../images/login-background-tic-v4.jpg') center center / cover no-repeat;
    position: relative;
    overflow: hidden;
}

.brand-panel::after {
    content: "";
    position: absolute;
    inset: 24px;
    border: 1px solid rgba(184, 137, 47, 0.58);
    pointer-events: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    font-size: 18px;
    font-weight: 800;
}

.brand:hover {
    text-decoration: none;
}

.login-brand {
    width: min(100%, 290px);
    margin: 0;
    padding: 0;
    display: block;
    position: relative;
    z-index: 1;
}

.login-brand img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(1) brightness(0) invert(1);
}

.login-brand:hover {
    opacity: 0.9;
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #173582;
    background: #fff;
    font-size: 14px;
    letter-spacing: 0.08em;
}

.brand-panel h1 {
    max-width: 560px;
    margin: 12px 0 20px;
    font-size: clamp(32px, 3.25vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.035em;
    font-weight: 430;
}

.brand-copy {
    max-width: 540px;
    color: #d9e8e6;
    font-size: 18px;
    line-height: 1.65;
}

.security-note {
    color: #aec7c4;
    font-size: 13px;
}

.tic-signature {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.tic-signature img {
    width: 92px;
    height: auto;
    display: block;
    filter: brightness(0) saturate(100%) invert(80%) sepia(11%) saturate(488%) hue-rotate(123deg) brightness(91%) contrast(88%);
    opacity: 0.62;
}

.tic-signature span {
    font-size: 10px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    opacity: 0.62;
}

.form-panel {
    padding: 48px 24px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #eef4f2, #fbfcfc);
    position: relative;
}

.form-card {
    width: min(100%, 480px);
    padding: clamp(34px, 5vw, 56px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 30px 80px rgba(0, 58, 58, 0.10);
}

.login-companies {
    width: min(78%, 620px);
    position: absolute;
    left: 50%;
    bottom: 69px;
    transform: translateX(-50%);
    padding: 0;
    background: transparent;
}

.login-companies img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.76;
    filter: brightness(0) saturate(100%) invert(27%) sepia(33%) saturate(1900%) hue-rotate(132deg) brightness(82%) contrast(101%);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.form-card h2 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -0.03em;
    font-weight: 520;
}

.form-intro {
    margin: 12px 0 28px;
    color: var(--muted);
    line-height: 1.6;
}

.form-card > .eyebrow {
    font-size: 15px;
    letter-spacing: 0.16em;
}

.form-card > .form-intro {
    margin-top: 14px;
}

.form-row a {
    font-weight: 400;
}

.login-submit {
    min-height: 50px;
    display: grid;
    place-items: center;
}

.login-submit svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-stack {
    display: grid;
    gap: 18px;
}

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

.form-stack label {
    display: grid;
    gap: 8px;
    font-size: 14px;
    font-weight: 750;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #c8d0de;
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 103, 103, 0.12);
}

button {
    padding: 14px 18px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

button:hover {
    background: var(--primary-dark);
}

.form-row,
.user-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.checkbox {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    font-weight: 500 !important;
}

.checkbox input {
    width: auto;
}

.field-help {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.field-error {
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
}

.form-footer {
    margin: 24px 0 0;
    color: var(--muted);
    text-align: center;
}

.alert {
    margin-bottom: 22px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-success {
    color: var(--success);
    background: var(--success-bg);
}

.ticket-session-alert {
    margin-bottom: 22px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-left: 4px solid var(--accent);
    color: #7a3f00;
    background: var(--accent-soft);
}

.ticket-session-alert strong,
.ticket-session-alert span {
    display: block;
}

.ticket-session-alert > div {
    min-width: 0;
}

.ticket-session-alert span {
    margin-top: 3px;
    color: #80502b;
    font-size: 13px;
}

.live-comment-alert-list {
    margin-top: 8px;
    display: grid;
    gap: 8px;
}

.live-comment-alert-item {
    padding: 8px 10px;
    display: block;
    border-left: 3px solid var(--accent);
    color: inherit;
    background: rgba(255, 255, 255, 0.58);
}

.live-comment-alert-item:hover {
    background: rgba(255, 255, 255, 0.86);
    text-decoration: none;
}

.live-comment-alert-item strong {
    color: #7a3f00;
    font-size: 13px;
}

.live-comment-alert-item span {
    color: #80502b;
}

.ticket-session-alert form {
    margin: 0;
}

.ticket-session-alert button {
    padding: 10px 12px;
    background: var(--accent);
    font-size: 13px;
}

.ticket-session-alert .primary-action {
    padding: 10px 12px;
    background: var(--accent);
    font-size: 13px;
}

.ticket-session-alert button:hover,
.ticket-session-alert .primary-action:hover {
    background: #d85f0d;
}

.secondary-form {
    margin-top: 12px;
    text-align: center;
}

.button-link {
    padding: 0;
    color: var(--primary);
    background: transparent;
}

.button-link:hover {
    color: var(--primary-dark);
    background: transparent;
    text-decoration: underline;
}

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

.topbar-actions form {
    margin: 0;
}

.icon-button {
    width: 42px;
    height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    background: #fff;
}

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

.icon-button:hover,
.icon-button.is-active {
    border-color: rgba(237, 112, 22, 0.45);
    color: var(--accent);
    background: var(--accent-soft);
    text-decoration: none;
}

.dashboard-body {
    min-height: 100vh;
}

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

.sidebar {
    min-height: 100vh;
    padding: 28px 20px 22px;
    display: flex;
    flex-direction: column;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(70, 170, 160, .14), transparent 26%),
        linear-gradient(180deg, #064949, #012f2f);
}

.sidebar-brand {
    width: min(100%, 220px);
    margin: 0 auto 28px;
    padding: 6px 8px 18px;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    background: transparent;
}

.sidebar-brand img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(1) brightness(0) invert(1);
}

.sidebar-brand-context {
    display: block;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.sidebar-brand-context strong {
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.01em;
}

.sidebar-brand-context small {
    margin-top: 2px;
    color: #9fc5c1;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-label {
    margin: 8px 12px 10px;
    color: #91b9b5;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-link {
    padding: 12px 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    color: #d3e4e2;
    font-size: 14px;
    font-weight: 450;
}

.sidebar-submenu {
    min-width: 0;
}

.sidebar-submenu summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.sidebar-submenu summary::-webkit-details-marker {
    display: none;
}

.sidebar-submenu-toggle {
    width: 100%;
}

.sidebar-submenu-toggle > span:nth-child(2) {
    flex: 1;
}

.submenu-chevron {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 160ms ease;
}

.sidebar-submenu[open] .submenu-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu-list {
    margin: 5px 0 4px 19px;
    padding: 4px 0 4px 13px;
    display: grid;
    gap: 3px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar-submenu-link {
    min-width: 0;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    color: #c1d8d5;
    font-size: 13px;
    font-weight: 400;
}

.sidebar-submenu-link .sidebar-icon {
    width: 25px;
}

.sidebar-submenu-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    text-decoration: none;
}

.sidebar-submenu-empty {
    padding: 9px 10px;
    color: #91b9b5;
    font-size: 12px;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    text-decoration: none;
}

.sidebar-link.is-active {
    color: #fff;
    background: var(--primary);
    box-shadow: inset 4px 0 0 var(--accent);
}

.sidebar-icon {
    width: 32px;
    color: inherit;
    line-height: 1;
    text-align: center;
}

.sidebar-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.sidebar-user {
    margin-top: auto;
    padding: 18px 8px 0;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-weight: 800;
}

.sidebar-user strong,
.sidebar-user span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user strong {
    font-size: 13px;
    font-weight: 500;
}

.sidebar-user div > span {
    margin-top: 3px;
    color: #91b9b5;
    font-size: 11px;
}

.app-content {
    min-width: 0;
}

.topbar {
    min-height: 82px;
    padding: 16px clamp(24px, 4vw, 56px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.topbar-date {
    margin: 0;
}

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

.topbar-heading strong {
    display: block;
    color: var(--ink);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.topbar-title-icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    background: #eefaff;
    color: var(--primary);
}

.topbar-title-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topbar-date {
    color: var(--muted);
    font-size: 12px;
    text-transform: capitalize;
}

.brand-dark {
    color: var(--ink);
}

.brand-dark .brand-mark {
    color: #fff;
    background: var(--primary);
}

.user-menu {
    font-size: 14px;
    font-weight: 700;
}

.dashboard {
    width: min(1480px, calc(100% - 28px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

.dashboard > h1,
.page-heading h1 {
    display: none;
}

.dashboard > h1 {
    margin: 0;
    font-size: clamp(30px, 4.1vw, 48px);
    letter-spacing: -0.045em;
}

.dashboard-intro {
    max-width: 980px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.page-heading .dashboard-intro {
    white-space: nowrap;
}

.dashboard-grid {
    margin-top: 48px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.dashboard-card {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(0, 60, 60, 0.035);
}

.dashboard-card-link {
    color: var(--ink);
    font-weight: 400;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.dashboard-card-link:hover {
    border-color: rgba(0, 103, 103, 0.48);
    box-shadow: 0 18px 42px rgba(0, 69, 69, 0.11);
    transform: translateY(-3px);
    text-decoration: none;
}

.dashboard-card h2 {
    margin: 28px 0 8px;
    font-weight: 500;
}

.dashboard-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
}

.dashboard-card-title .sidebar-icon {
    width: 30px;
    height: 30px;
    color: var(--primary);
    background: #e8f3f1;
}

.dashboard-card p {
    color: var(--muted);
    line-height: 1.6;
}

.card-number {
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
}

.coming-soon {
    display: inline-block;
    margin-top: 14px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #51607b;
    background: #eef2f8;
    font-size: 12px;
    font-weight: 800;
}

.card-action {
    display: inline-block;
    margin-top: 14px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
}

.dashboard .eyebrow {
    font-weight: 500;
}

.empty-state {
    margin-top: 42px;
    padding: 70px 30px;
    border: 1px dashed #bcc7da;
    border-radius: 18px;
    background: #fff;
    text-align: center;
}

.empty-state-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--primary-dark);
    background: #e7f7fc;
    font-size: 28px;
}

.empty-state h2 {
    margin: 0 0 8px;
}

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

.profile-card {
    max-width: 680px;
    margin-top: 42px;
    padding: clamp(26px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(51, 51, 51, 0.07);
}

.user-form-card {
    margin-top: 42px;
}

.user-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.7fr);
    gap: 22px;
    align-items: start;
}

.user-form-panel {
    padding: clamp(24px, 3vw, 34px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(51, 51, 51, 0.07);
}

.user-form-panel h2 {
    margin: 0 0 8px;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.panel-help {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.user-form-actions {
    grid-column: 1 / -1;
}

.profile-actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(30px, 4.1vw, 48px);
    letter-spacing: -0.045em;
}

.primary-action {
    padding: 12px 16px;
    border-radius: 10px;
    color: #fff;
    background: var(--primary);
    font-weight: 850;
    white-space: nowrap;
}

.primary-action:hover {
    color: #fff;
    background: var(--primary-dark);
    text-decoration: none;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-actions-with-filter {
    align-items: end;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.secondary-action {
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
    font-weight: 850;
    white-space: nowrap;
}

.secondary-action:hover {
    border-color: rgba(237, 112, 22, 0.45);
    color: var(--accent);
    background: var(--accent-soft);
    text-decoration: none;
}

.table-card {
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(51, 51, 51, 0.07);
    overflow: hidden;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    min-width: 1240px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: #fff;
    background: var(--accent);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.data-table td {
    color: var(--ink);
    font-size: 13px;
}

.data-table td strong,
.data-table td span {
    display: block;
}

.data-table td span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.status-pill,
.module-tags span {
    width: fit-content;
    padding: 4px 7px;
    border-radius: 999px;
    color: #3c4a50 !important;
    background: #eef3f5;
    font-size: 12px !important;
    font-weight: 800;
}

.module-icon-tag {
    width: 28px !important;
    height: 28px;
    padding: 0 !important;
    display: grid !important;
    place-items: center;
}

.module-icon-tag svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.status-pill.is-success {
    color: #176b45 !important;
    background: #e9f8f0;
}

.status-pill.is-danger {
    color: #b42318 !important;
    background: #feeceb;
}

.module-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.table-actions form {
    margin: 0;
}

.table-action {
    width: 30px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: #fff;
}

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

.table-action:hover {
    border-color: rgba(24, 172, 225, 0.45);
    color: var(--primary-dark);
    background: #e7f7fc;
    text-decoration: none;
}

.table-action.is-danger:hover {
    border-color: rgba(180, 35, 24, 0.35);
    color: var(--danger);
    background: #feeceb;
}

.status-switch {
    width: 42px;
    height: 22px;
    padding: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.status-switch span {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #94a3b8;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .22);
    transform: translateX(0);
    transition: transform .18s ease, background .18s ease;
}

.status-switch.is-active {
    border-color: color-mix(in srgb, var(--primary) 45%, #fff);
    background: color-mix(in srgb, var(--primary) 8%, #fff);
}

.status-switch.is-active span {
    background: var(--primary);
    transform: translateX(18px);
}

.status-switch:not(.is-disabled):hover {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.status-switch.is-disabled {
    cursor: not-allowed;
    opacity: .55;
}

.company-selector-card {
    width: min(620px, 100%);
    margin: 44px auto;
    padding: 34px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--accent);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 18px 45px rgba(23, 38, 38, .09);
}

.company-selector-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
}

.company-selector-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.company-selector-heading span { color: var(--accent); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.company-selector-heading h1 { margin: 6px 0 8px; font-size: 28px; font-weight: 500; }
.company-selector-heading p { margin: 0 0 26px; color: var(--muted); line-height: 1.55; }

.company-options {
    margin: 0;
    padding: 0;
    border: 0;
}

.company-options legend {
    margin-bottom: 9px;
    color: var(--text);
    font-size: 14px;
    font-weight: 750;
}

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

.company-option {
    position: relative;
    display: block !important;
    cursor: pointer;
}

.company-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.company-option-content {
    min-height: 78px;
    padding: 15px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfd;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}

.company-option:hover .company-option-content {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    transform: translateY(-1px);
}

.company-option input:focus-visible + .company-option-content {
    outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
    outline-offset: 2px;
}

.company-option input:checked + .company-option-content {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent);
}

.company-option-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--surface);
    color: var(--accent);
    font-size: 16px;
    font-weight: 850;
    box-shadow: inset 0 0 0 1px var(--line);
}

.company-option-content strong {
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.company-option-check {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: transparent;
}

.company-option-check svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
}

.company-option input:checked + .company-option-content .company-option-check {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.company-launch-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.company-launch-form {
    display: flex;
}

.company-launch-card {
    width: 100%;
    min-height: 185px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    color: var(--ink);
    background: #fff;
    text-align: left;
}

.company-launch-card:hover {
    color: var(--ink);
    background: #fff;
}

.company-launch-card:focus-visible {
    outline: 3px solid rgba(0, 103, 103, .2);
    outline-offset: 3px;
}

.company-launch-title {
    width: 100%;
    margin: 22px 0 0;
    align-items: center;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
}

.company-launch-title .sidebar-icon {
    flex: 0 0 auto;
}

.company-launch-logo {
    width: 105px;
    height: 68px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    margin-inline: auto;
}

.company-launch-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(27%) sepia(33%) saturate(1900%) hue-rotate(132deg) brightness(82%) contrast(101%);
}

@media (max-width: 1280px) {
    .company-launch-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.empty-table {
    padding: 24px !important;
    color: var(--muted) !important;
    text-align: center !important;
}

.module-access-fieldset {
    margin: 8px 0 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.module-access-fieldset legend {
    padding: 0 8px;
    font-weight: 850;
}

.module-access-fieldset p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 14px;
}

.module-access-grid {
    display: grid;
    gap: 8px;
}

.module-access-option {
    padding: 12px 14px;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfd;
    cursor: pointer;
}

.module-access-option input {
    width: auto;
    margin-top: 2px;
}

.module-access-option strong,
.module-access-option small {
    display: block;
}

.metrics-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
}

.metrics-grid article {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(51, 51, 51, 0.06);
}

.metrics-grid strong {
    display: block;
    font-size: 32px;
    line-height: 1;
}

.metrics-grid span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.metric-alt {
    border-color: rgba(244, 126, 32, 0.5) !important;
    background: #fff4ec !important;
}

.metric-alt strong {
    color: #d65f00;
}

.metric-breakdown {
    grid-column: span 2;
}

.metric-breakdown > span {
    margin-top: 0;
}

.metric-breakdown-list {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}

.metric-breakdown-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(244, 126, 32, 0.16);
}

.metric-breakdown-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.metric-breakdown-list em {
    color: var(--ink);
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
}

.metric-breakdown-list strong {
    font-size: 18px;
}

.filter-bar {
    margin-top: 0;
    display: flex;
    align-items: end;
    gap: 16px;
}

.filter-bar label {
    display: grid;
    gap: 6px;
    min-width: 220px;
    font-size: 13px;
    font-weight: 800;
}

.compact-filter label {
    min-width: 170px;
}

.compact-filter select {
    padding: 11px 12px;
}

.tickets-table {
    min-width: 1180px;
}

.categories-table {
    min-width: 980px;
}

.categories-table td {
    position: relative;
    padding-right: 76px;
}

.pagination-wrap {
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.pagination-wrap > div {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.pagination-link,
.pagination-status {
    padding: 8px 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 850;
}

.pagination-link:hover {
    border-color: rgba(24, 172, 225, 0.5);
    color: var(--primary);
    text-decoration: none;
}

.pagination-link.is-disabled {
    color: var(--muted);
    opacity: 0.55;
}

.pagination-status {
    color: var(--muted);
    background: #f7f9fb;
}

.category-row-form {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.2fr) 180px auto;
    gap: 12px;
    align-items: center;
}

.category-row-form input {
    padding: 10px 12px;
}

.category-row-form .table-action,
.category-delete-form .table-action {
    border-radius: 9px;
}

.category-status {
    margin: 0;
}

.category-delete-form {
    position: absolute;
    right: 18px;
    margin-top: -34px;
}

.tickets-table tr[draggable="true"] {
    cursor: grab;
}

.tickets-table tr.is-dragging {
    opacity: 0.58;
    cursor: grabbing;
    background: var(--accent-soft);
}

.drag-help {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
}

.drag-priority {
    width: fit-content;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    color: var(--ink) !important;
    font-weight: 850;
}

.drag-priority svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--accent);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.inline-priority-form {
    display: flex;
    gap: 6px;
}

.inline-priority-form input {
    width: 76px;
    padding: 8px;
}

.inline-priority-form button {
    padding: 8px 10px;
    font-size: 12px;
}

.status-open {
    color: #176b45 !important;
    background: #e9f8f0;
}

.status-pending {
    color: #9a4f00 !important;
    background: #fff1e7;
}

.status-closed {
    color: #4b5563 !important;
    background: #eef3f5;
}

.ticket-form-card {
    max-width: 820px;
}

.ticket-detail-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
    gap: 22px;
    align-items: start;
}

.ticket-summary-card,
.ticket-comments-card {
    padding: clamp(20px, 2.4vw, 28px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(51, 51, 51, 0.07);
}

.ticket-summary-card h2,
.ticket-comments-card h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.ticket-summary-card dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    margin: 0;
}

.ticket-summary-card dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.ticket-summary-card dd {
    margin: 0;
}

.ticket-management-form {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.comment-form {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.comment-form textarea {
    min-height: 72px;
    padding: 9px 11px;
}

.comment-form button {
    width: fit-content;
    padding: 9px 12px;
    font-size: 13px;
}

.field-help,
.category-description-help,
.comment-file-field {
    color: var(--muted);
    font-size: 12px;
}

.category-description-help {
    padding: 9px 10px;
    border-left: 3px solid var(--primary);
    background: #eefaff;
    line-height: 1.45;
}

.comment-file-field {
    display: grid;
    gap: 5px;
}

.comment-list {
    display: grid;
    gap: 7px;
}

.comment-item {
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfd;
}

.comment-item strong,
.comment-item span {
    display: block;
}

.comment-item span {
    margin-top: 1px;
    color: var(--muted);
    font-size: 11px;
}

.comment-item p {
    margin: 5px 0 0;
    font-size: 13px;
    line-height: 1.35;
}

.attachment-block {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.attachment-block > strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}

.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.attachment-list.compact {
    margin-top: 7px;
}

.attachment-link {
    padding: 5px 8px;
    border: 1px solid rgba(24, 172, 225, 0.25);
    background: #eefaff;
    color: #075f85;
    font-size: 12px;
    font-weight: 800;
}

.module-access-option small {
    margin-top: 3px;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.4;
}

.report-shell {
    display: grid;
    gap: 22px;
}

.report-header {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid var(--line);
    background: #fff;
}

.report-header h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -0.035em;
}

.report-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.report-header img {
    width: 170px;
    max-width: 34%;
}

.report-filters {
    padding: 14px;
    display: flex;
    align-items: end;
    gap: 12px;
    border: 1px solid var(--line);
    background: #fff;
}

.report-filters label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.report-filters input {
    min-width: 170px;
    padding: 10px 12px;
}

.report-filters button {
    padding: 11px 14px;
}

.report-metrics {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 10px;
}

.report-metrics article,
.report-card {
    border: 1px solid var(--line);
    background: #fff;
}

.report-metrics article {
    padding: 14px;
}

.report-metrics strong {
    display: block;
    font-size: 26px;
}

.report-metrics span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.report-metric-alt {
    border-color: rgba(244, 126, 32, 0.5) !important;
    background: #fff4ec !important;
}

.report-metric-alt strong {
    color: #d65f00;
}

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

.report-card {
    padding: 16px;
}

.report-card h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.status-chart,
.ranking-chart {
    display: grid;
    gap: 10px;
}

.status-chart div,
.ranking-chart div {
    display: grid;
    grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr) 54px;
    align-items: center;
    gap: 10px;
}

.status-chart span,
.ranking-chart span {
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
}

.status-chart strong,
.ranking-chart strong {
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.status-chart i,
.ranking-chart i {
    height: 14px;
    display: block;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.bar-chart {
    min-height: 180px;
    display: flex;
    align-items: end;
    gap: 9px;
    overflow-x: auto;
}

.bar-chart div {
    min-width: 42px;
    display: grid;
    justify-items: center;
    gap: 5px;
}

.bar-chart i {
    width: 24px;
    display: block;
    background: linear-gradient(180deg, var(--accent), var(--primary));
}

.bar-chart span,
.bar-chart strong {
    font-size: 11px;
}

.bar-chart span {
    color: var(--muted);
}

.report-detail-card {
    padding: 0;
    overflow: hidden;
}

.report-detail-card h2 {
    margin: 0;
    padding: 14px 16px;
}

.report-table {
    min-width: 1320px;
}

.report-table td {
    vertical-align: top;
}

.report-table td span {
    max-width: 360px;
    white-space: normal;
}

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

.catalog-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.catalog-create-form,
.catalog-row-form,
.catalog-item {
    display: grid;
    align-items: center;
    gap: 10px;
}

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

.catalog-list {
    display: grid;
    gap: 8px;
}

.catalog-item {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px;
    border: 1px solid var(--line);
    background: #fbfcfd;
}

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

.catalog-create-form input,
.catalog-row-form input {
    padding: 10px 12px;
}

.company-admin-create {
    margin: 28px 0 18px;
    padding: 20px;
}

.company-admin-create-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
    align-items: end;
    gap: 12px;
}

.company-admin-create-form label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 750;
}

.company-admin-edit {
    min-width: 260px;
    display: grid;
    gap: 8px;
}

.company-admin-edit input {
    padding: 9px 11px;
}

.company-admin-table form {
    margin: 0;
}

.company-admin-table > tbody > tr > td:nth-child(3) input,
.company-admin-table > tbody > tr > td:nth-child(4) input {
    min-width: 145px;
    padding: 9px 11px;
}

.company-admin-logo,
.company-admin-logo-placeholder {
    width: 54px;
    height: 42px;
    object-fit: contain;
    display: grid;
    place-items: center;
    background: #fff;
}

.company-admin-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.company-logo-upload {
    cursor: pointer;
}

.company-logo-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.company-transfer-dialog {
    width: min(520px, calc(100% - 32px));
    padding: 28px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(0, 40, 40, .2);
}

.company-transfer-dialog::backdrop {
    background: rgba(15, 30, 30, .55);
}

.company-transfer-dialog h2 {
    margin: 0 0 10px;
}

.company-transfer-dialog p {
    color: var(--muted);
    line-height: 1.55;
}

.company-transfer-dialog label {
    display: grid;
    gap: 7px;
    font-size: 14px;
    font-weight: 750;
}

.company-transfer-dialog .profile-actions {
    margin-top: 22px;
}

.danger-action {
    background: var(--danger);
}

.danger-action:hover {
    background: #8f1c13;
}

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

    .brand-panel {
        min-height: auto;
        padding: 30px 24px;
        gap: 42px;
    }

    .brand-panel h1 {
        font-size: 40px;
    }

    .security-note {
        display: none;
    }

    .form-panel {
        padding: 24px 16px 48px;
    }

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

    .company-options-grid {
        grid-template-columns: 1fr;
    }

    .company-selector-card {
        margin: 20px auto;
        padding: 24px 18px;
    }

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

    .page-heading .dashboard-intro {
        white-space: normal;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        min-height: auto;
        padding: 18px 16px;
    }

    .sidebar-brand {
        padding: 0 4px 16px;
    }

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

    .sidebar-label,
    .sidebar-user {
        display: none;
    }

    .sidebar-link {
        padding: 11px;
    }

    .topbar-date {
        display: none;
    }

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

    .metrics-grid,
    .ticket-detail-grid {
        grid-template-columns: 1fr;
    }

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

    .ticket-session-alert {
        align-items: stretch;
        flex-direction: column;
    }

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

    .category-delete-form {
        position: static;
        margin-top: 10px;
    }

    .report-header,
    .report-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-grid,
    .report-metrics,
    .report-grid {
        grid-template-columns: 1fr;
    }

    .catalog-create-form,
    .catalog-row-form,
    .catalog-item {
        grid-template-columns: 1fr;
    }

    .company-admin-create-form {
        grid-template-columns: 1fr;
    }
}

*,
*::before,
*::after {
    border-radius: 0 !important;
}

@media print {
    body {
        background: #fff;
    }

    .sidebar,
    .topbar,
    .report-no-print,
    .ticket-session-alert {
        display: none !important;
    }

    .app-shell,
    .app-content {
        display: block;
    }

    .dashboard {
        width: 100%;
        padding: 0;
    }

    .report-shell {
        gap: 12px;
    }

    .report-header,
    .report-card,
    .report-metrics article {
        box-shadow: none;
        break-inside: avoid;
    }

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

    .report-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .table-wrap {
        overflow: visible;
    }

    .report-table {
        min-width: 0;
        font-size: 10px;
    }

    .report-table th,
    .report-table td {
        padding: 5px;
    }

    a {
        color: inherit;
        text-decoration: none;
    }
}

.application-admin-create-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 12px;
    align-items: end;
}

.application-description-field {
    grid-column: span 3;
}

.application-admin-table input {
    min-width: 120px;
}

.application-admin-table td:nth-child(4) input {
    min-width: 280px;
}

@media (max-width: 900px) {
    .application-admin-create-form {
        grid-template-columns: 1fr;
    }

    .application-description-field {
        grid-column: auto;
    }
}
