/* IT-Tickets — compact, aligned with Anträge / card+table patterns */

.it-shell {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.85rem 1rem 1rem;
}

.it-toolbar {
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
    align-items: center;
    flex-wrap: wrap;
}

.it-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.it-toolbar-actions .form-control,
.it-toolbar-actions .form-control-sm {
    width: auto;
    min-width: 0;
    max-width: 9.5rem;
    padding: 0.25rem 0.4rem;
    font-size: 0.85rem;
    height: auto;
}

.it-check {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
}

.it-school {
    font-size: 0.8rem;
}

.it-empty {
    padding: 0.75rem 0;
}

.it-table {
    margin: 0;
    font-size: 0.9rem;
}

.it-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted, #666);
    font-weight: 600;
    border-bottom-width: 1px;
    padding: 0.35rem 0.5rem;
    white-space: nowrap;
}

.it-table td {
    padding: 0.4rem 0.5rem;
    vertical-align: middle;
}

.it-row {
    cursor: pointer;
}

.it-row:hover td {
    background: var(--bg-hover, #f5f8fb);
}

.it-row--mine td {
    background: #f3f8fd;
}

.it-row--mine:hover td {
    background: #eaf2fa;
}

.it-row--mine td:first-child {
    box-shadow: inset 3px 0 0 var(--primary, #2a6bb5);
}

.it-num {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted, #555);
    white-space: nowrap;
}

.it-title-cell {
    font-weight: 500;
}

.it-mine {
    color: var(--primary, #2a6bb5);
    margin-right: 0.35rem;
    font-size: 0.65rem;
    vertical-align: middle;
}

.it-open-cell {
    text-align: right;
    white-space: nowrap;
}

.nowrap {
    white-space: nowrap;
}

.it-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    line-height: 1.3;
    white-space: nowrap;
}

.it-badge--open {
    background: #e8f0fe;
    color: #1a56a8;
}

.it-badge--progress {
    background: #fff4e5;
    color: #9a5b00;
}

.it-badge--done {
    background: #e6f6ea;
    color: #1b6b34;
}

/* Detail */

.it-detail-nav {
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
}

.it-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.it-detail-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem 0.6rem;
    margin-bottom: 0.15rem;
}

.it-detail-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    flex: 1 1 12rem;
}

.it-meta {
    margin: 0 0 0.45rem;
}

.it-desc {
    white-space: pre-wrap;
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.it-imgs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.35rem 0 0.5rem;
}

.it-img img {
    max-width: 120px;
    max-height: 90px;
    border-radius: 3px;
    border: 1px solid var(--border-color, #e5e5e5);
    object-fit: cover;
}

.it-lock,
.it-done-hint {
    margin: 0.35rem 0 0.5rem;
    color: #666;
}

.it-done-hint {
    color: #1b6b34;
}

.it-panel {
    margin: 0.5rem 0;
    padding: 0.65rem 0.7rem;
    background: var(--bg-muted, #f7f8fa);
    border-radius: 4px;
    border: 1px solid var(--border-color, #e8e8e8);
}

.it-panel.hidden {
    display: none;
}

.it-panel-title {
    margin: 0 0 0.45rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.it-panel .form-group {
    margin-bottom: 0.5rem;
}

.it-reply-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.it-reply-row .form-control {
    flex: 1 1 12rem;
    min-width: 0;
}

.it-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.85rem 0 0.35rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--border-color, #eee);
}

.it-section-head h3,
.it-section-head h4 {
    margin: 0;
    font-size: 0.95rem;
}

.it-form .form-group {
    margin-bottom: 0.65rem;
}

.it-actions {
    margin-top: 0.35rem;
}

/* History */

.it-history {
    margin-top: 0.85rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--border-color, #eee);
}

.it-history-title {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
}

.it-history--collapsible {
    margin-top: 0.75rem;
    padding-top: 0.45rem;
}

.it-history-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.25rem 0;
    border: none;
    background: transparent;
    color: var(--text-muted, #666);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.it-history-toggle:hover {
    color: var(--primary, #2a6bb5);
}

.it-history-chevron {
    font-size: 0.7rem;
    transition: transform 0.15s ease;
}

.it-history-toggle.is-open .it-history-chevron {
    transform: rotate(90deg);
}

.it-history-body {
    margin-top: 0.35rem;
}

.it-history-body.hidden {
    display: none;
}

.it-timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.it-ev {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.45rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
    font-size: 0.85rem;
    line-height: 1.35;
    align-items: start;
}

.it-ev:last-child {
    border-bottom: none;
}

.it-ev-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.12rem 0.35rem;
    border-radius: 3px;
    background: #eee;
    color: #555;
    text-align: center;
    margin-top: 0.1rem;
}

.it-ev--created .it-ev-tag { background: #e8f0fe; color: #1a56a8; }
.it-ev--status .it-ev-tag { background: #fff4e5; color: #9a5b00; }
.it-ev--comment .it-ev-tag { background: #eef6ee; color: #2d6a3e; }
.it-ev--reopen .it-ev-tag { background: #f0e9f8; color: #5b3d8a; }
.it-ev--updated .it-ev-tag { background: #f0f0f0; color: #555; }

.it-ev-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: baseline;
    margin-bottom: 0.1rem;
}

.it-ev-meta .text-muted {
    font-size: 0.8rem;
}

.it-ev-body,
.it-ev-main {
    white-space: pre-wrap;
}

/* Processor action block */

.it-action {
    margin-top: 0.85rem;
    padding: 0.75rem 0.8rem;
    border: 1px solid var(--border-color, #dde3ea);
    border-radius: 4px;
    background: #f8fafc;
}

.it-action-head h4 {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
}

.it-action-head p {
    margin: 0 0 0.65rem;
}

.it-action-step {
    display: grid;
    grid-template-columns: 1.5rem 1fr;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
    align-items: start;
}

.it-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--primary, #2a6bb5);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.1rem;
}

.it-step-label {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.it-status-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.it-choice {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    padding: 0.3rem 0.55rem;
    border: 1px solid var(--border-color, #d0d7de);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
}

.it-choice:has(input:checked) {
    border-color: var(--primary, #2a6bb5);
    background: #eef4fb;
    font-weight: 600;
}

.it-choice input {
    margin: 0;
}

.it-file {
    margin-top: 0.4rem;
    max-width: 100%;
}

.it-action-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--border-color, #e5e8ec);
}

.it-action-summary {
    margin: 0;
    flex: 1;
    min-width: 12rem;
}

/* Dashboard widget */

.it-dash-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.it-dash-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    text-align: left;
    padding: 0.35rem 0;
    border: none;
    border-bottom: 1px solid var(--border-color, #eee);
    background: transparent;
    cursor: pointer;
}

.it-dash-list li:last-child .it-dash-item {
    border-bottom: none;
}

.it-dash-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .it-shell {
        padding: 0.65rem 0.7rem;
    }

    .it-open-cell {
        display: none;
    }

    .it-ev {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}
