/* Workstations admin screen — layout-specific styles. Tokens come from
   rksam-theme.css (--text-primary, --text-secondary, --text-tertiary, --a-500,
   --surface, --surface-hover, --border, --border-strong, --radius-md). */

.ws-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ws-toolbar input {
    width: 150px;
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    border: 0.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-primary);
}
.ws-toolbar input:focus { outline: none; border-color: var(--a-500); }
.ws-toolbar .ws-clear {
    color: var(--a-500);
    font-size: 12px;
    cursor: pointer;
    padding: 0 4px;
    user-select: none;
}
.ws-toolbar .ws-clear:hover { text-decoration: underline; }
.ws-toolbar .ws-spacer { flex: 1; }

.ws-body {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 12px;
    align-items: stretch;
    min-height: calc(100vh - 240px);
}

.ws-list {
    background: var(--surface-2, #f5f6f8);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 6px;
    overflow-y: auto;
    max-height: calc(100vh - 240px);
}
.ws-list-header {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 6px 8px;
    font-weight: 500;
    border-bottom: 0.5px solid var(--border);
    margin-bottom: 4px;
}

.ws-card {
    display: flex;
    gap: 8px;
    padding: 7px 8px;
    border-radius: var(--radius-md);
    margin-bottom: 2px;
    align-items: flex-start;
    cursor: pointer;
    transition: background 0.12s;
}
.ws-card:hover { background: rgba(0, 0, 0, 0.04); }
.ws-card.sel { background: #E6F1FB; }
.ws-card.sel:hover { background: #DCEBF8; }
.ws-card__icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: #639922;
    margin-top: 2px;
}
.ws-card__icon--inactive { color: var(--text-tertiary); }
.ws-card__body { flex: 1; min-width: 0; }
.ws-card__name {
    font-size: 12px;
    font-weight: 500;
    color: #185FA5;
    line-height: 1.3;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ws-card__chev {
    width: 10px;
    height: 10px;
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: transform 0.15s;
}
.ws-card.expanded .ws-card__chev { transform: rotate(180deg); }
.ws-card__rules {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-top: 2px;
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.ws-card__rules--dim {
    color: var(--text-tertiary);
    font-family: inherit;
}
.ws-card__rules-extra {
    color: var(--text-tertiary);
    font-family: inherit;
    margin-left: 4px;
    font-size: 11px;
}

.ws-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}
.ws-right__empty {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    flex: 1;
}
.ws-right__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.ws-right__head h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}
.ws-right__head .ws-edit-btn {
    background: transparent;
    border: 0.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 0 10px;
    height: 28px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ws-right__head .ws-edit-btn:hover { background: var(--surface-hover); }
.ws-right__head .ws-edit-btn svg { width: 12px; height: 12px; }

.ws-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 0.5px solid var(--border);
}
.ws-tab {
    padding: 7px 14px 8px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.ws-tab svg { width: 12px; height: 12px; flex-shrink: 0; }
.ws-tab:hover:not(.active) { color: var(--text-primary); }
.ws-tab.active {
    color: #185FA5;
    border-bottom-color: #185FA5;
    font-weight: 500;
}
.ws-tab .count {
    font-size: 11px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    margin-left: 2px;
}
.ws-tab.active .count { color: #185FA5; }

.ws-files {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.ws-files__head {
    display: grid;
    grid-template-columns: 1.3fr 1.3fr 0.85fr 0.7fr;
    padding: 7px 12px;
    background: #E6F1FB;
    font-size: 11px;
    font-weight: 500;
    color: #0C447C;
}
.ws-files__row {
    padding: 7px 12px;
    border-top: 0.5px solid var(--border);
}
.ws-files__row-top {
    display: grid;
    grid-template-columns: 1.3fr 1.3fr 0.85fr 0.7fr;
    align-items: center;
    font-size: 12px;
    color: var(--text-primary);
}
.ws-files__row-top .dur {
    color: #185FA5;
    font-variant-numeric: tabular-nums;
}
.ws-files__row-bot {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    color: var(--text-secondary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    word-break: break-all;
}
.ws-files__lupa {
    background: transparent;
    border: 0;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    display: inline-flex;
}
.ws-files__lupa:hover { color: var(--text-primary); }
.ws-files__empty {
    padding: 14px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
}

.ws-map {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
    min-height: 220px;
}
.ws-map__head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    margin-bottom: 8px;
}
.ws-map__head strong { font-weight: 500; color: var(--text-primary); }
.ws-map__points {
    color: #A32D2D;
    font-size: 11px;
    font-weight: 500;
    margin-left: auto;
}
.ws-map__canvas {
    flex: 1;
    min-height: 180px;
    border-radius: var(--radius-md);
    background: #f5f5f5;
    overflow: hidden;
}
.ws-map__canvas--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 12px;
}
