﻿:root {
    --bg-app: #f4f6fc;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-on-dark: #f8fafc;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --success: #10b981;
    --success-hover: #059669;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fef2f2;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
    --radius: 12px;
    --font-sans: 'Inter', 'Noto Sans KR', sans-serif;
    --font-brand: 'Outfit', 'Inter', sans-serif;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}
.app-container {
    display: flex;
    min-height: 100vh;
}
.app-sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--text-on-dark);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.brand-logo {
    font-size: 24px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
}
.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.brand-title {
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
    color: white;
}
.brand-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
    min-height: 2.7em;
    max-height: 2.7em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    word-break: keep-all;
}
.sidebar-nav {
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}
.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}
.nav-item.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.nav-item-icon {
    font-size: 1.1em;
    line-height: 1;
    flex-shrink: 0;
    width: 1.35em;
    text-align: center;
}
.nav-item-label {
    flex: 1;
    min-width: 0;
}
.nav-menu-settings-icon {
    margin-right: 4px;
}
.nav-user {
    margin-top: auto;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}
.nav-user span {
    color: #cbd5e1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}
.nav-btn-logout {
    color: var(--danger);
    text-decoration: none;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}
.nav-btn-logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
}
.app-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    max-width: calc(100% - 260px);
}
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.page-title {
    font-family: var(--font-brand);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}
.current-time {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.app-footer {
    margin-top: auto;
    padding-top: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
}
.card:hover {
    box-shadow: var(--shadow-lg);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
}
.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.card-actions {
    display: flex;
    gap: 8px;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 4px solid var(--border);
}
.stat-card.total-assets { border-left-color: var(--primary); }
.stat-card.storage-assets { border-left-color: var(--success); }
.stat-card.active-loans { border-left-color: var(--warning); }
.stat-card.overdue-returns { border-left-color: var(--danger); }
a.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
a.stat-card-link:hover .stat-card {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.dashboard-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.dashboard-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}
.dashboard-type-card:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
    transform: translateY(-2px);
}
.dashboard-type-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}
.dashboard-type-count {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-brand);
}
.dashboard-type-unit {
    font-size: 11px;
    color: var(--text-muted);
}
.dashboard-bundle-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.dashboard-bundle-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-card);
    text-decoration: none;
    color: inherit;
    font-size: 11px;
    line-height: 1.2;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.dashboard-bundle-chip:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}
.dashboard-bundle-icon {
    font-size: 12px;
    line-height: 1;
}
.dashboard-bundle-name {
    font-weight: 600;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-bundle-count {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 5px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
}
.kdn-log-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: none;
}
.kdn-log-header h3 {
    margin: 0;
}
.kdn-log-header p {
    margin: 4px 0 0;
}
.kdn-log-toolbar {
    padding: 16px 20px;
    background: var(--bg-app);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.kdn-log-toolbar-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.kdn-log-filter-grid {
    display: grid;
    grid-template-columns: 148px 148px minmax(180px, 1fr) 148px auto;
    gap: 12px 14px;
    align-items: end;
}
.kdn-log-filter-grid--timeline {
    grid-template-columns: 148px 148px minmax(180px, 1fr) auto;
}
.kdn-log-filter-grid--tx-completed {
    display: grid;
    grid-template-columns: minmax(128px, 1fr) minmax(128px, 1fr) minmax(180px, 2.2fr) minmax(140px, auto);
    width: 100%;
    gap: 12px 14px;
    align-items: end;
}
.tx-completed-filter-bar {
    padding: 12px 16px;
    background: var(--bg-app);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
}
.tx-completed-filter-bar.kdn-log-toolbar-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}
.tx-completed-filter-row2 {
    width: 100%;
    justify-content: flex-start;
    gap: 12px 16px;
}
.tx-completed-quick-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 28px;
    flex: 1 1 auto;
    min-width: 0;
}
.tx-completed-type-btns,
.tx-completed-quick-filters .kdn-date-quick-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.tx-completed-filter-label {
    min-width: 52px;
    font-weight: 600;
    white-space: nowrap;
}
.tx-completed-type-btns .tx-completed-type-btn {
    min-width: 52px;
    height: 28px;
    padding: 0 10px;
}
.tx-completed-filter-bar .completed-count-label {
    margin-left: auto;
    flex-shrink: 0;
}
.kdn-log-filter-grid--tx-completed .kdn-log-toolbar-actions {
    width: 100%;
    justify-content: stretch;
    gap: 8px;
}
.kdn-log-filter-grid--tx-completed .kdn-log-toolbar-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 10px;
}
.tx-completed-pagination {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
}
.kdn-log-field {
    margin: 0;
    min-width: 0;
}
.kdn-log-field-grow {
    grid-column: auto;
}
.kdn-log-field label.small-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}
.kdn-log-field input,
.kdn-log-field select {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 13px;
    background-color: var(--bg-card);
    color: var(--text-primary);
}
.kdn-log-toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    height: 34px;
    padding-bottom: 0;
}
.kdn-log-toolbar-actions .btn {
    min-width: 64px;
    height: 34px;
    padding: 0 14px;
}
.kdn-log-filter-row2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}
.kdn-list-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}
.kdn-list-title-row h3 {
    margin: 0;
}
.asset-list-mode-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 2px;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.asset-list-mode-toggle .btn {
    margin: 0;
    border-radius: 6px;
    min-width: 72px;
}
.task-filter-row2 {
    justify-content: flex-start;
    gap: 10px 18px;
    align-items: center;
}
.task-toolbar .task-sub-filters-compact {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    gap: 4px;
}
.task-toolbar .task-sub-filters-compact .btn-sub-filter {
    padding: 3px 9px;
    font-size: 11px;
}
.task-filter-row2 .task-filter-inline-group {
    gap: 6px;
}
.kdn-log-check-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
    user-select: none;
    white-space: nowrap;
}
.kdn-date-quick-btns {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.kdn-date-quick-btns .btn-xs {
    min-width: 52px;
    height: 28px;
    padding: 0 10px;
}
.kdn-log-header-extra {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.kdn-log-header-extra > span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}
.kdn-log-cleanup-select {
    width: auto;
    min-width: 118px;
    height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 13px;
    line-height: normal;
    background-color: var(--bg-card);
    color: var(--text-primary);
    vertical-align: middle;
}
.kdn-log-header-extra .btn {
    height: 34px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.kdn-log-table-wrap,
.kdn-log-page .timeline-wrapper {
    max-height: 70vh;
    min-height: 70vh;
    overflow-y: auto;
    border-top: 1px solid var(--border);
}
.kdn-log-page .timeline-wrapper {
    padding: 12px 20px 20px;
}
.kdn-log-page .timeline-item {
    margin-bottom: 12px;
}
.kdn-log-page .timeline-msg {
    font-size: 13px;
    line-height: 1.45;
}
.kdn-log-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}
.kdn-log-pagination-bar #log_total_count,
.kdn-log-pagination-bar #timeline_total_count {
    font-size: 13px;
    color: var(--text-secondary);
}
.kdn-log-pagination-bar #log_pagination,
.kdn-log-pagination-bar #timeline_pagination,
.kdn-log-pagination-bar #completed_pagination {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
@media (max-width: 960px) {
    .kdn-log-filter-grid,
    .kdn-log-filter-grid--timeline,
    .kdn-log-filter-grid--tx-completed {
        grid-template-columns: 1fr 1fr;
    }
    .kdn-log-field-grow {
        grid-column: 1 / -1;
    }
    .kdn-log-toolbar-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}
@media (max-width: 560px) {
    .kdn-log-filter-grid,
    .kdn-log-filter-grid--timeline,
    .kdn-log-filter-grid--tx-completed {
        grid-template-columns: 1fr;
    }
}
.stat-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-app);
    border-radius: 50px;
}
.stat-content {
    display: flex;
    flex-direction: column;
}
.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}
.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-brand);
}
.stat-value.danger {
    color: var(--danger);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.dashboard-layouts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
@media(max-width: 1024px) {
    .dashboard-layouts {
        grid-template-columns: 1fr;
    }
}
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.overdue-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.overdue-item {
    background-color: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.overdue-title {
    font-weight: 600;
    color: var(--danger-hover);
    display: flex;
    justify-content: space-between;
}
.overdue-meta {
    font-size: 12px;
    color: var(--text-secondary);
}
.table-wrap {
    overflow-x: auto;
    margin-top: 10px;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}
.table th, .table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table th {
    background-color: #f8fafc;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table tr:hover td {
    background-color: #f8fafc;
}
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.small { font-size: 12px; line-height: 1.45; }
.small.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 700; }
.mr-1 { margin-right: 4px; }
.ml-auto { margin-left: auto; }
.text-ellipsis {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.small-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}
.input-xs {
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--bg-card);
    color: var(--text-primary);
    line-height: normal;
}
.date-value {
    font-family: Consolas, "Cascadia Mono", monospace;
    font-size: 13px;
    white-space: nowrap;
}
.date-label-inline {
    font-family: inherit;
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 6px;
}
.date-text {
    font-family: Consolas, "Cascadia Mono", monospace;
    color: var(--text-primary);
}
.date-empty {
    font-family: var(--font-sans);
    color: var(--text-muted);
}
.table-empty-cell {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}
.link-asset-no {
    font-weight: 600;
    text-decoration: none;
    color: var(--primary);
}
.link-asset-no.mono {
    font-family: Consolas, "Cascadia Mono", monospace;
}
.mono { font-family: Consolas, "Cascadia Mono", var(--font-sans), monospace; }
.data-code,
.data-id,
.data-number,
.data-path {
    font-family: Consolas, "Cascadia Mono", var(--font-sans), monospace;
}
.data-code,
.data-id {
    font-size: 13px;
    font-weight: 600;
}
.data-number {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.data-path {
    font-size: 11px;
    color: var(--text-secondary);
    word-break: break-all;
}
.data-message {
    font-size: 13px;
    font-weight: 500;
    word-break: break-all;
}
.data-text {
    color: var(--text-primary);
}
.cell-middle {
    vertical-align: middle;
}
.cell-nowrap {
    white-space: nowrap;
}
.table-actions {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
.kdn-mac, .kdn-ip {
    font-weight: 600;
}
.kdn-mac.mono, .kdn-ip.mono {
    font-family: Consolas, "Cascadia Mono", var(--font-sans), monospace;
}
.kdn-net-empty {
    font-weight: 500;
    font-family: var(--font-sans);
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    gap: 6px;
    min-height: 38px;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-success { background-color: var(--success); color: white; }
.btn-success:hover { background-color: var(--success-hover); }
.btn-info { background-color: #0ea5e9; color: white; }
.btn-info:hover { background-color: #0284c7; }
.btn-secondary { background-color: white; border-color: var(--border); color: var(--text-primary); }
.btn-secondary:hover { background-color: var(--bg-app); }
.btn-danger { background-color: var(--danger); color: white; }
.btn-danger:hover { background-color: var(--danger-hover); }
.btn-warning { background-color: #f59e0b; color: white; }
.btn-warning:hover { background-color: #d97706; }
.btn:disabled,
.btn.is-disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}
.btn-block { width: 100%; display: flex; }
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 30px;
}
.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
    min-height: 24px;
    border-radius: 4px;
}
.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}
.kdn-header-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.kdn-header-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.badge-info { background-color: var(--primary-light); color: var(--primary); }
.badge-success { background-color: var(--success-light); color: var(--success); }
.badge-warning { background-color: var(--warning-light); color: #d97706; }
.badge-danger { background-color: var(--danger-light); color: var(--danger); }
.badge-secondary { background-color: #f1f5f9; color: var(--text-secondary); }
.badge-type { background-color: #f3e8ff; color: #7e22ce; }

/* --- Status cards & sub-filters (assets, tasks, etc.) --- */
.status-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    margin: 16px 0 24px;
}
a.status-card {
    text-decoration: none;
    color: inherit;
}
.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06);
}
.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
}
.status-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}
.status-card.active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}
.status-card-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.status-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.status-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 2px;
    line-height: 1;
}
.status-card-unit {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 2px;
}
.status-card.task-card-open::before { background: #3b82f6; }
.status-card.task-card-urgent::before { background: #ef4444; }
.status-card.task-card-overdue::before { background: #f59e0b; }
.status-card.task-card-done::before { background: #22c55e; }
.sub-filter-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.btn-sub-filter {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    line-height: 1.4;
}
.btn-sub-filter:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.btn-sub-filter.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}
.btn-sub-filter.task-priority-filter-high.active,
.btn-sub-filter.task-priority-filter-high:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
}
.btn-sub-filter.task-priority-filter-high.active {
    background: #f59e0b;
    color: #fff;
}
.btn-sub-filter.task-priority-filter-urgent.active,
.btn-sub-filter.task-priority-filter-urgent:hover {
    border-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}
.btn-sub-filter.task-priority-filter-urgent.active {
    background: #ef4444;
    color: #fff;
}
.btn-sub-filter.task-priority-filter-low.active,
.btn-sub-filter.task-priority-filter-low:hover {
    border-color: #64748b;
    background: #f8fafc;
    color: #334155;
}
.btn-sub-filter.task-priority-filter-low.active {
    background: #64748b;
    color: #fff;
}

/* --- Task list --- */
.kdn-log-filter-grid--tasks {
    grid-template-columns: 148px 148px minmax(180px, 1fr) auto;
}
.task-toolbar {
    margin-bottom: 0;
}
.task-filter-inline-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    width: 100%;
}
.task-filter-inline-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}
.task-filter-inline-group .sub-filter-container {
    margin: 0;
}
.task-filter-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.task-inline-form .form-group {
    margin-bottom: 0;
}
.task-inline-form {
    display: grid;
    grid-template-columns: 130px 150px 150px minmax(240px, 1fr) 110px auto;
    gap: 8px;
    align-items: end;
    padding: 0 16px 16px;
}
.task-inline-form .task-form-submit {
    min-height: 38px;
    align-self: end;
    white-space: nowrap;
}
.task-inline-form input,
.task-inline-form select {
    min-height: 38px;
}
.task-list-table {
    table-layout: fixed;
}
.task-list-table th,
.task-list-table td {
    vertical-align: middle;
}
.task-list-row {
    border-left: 4px solid #38bdf8;
}
.task-list-row.task-priority-low { border-left-color: #94a3b8; }
.task-list-row.task-priority-high { border-left-color: #f59e0b; }
.task-list-row.task-priority-urgent { border-left-color: #ef4444; }
.task-list-row.task-priority-normal { border-left-color: #38bdf8; }
.task-list-row.is-completed {
    opacity: 0.82;
    background: #f8fafc;
}
.task-info-col {
    min-width: 0;
}
.task-line-primary,
.task-line-secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 13px;
    line-height: 1.45;
}
.task-line-primary {
    font-weight: 500;
    color: var(--text-primary);
}
.task-line-primary.task-content-complete {
    color: var(--text-muted);
    text-decoration: line-through;
}
.task-line-secondary {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}
.task-date-short {
    font-family: Consolas, "Cascadia Mono", monospace;
    font-size: 12px;
    color: var(--text-secondary);
}
.task-assignee {
    font-weight: 600;
}
.task-summary {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}
.task-meta-sep {
    color: var(--text-muted);
    margin: 0 2px;
}
.task-field-label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    margin-right: 4px;
}
.task-priority-chip {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}
.task-priority-chip-normal { background: #e0f2fe; color: #0369a1; }
.task-priority-chip-low { background: #f1f5f9; color: #475569; }
.task-priority-chip-high { background: #fef3c7; color: #92400e; }
.task-priority-chip-urgent { background: #fee2e2; color: #991b1b; }
.task-id-muted {
    color: var(--text-muted);
    font-size: 11px;
}
.task-actions-col {
    white-space: nowrap;
    width: 168px;
    vertical-align: middle;
}
.task-status-col {
    vertical-align: middle;
}
.task-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}
.task-actions form {
    margin: 0;
    display: inline-flex;
}
.task-edit-row td {
    padding: 10px 12px 14px;
    background: #f8fafc;
    border-top: none;
}
.task-row-form {
    display: grid;
    grid-template-columns: 118px 120px 120px minmax(180px, 1fr) 96px auto;
    gap: 6px;
    align-items: center;
}
.task-row-form input,
.task-row-form select {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
}
.task-report-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ===== Task Responsive: Tablet (≤960px) ===== */
@media (max-width: 960px) {
    .kdn-log-filter-grid--tasks {
        grid-template-columns: 1fr 1fr;
    }
    .kdn-log-filter-grid--tasks .kdn-log-field-grow {
        grid-column: 1 / -1;
    }
    .kdn-log-filter-grid--tasks .kdn-log-toolbar-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
    .task-inline-form {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .task-inline-form .form-group:nth-child(4) {
        grid-column: 1 / -1;
    }
    .task-inline-form .task-form-submit {
        grid-column: 1 / -1;
    }
    .task-row-form {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .task-row-form input[name="taskContent"] {
        grid-column: 1 / -1;
    }
    .task-row-form button {
        grid-column: 1 / -1;
    }
}

/* ===== Task Responsive: Mobile (≤768px — iPhone landscape + small tablets) ===== */
@media (max-width: 768px) {
    .task-inline-form {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 0 12px 14px;
    }
    .task-inline-form .form-group:nth-child(4) {
        grid-column: 1 / -1;
    }
    .task-inline-form .task-form-submit {
        grid-column: 1 / -1;
        min-height: 44px;
    }

    .task-row-form {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .task-row-form input[name="taskContent"] {
        grid-column: 1 / -1;
    }
    .task-row-form button {
        grid-column: 1 / -1;
        min-height: 42px;
    }

    /* 테이블을 카드형 레이아웃으로 전환 */
    .task-list-table {
        table-layout: auto;
    }
    .task-list-table thead {
        display: none;
    }
    .task-list-table tbody {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .task-list-row {
        display: grid;
        grid-template-areas:
            "checkbox status actions"
            "info info info";
        grid-template-columns: auto auto 1fr;
        align-items: center;
        background: var(--bg-card, #fff);
        border: 1px solid var(--border, #e2e8f0);
        border-left: 4px solid #38bdf8;
        border-radius: 10px;
        padding: 12px;
        gap: 8px 12px;
    }
    .task-list-row.task-priority-low { border-left-color: #94a3b8; }
    .task-list-row.task-priority-high { border-left-color: #f59e0b; }
    .task-list-row.task-priority-urgent { border-left-color: #ef4444; }
    .task-list-row.task-priority-normal { border-left-color: #38bdf8; }
    .task-list-row td {
        display: block;
        padding: 0;
        border: none;
    }
    .task-list-row .col-checkbox {
        grid-area: checkbox;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .task-info-col {
        grid-area: info;
        padding-right: 0;
    }
    .task-line-primary {
        font-size: 14px;
        line-height: 1.5;
    }
    .task-line-secondary {
        font-size: 12px;
    }
    .task-status-col {
        grid-area: status;
        display: flex;
        align-items: center;
        padding-bottom: 0;
    }
    .task-actions-col {
        grid-area: actions;
        display: flex;
        justify-content: flex-end;
        width: auto;
        white-space: nowrap;
    }
    .task-actions {
        display: inline-flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 4px;
        justify-content: flex-end;
        align-items: center;
        width: 100%;
    }
    .task-actions .btn {
        min-height: 28px;
        height: 28px;
        padding: 0 8px;
        font-size: 11px;
        font-weight: 600;
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        border-radius: 6px;
    }

    /* 인라인 수정 행도 카드형으로 전환 */
    .task-edit-row {
        display: block;
        background: #f8fafc;
        border: 1px solid var(--border, #e2e8f0);
        border-radius: 10px;
        margin-top: -4px;
    }
    .task-edit-row td {
        display: block;
        padding: 12px;
    }
    .task-row-form {
        grid-template-columns: 1fr;
    }

    /* 필터 바 강화 */
    .task-filter-row2 {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .task-filter-inline-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .task-toolbar .task-sub-filters-compact {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        gap: 6px;
        padding-bottom: 4px;
    }
    .task-toolbar .task-sub-filters-compact .btn-sub-filter {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 6px 12px;
        font-size: 12px;
    }

    /* 리포트 버튼 */
    .task-report-actions {
        width: 100%;
        justify-content: stretch;
    }
    .task-report-actions .btn {
        flex: 1;
        min-height: 40px;
        text-align: center;
    }

    /* 상태 카드 */
    .task-status-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
    }
    .task-status-cards .status-card {
        padding: 12px 14px;
    }
    .task-status-cards .status-card-value {
        font-size: 20px;
    }

    /* 검색 필터 그리드 */
    .kdn-log-filter-grid--tasks {
        grid-template-columns: 1fr;
    }
}

/* ===== Task Responsive: Small Phone (≤480px — iPhone SE / compact) ===== */
@media (max-width: 480px) {
    .task-inline-form {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 10px 12px;
    }
    .task-inline-form .form-group:nth-child(4) {
        grid-column: auto;
    }
    .task-inline-form .task-form-submit {
        grid-column: auto;
    }
    .task-inline-form input,
    .task-inline-form select {
        min-height: 44px;
        font-size: 16px; /* iOS에서 자동 줌 방지 */
    }

    .task-list-row {
        padding: 10px;
    }
    .task-line-primary {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .task-summary {
        width: 100%;
    }
    .task-actions {
        flex-direction: column;
    }
    .task-actions .btn {
        width: 100%;
    }

    .task-status-cards {
        grid-template-columns: 1fr !important;
    }

    .task-report-actions {
        flex-direction: column;
    }

    /* 빠른 기간 버튼 영역 */
    .kdn-date-quick-btns {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }
    .kdn-date-quick-btns .btn-xs {
        flex: 0 0 auto;
        min-height: 34px;
    }
}

/* ===== Task touch device enhancements ===== */
@media (hover: none) and (pointer: coarse) {
    .task-actions .btn {
        min-height: 40px;
        padding: 8px 14px;
    }
    .task-report-actions .btn {
        min-height: 42px;
    }
    .task-toolbar .task-sub-filters-compact .btn-sub-filter {
        min-height: 36px;
        padding: 6px 12px;
    }
    .task-list-row .col-checkbox input[type="checkbox"] {
        min-width: 22px;
        min-height: 22px;
    }
    #task-select-all {
        min-width: 22px;
        min-height: 22px;
    }
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
}
.required { color: var(--danger); }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: white;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.help-text {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.lifecycle-info-card {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 12px 14px;
    background: var(--surface-muted, #f8fafc);
}
.lifecycle-stored-line {
    font-size: 14px;
    margin-bottom: 6px;
}
.lifecycle-stored-set strong {
    color: var(--primary, #2563eb);
}
.lifecycle-stored-default strong {
    color: var(--primary, #2563eb);
}
.lifecycle-default-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #1d4ed8;
    background: #dbeafe;
    border: 1px solid #93c5fd;
}
.lifecycle-stored-unset {
    color: var(--text-secondary, #64748b);
}
.lifecycle-unset-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fcd34d;
}
.lifecycle-view-tag {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
}
.lifecycle-manual-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 6px;
    font-size: 13px;
    cursor: pointer;
}
.lifecycle-manual-input {
    width: 100%;
    max-width: 120px;
    padding: 8px 10px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
}
.lifecycle-manual-input:disabled {
    background: #f1f5f9;
    color: var(--text-secondary, #64748b);
}
.lifecycle-new-card .lifecycle-default-line {
    margin: 0 0 4px;
    font-size: 14px;
}
.lifecycle-edit-actions {
    margin-top: 10px;
}
.lifecycle-type-default-line {
    margin-top: 0;
    margin-bottom: 0;
}
.lifecycle-unset-hint,
.lifecycle-change-note {
    margin-top: 8px;
    margin-bottom: 0;
}
.lifecycle-change-note {
    color: var(--primary, #2563eb);
}
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media(max-width: 768px) {
    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr;
    }
}
.form-section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary-light);
    color: var(--primary);
}
.toolbar {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}
.filter-group {
    flex-grow: 1;
    min-width: 180px;
}
.filter-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}
.filter-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.asset-profile-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
@media(max-width: 1024px) {
    .asset-profile-grid {
        grid-template-columns: 1fr;
    }
}
.info-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.info-item {
    background-color: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}
.info-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.info-val {
    font-weight: 600;
    color: var(--text-primary);
}
.info-val.mono {
    font-family: Consolas, monospace;
}
.note-box {
    background-color: #fafafa;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    min-height: 60px;
}
.timeline-wrapper {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 8px;
}
.timeline {
    list-style: none;
    position: relative;
    padding-left: 20px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background-color: var(--border);
}
.timeline-item {
    position: relative;
    margin-bottom: 16px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 10px;
    background-color: var(--primary);
    border: 2px solid white;
}
.timeline-item.audit::before {
    background-color: var(--warning);
}
.timeline-item.network::before {
    background-color: #64748b;
}
.timeline-item.consumable::before {
    background-color: #0d9488;
}
.timeline-meta {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
}
.timeline-msg {
    font-weight: 500;
    margin-top: 2px;
}
.timeline-actor {
    font-size: 11px;
    color: var(--text-muted);
}
.timeline-diff {
    font-size: 11px;
    background-color: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
    font-family: monospace;
}
.qr-display-area {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#qrcode img, #qrcode canvas {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    background-color: white;
}
.qr-hint {
    margin-top: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 14px;
}
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-card {
    background-color: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    padding: 24px;
    animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
}
.login-card {
    background-color: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.login-header {
    text-align: center;
    margin-bottom: 30px;
}
.login-logo {
    font-size: 32px;
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}
.login-desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}
.input-icon-wrapper {
    position: relative;
}
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-secondary);
}
.input-icon-wrapper input {
    padding-left: 40px;
}
.msg {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
}
.msg-danger { background-color: var(--danger-light); color: var(--danger-hover); border: 1px solid rgba(239, 68, 68, 0.2); }
.msg-success { background-color: var(--success-light); color: var(--success-hover); border: 1px solid rgba(16, 185, 129, 0.2); }
.msg-warning { background-color: var(--warning-light); color: #b45309; border: 1px solid rgba(245, 158, 11, 0.2); }

/* --- Bulk / filter toolbars --- */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--primary-light);
    padding: 10px 16px;
    border-radius: 8px;
    margin: 12px 20px;
    border: 1px solid var(--border);
}
.bulk-actions-bar .bulk-actions-label {
    font-weight: 700;
    color: var(--primary);
    font-size: 13px;
}
.bulk-date-group,
#bulk-end-date-container,
#bulk-start-date-container,
#bulk-asset-date-container {
    display: none;
    align-items: center;
    gap: 6px;
}
.bulk-date-group.is-visible,
#bulk-end-date-container[style*="flex"],
#bulk-start-date-container[style*="flex"],
#bulk-asset-date-container[style*="flex"] {
    display: flex;
}
.bulk-date-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}
.bulk-use-asset-panel {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.bulk-use-asset-panel.is-active {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}
.bulk-use-asset-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}
.bulk-use-asset-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary);
}
.bulk-use-asset-toggle-text {
    line-height: 1.4;
}
.bulk-use-asset-hint {
    display: none;
    margin: 8px 0 0 24px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
}
.bulk-use-asset-panel.is-active .bulk-use-asset-hint {
    display: block;
}
#bulk-trans-fields input:disabled {
    background-color: var(--bg-app);
    color: var(--text-muted);
    cursor: not-allowed;
}
.bulk-edit-modal-wide {
    max-width: 560px;
}
.bulk-edit-hint {
    margin: 0 0 16px;
}
.bulk-edit-picker-wrap {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}
.bulk-edit-picker-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.bulk-edit-field-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.bulk-edit-field-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 11px;
    line-height: 1.2;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.bulk-edit-field-chip:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}
.bulk-edit-field-chip.is-on {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}
.bulk-edit-field-chip input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary);
}
.bulk-edit-field-template {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}
.bulk-edit-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.bulk-edit-row-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 0;
}
.bulk-edit-row-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary);
}
.bulk-edit-field-rows .form-group input:not([type="checkbox"]),
.bulk-edit-field-rows .form-group select {
    margin-top: 4px;
}
.bulk-edit-value-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bulk-edit-value-wrap select,
.bulk-edit-value-wrap input:not([type="checkbox"]) {
    width: 100%;
}
.bulk-edit-manual-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.bulk-edit-manual-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}
.bulk-edit-manual-toggle:has(input:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}
.bulk-edit-manual-input {
    width: 100%;
}
#bulk-edit-fields input:disabled,
#bulk-edit-fields select:disabled {
    background-color: var(--bg-app);
    color: var(--text-muted);
    cursor: not-allowed;
}
.btn-bulk-show-all-status {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: normal;
    color: var(--primary);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}
.bulk-date-input,
#bulk-actual-end-date,
#bulk-actual-start-date,
#bulk-asset-actual-end-date {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    width: 130px;
    height: 32px;
    line-height: normal;
}
.tx-filter-bar {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background-color: #f8fafc;
}
.tx-bulk-bar {
    padding: 12px 16px;
    background: var(--bg-app);
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.tx-completed-filter-bar:not(.kdn-log-toolbar-form) {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.filter-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 250px;
}
.filter-inline-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}
.filter-inline-input {
    flex: 1;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    min-height: 34px;
}
.filter-inline-select {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    min-height: 34px;
}
.filter-inline-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.completed-count-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: auto;
    font-weight: 500;
}
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-header-borderless {
    border-bottom: none;
}

/* --- Table columns (transactions / network / assets) --- */
.table .col-checkbox,
#device-list-table .col-checkbox,
#active-tx-table .col-checkbox {
    width: 40px;
    text-align: center;
}
.col-asset-no { white-space: nowrap; }
.col-asset-name { min-width: 100px; }
.col-tx-type { white-space: nowrap; }
.col-dates { font-size: 13px; white-space: nowrap; }
.col-dates.date-value { font-family: Consolas, "Cascadia Mono", monospace; }
.col-dept-contact { font-size: 13px; }
.col-status { white-space: nowrap; }
.col-purpose { max-width: 140px; }
.col-vm-name { font-weight: 500; }
.col-broker-url { font-size: 11px; color: var(--text-muted); }
.device-row-checkbox,
.tx-checkbox,
.common-item-cb {
    cursor: pointer;
}
.ind-tx-form {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.ind-tx-form.is-inline {
    display: inline;
}
.ind-tx-form .ind-tx-date {
    padding: 2px 4px;
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    width: 115px;
    height: 28px;
    line-height: normal;
}
.btn-tx-gap { margin-right: 4px; }
.tx-action-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.tx-action-group .ind-tx-form {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.tx-action-group .tx-action-out .ind-tx-date {
    width: 108px;
}
#active-tx-table th:last-child,
#active-tx-table td.table-actions {
    min-width: 340px;
    white-space: nowrap;
}
#active-tx-table td.table-actions .tx-action-group,
#active-tx-table td.table-actions .ind-tx-form,
#active-tx-table td.table-actions button,
#active-tx-table td.table-actions input[type="date"] {
    flex: 0 0 auto;
}
.btn-tx-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}
.btn-tx-loan {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}
.btn-tx-loan:hover { background: #bbf7d0; }
.btn-tx-out {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}
.btn-tx-out:hover { background: #fde68a; }
.btn-tx-cancel {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}
.btn-tx-cancel:hover { background: #fecaca; }

/* --- Forms --- */
.transaction-crud-form .form-group { margin-bottom: 12px; }
.asset-crud-form { width: 100%; }
.asset-crud-form .form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* --- Settings --- */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
.settings-add-form {
    margin-bottom: 20px;
    background-color: var(--bg-app);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.form-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) auto;
    gap: 8px;
    align-items: end;
}
.form-row-grid select,
.form-row-grid input {
    width: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 13px;
    background-color: var(--bg-card);
    color: var(--text-primary);
    min-height: 34px;
    line-height: normal;
}
.mapping-row { background-color: var(--primary-light); }
.mapping-container { padding: 12px 16px; }
.mapping-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

/* --- User permission matrix (settings) — see also Get-KdnUserPermissionMatrixStyleBlock --- */
.kdn-user-matrix-wrap {
    max-height: min(70vh, 520px);
    overflow: auto;
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    -webkit-overflow-scrolling: touch;
}
.table.kdn-user-matrix {
    width: max-content;
    min-width: 100%;
    margin-bottom: 0;
    font-size: 12px;
    border-collapse: separate;
    border-spacing: 0;
}
.table.kdn-user-matrix th,
.table.kdn-user-matrix td {
    padding: 6px 4px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
.table.kdn-user-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f1f5f9;
    text-align: center;
    font-size: 11px;
    white-space: nowrap;
}
.table.kdn-user-matrix .sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-card);
    box-shadow: 2px 0 6px rgba(15, 23, 42, 0.08);
    min-width: 96px;
    max-width: 140px;
    white-space: nowrap;
    text-align: left;
    padding-left: 10px !important;
}
.table.kdn-user-matrix thead th.sticky-col {
    z-index: 5;
    background: #f1f5f9;
}
.table.kdn-user-matrix tbody tr:nth-child(even) td {
    background-color: #fafbfc;
}
.table.kdn-user-matrix tbody tr:nth-child(even) td.sticky-col {
    background-color: #fafbfc;
}
.table.kdn-user-matrix .kdn-flag-col,
.table.kdn-user-matrix .kdn-flag-cell {
    width: 42px;
    min-width: 42px;
    text-align: center;
}
.table.kdn-user-matrix .kdn-perm-col {
    min-width: 48px;
    max-width: 56px;
}
.table.kdn-user-matrix .kdn-perm-rw-hint {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    font-weight: 500;
    color: var(--text-muted);
}
.table.kdn-user-matrix .kdn-perm-cell {
    text-align: center;
}
.table.kdn-user-matrix .kdn-rw-pair {
    display: inline-flex;
    gap: 2px;
    padding: 2px 3px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid var(--border);
}
.table.kdn-user-matrix .kdn-rw-pair label {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 1px 2px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
}
.table.kdn-user-matrix .kdn-rw-pair input[type="checkbox"] {
    margin: 0;
    width: 14px;
    height: 14px;
}
.table.kdn-user-matrix .kdn-pwd-col {
    min-width: 118px;
}
.table.kdn-user-matrix .kdn-matrix-pwd {
    width: 100%;
    min-width: 104px;
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 11px;
    background: var(--bg-card);
    color: var(--text-primary);
}
.kdn-user-matrix-legend {
    font-size: 12px;
    margin: 0 0 10px;
    color: var(--text-muted);
}
.mapping-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    padding: 4px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: background 0.2s;
}
.mapping-item:hover { background: var(--primary-light); }
.mapping-item input[type="checkbox"] { cursor: pointer; }
.form-row-grid select:focus,
.form-row-grid input:focus {
    border-color: var(--primary);
    outline: none;
}
.settings-page-pad { padding: 20px; }
.badge-map-count {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background-color: var(--primary);
    color: white;
    margin-left: 6px;
}

/* --- Stock / consumables --- */
.stock-bar {
    background: var(--border);
    border-radius: 4px;
    height: 8px;
    position: relative;
    overflow: hidden;
}
.stock-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .3s;
}
.stock-bar-fill.ok { background: var(--success); }
.stock-bar-fill.warn { background: #f59e0b; }
.stock-bar-fill.danger { background: var(--danger); }

/* --- QR / IP pick --- */
.ip-pick-layout { min-height: 200px; }

/* --- CSV help / compact tables --- */
.csv-help-panel {
    background-color: var(--bg-app);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.6;
}
.table.csv-spec-table {
    font-size: 11px;
    margin-bottom: 12px;
}
.table.csv-spec-table th,
.table.csv-spec-table td {
    padding: 6px;
}
.table.csv-spec-table thead th {
    background: rgba(0, 0, 0, 0.03);
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
}
.table.csv-spec-table tbody tr {
    border-bottom: 1px solid var(--border-light);
}

/* --- Print report tables (consumables) --- */
.meta-table,
.items-table {
    width: 100%;
    border-collapse: collapse;
}
.meta-table th,
.meta-table td,
.items-table th,
.items-table td {
    border: 1px solid #333;
    padding: 8px;
    font-size: 13px;
}
.meta-table th,
.items-table th {
    background-color: #f2f2f2;
}
.meta-table th { width: 15%; text-align: left; }
.meta-table td { width: 35%; }

.transaction-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
@media(max-width: 1024px) {
    .transaction-layout {
        grid-template-columns: 1fr;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
}
.actions-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}
.device-list-card {
    padding: 0;
    overflow: hidden;
}
.device-list-header {
    padding: 16px 18px 0;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-app), var(--bg-card));
}
.device-list-header h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    color: var(--text-primary);
}
.device-list-header p {
    margin: 0 0 14px;
    color: var(--text-secondary);
}
.device-list-layout {
    display: flex;
    gap: 0;
    align-items: stretch;
    min-height: 280px;
}
.device-subnet-tree {
    flex: 0 0 240px;
    background: #f8fafc;
    border-right: 1px solid var(--border);
    padding: 14px 12px;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.tree-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.tree-hint {
    margin: 0 0 12px;
    color: var(--text-muted);
}
.subnet-tree-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.subnet-tree-list li {
    margin: 0 0 6px;
}
.subnet-node {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    min-height: 44px;
    position: relative;
    padding-left: 28px;
    transition: all 0.15s ease;
}
.subnet-node::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}
.subnet-node.has-free::before {
    background: var(--success);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.subnet-node:hover {
    border-color: #93c5fd;
    background: #f0f9ff;
}
.subnet-node.active {
    border-color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
    color: var(--primary);
}
.subnet-node.active::before {
    background: var(--primary);
}
.subnet-node.has-free.active::before {
    background: var(--success);
}
.subnet-node-label {
    font-weight: 600;
    line-height: 1.3;
}
.subnet-node-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.3;
}
.device-list-main {
    flex: 1;
    min-width: 0;
    padding: 14px 16px 16px;
}
.device-toolbar {
    background: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.device-search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
}
.device-search-input {
    flex: 1;
    min-width: 0;
    max-width: none!important;
    margin: 0;
}
.device-search-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.device-search-status {
    margin: 10px 0 0;
    color: var(--text-secondary);
}
.device-table-wrap {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: auto;
    max-height: calc(100vh - 280px);
    -webkit-overflow-scrolling: touch;
}
#device-list-table {
    margin: 0;
    font-size: 13px;
    min-width: 520px;
}
#device-list-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}
#device-list-table thead th {
    box-shadow: 0 1px 0 var(--border);
}
#device-list-table tbody tr:nth-child(even) {
    background: #fafbfc;
}
#device-list-table tbody tr:hover {
    background: #f0f9ff;
}
#device-list-table .col-id {
    white-space: normal;
    max-width: 72px;
    line-height: 1.25;
}
.device-id-two {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.device-id-line {
    display: block;
    font-size: 11px;
    word-break: break-all;
}
#device-list-table .col-mac, #device-list-table .col-ip, #device-list-table .col-serial {
    white-space: nowrap;
}
#device-list-table .col-serial {
    font-family: Consolas, "Cascadia Mono", monospace;
    font-size: 12px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    position: relative;
}
.table th.sortable:hover {
    background: #e0e7ff;
}
.table th.sortable::after {
    content: '↕';
    display: inline-block;
    margin-left: 4px;
    opacity: .35;
    font-size: 10px;
    line-height: 1;
    vertical-align: middle;
}
.table th.sortable.sort-asc,
.table th.sortable.sort-desc {
    color: var(--primary);
}
.table th.sortable.sort-asc::after {
    content: '▲';
    opacity: .95;
}
.table th.sortable.sort-desc::after {
    content: '▼';
    opacity: .95;
}
#device-list-table .col-created {
    white-space: nowrap;
    font-size: 12px;
}
#device-list-table .col-ip-edit {
    min-width: 160px;
}
#device-list-table .col-actions {
    white-space: nowrap;
    width: 1%;
}
.ip-inline-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    flex-wrap: wrap;
}
.ip-inline-form .ip-inline-input {
    width: 120px;
    min-width: 100px;
    max-width: 140px;
    padding: 8px;
    font-size: 14px;
    margin: 0;
    flex: 1;
}
.ip-inline-form .btn-xs {
    flex-shrink: 0;
}
.row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.row-action-form {
    display: inline;
    margin: 0;
}
#device-search-empty td {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
}
.qr-submit-card {
    padding: 0;
    overflow: hidden;
}
.qr-submit-layout {
    min-height: 200px;
}
.qr-submit-main .qr-submit-form {
    margin-top: 12px;
}
.ip-field-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.ip-field-row input {
    flex: 1;
    max-width: none;
}
.ip-octet-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}
.ip-octet-pick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 12px;
    min-height: 32px;
}
.ip-octet-btn {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    font-size: 13px;
    cursor: pointer;
    min-height: 40px;
    font-family: inherit;
    color: var(--text-primary);
}
.ip-octet-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}
.ip-octet-btn.recommended {
    border: 2px solid var(--success) !important;
    background: var(--success-light) !important;
    font-weight: 700;
}
.import-form textarea {
    max-width: 100%;
    min-height: 120px;
    font-family: Consolas,"Cascadia Mono",monospace;
    font-size: 13px;
}
.import-form select {
    max-width: 100%;
}
.import-help {
    background: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    overflow: auto;
}
.import-error-list {
    margin: 8px 0 0;
    padding-left: 20px;
    font-size: 13px;
    color: var(--danger-hover);
}
.import-error-list li {
    margin: 4px 0;
}
@media (max-width:900px){
    .device-list-layout { flex-direction: column; }
    .device-subnet-tree {
        flex: 1 1 auto;
        max-width: none;
        position: static;
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        max-height: none;
    }
    .subnet-tree-list { display: flex; flex-direction: column; gap: 6px; }
    .subnet-tree-list li { margin: 0; width: 100%; }
    .subnet-node { width: 100%; }
    .device-table-wrap { max-height: none; }
    #device-list-table { font-size: 12px; }
    .ip-inline-form .ip-inline-input { width: 100%; max-width: none; }
    .form-actions .btn { width: 100%; text-align: center; }
    .ip-octet-toolbar .btn { flex: 1; min-width: calc(50% - 4px); text-align: center; }
}

/* Sidebar hamburger toggle styles & Backdrop */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
}

.header-title-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-primary);
    background-color: var(--bg-card);
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-btn:hover {
    background-color: var(--bg-app);
    border-color: var(--text-secondary);
}

/* ==========================================================================
   반응형 모바일 및 태블릿 최적화 스타일 (Responsive & UI Optimization)
   ========================================================================== */

/* 1. 태블릿 및 중형 스크린 (769px ~ 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .info-grid-3, .form-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px;
    }
    
    .status-cards-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 14px;
    }
    
    .app-content-wrapper {
        padding: 24px;
    }
}

/* 2. 모바일 및 태블릿 스크린 (1024px 이하) */
@media (max-width: 1024px) {
    /* 사이드바 토글 및 레이아웃 */
    .sidebar-toggle-btn {
        display: inline-flex;
    }
    
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    }
    
    .app-sidebar.show {
        transform: translateX(0);
    }
    
    .app-content-wrapper {
        max-width: 100%;
        padding: 16px;
    }
    
    /* 헤더 조정 */
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .header-actions {
        width: 100%;
        text-align: right;
    }
    
    .live-clock {
        font-size: 12px;
    }

    /* 그리드 시스템 일괄 해제 */
    .info-grid-3, .form-grid-3, .form-grid-2, .dashboard-grid, .asset-profile-grid, .transaction-layout {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .card {
        padding: 16px;
    }

    /* 카드 헤더 모바일 정렬 */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .card-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .card-actions .btn, .card-actions button {
        flex: 1;
        min-width: 120px;
        text-align: center;
        justify-content: center;
    }

    /* 검색 및 필터 패널 최적화 */
    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .filter-group {
        width: 100%;
    }
    
    .filter-group input, .filter-group select {
        height: 42px; /* 모바일 터치 영역 확장 */
        font-size: 14px;
    }

    .filter-actions {
        width: 100%;
        margin-top: 6px;
    }

    .filter-actions .btn {
        flex: 1;
        text-align: center;
        justify-content: center;
        height: 42px;
    }

    /* 일괄 작업(Bulk) 알림 바 반응형 */
    .bulk-actions-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin: 12px 0 !important;
        padding: 12px 14px !important;
    }

    .bulk-actions-bar .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        height: 38px;
    }
    
    #bulk-asset-date-container,
    #bulk-end-date-container,
    #bulk-start-date-container {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 6px;
    }
    
    #bulk-asset-actual-end-date,
    #bulk-actual-end-date,
    #bulk-actual-start-date {
        width: 100% !important;
        height: 38px;
    }

    /* 상태 요약 카드 (Status Cards) 모바일 최적화 (2열 구성) */
    .status-cards-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin: 12px 0 16px 0 !important;
    }
    
    .status-card {
        padding: 12px 14px !important;
        border-radius: 10px !important;
    }
    
    .status-card-title {
        font-size: 12px !important;
    }
    
    .status-card-value {
        font-size: 20px !important;
    }

    /* 테이블 가독성 및 버튼 줄바꿈 최방지 */
    .table-wrap {
        border-radius: 8px;
        border: 1px solid var(--border);
    }
    
    .table th, .table td {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .table td .btn, .table td form {
        margin: 2px 0;
    }
    
    /* 모바일 기기에서의 터치 입력 최적화 */
    input[type="text"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
        font-size: 14px !important; /* iOS 등 자동 줌 현상 방지 */
        min-height: 40px;
    }
    
    /* 모달창 반응형 개선 */
    .modal-content-card {
        max-width: 95% !important;
        border-radius: 12px;
    }
    
    .modal-body {
        padding: 16px !important;
    }
    
    .modal-body .form-group input, .modal-body .form-group select {
        height: 42px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 3. 스마트폰 초소형 화면 (480px 이하) */
@media (max-width: 480px) {
    .status-cards-container {
        grid-template-columns: 1fr !important; /* 초소형 기기에서는 한 줄로 정렬 */
    }
    
    .card-actions .btn {
        width: 100%;
        flex: none;
    }
    
    .brand-title {
        font-size: 16px;
    }
    
    .page-title {
        font-size: 20px;
    }
}

/* --- iPad / iPhone responsive hardening --- */
@media (hover: none) and (pointer: coarse) {
    .btn,
    button,
    input[type="checkbox"],
    input[type="radio"],
    .subnet-node,
    .btn-sub-filter,
    .status-card {
        touch-action: manipulation;
    }

    .btn-xs {
        min-height: 32px;
        padding: 6px 10px;
    }

    input[type="checkbox"],
    input[type="radio"] {
        min-width: 18px;
        min-height: 18px;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .app-sidebar {
        width: 220px;
    }

    .app-content-wrapper {
        max-width: calc(100% - 220px);
        padding: 22px;
    }

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

    .toolbar,
    .card {
        padding: 20px;
    }

    .filter-row {
        gap: 12px;
    }

    .filter-group {
        min-width: 160px;
    }

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

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

    .form-row-grid > .btn,
    .form-row-grid > button {
        width: 100%;
    }

    .transaction-layout,
    .asset-profile-grid {
        grid-template-columns: 1fr;
    }

    .table {
        min-width: 760px;
    }

    #asset-list-table {
        min-width: 980px;
    }

    #active-tx-table,
    #completed-tx-table {
        min-width: 860px;
    }
}

@media (max-width: 1024px) {
    html,
    body {
        overflow-x: hidden;
    }

    body {
        -webkit-text-size-adjust: 100%;
    }

    .app-container {
        display: block;
        min-width: 0;
    }

    .app-sidebar {
        width: min(82vw, 300px);
        max-width: 300px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-brand {
        padding: 18px;
    }

    .sidebar-nav {
        padding: 14px 10px 18px;
    }

    .nav-item {
        min-height: 44px;
        padding: 11px 14px;
    }

    .nav-user {
        margin: 8px 10px 14px;
    }

    .app-content-wrapper {
        width: 100%;
        max-width: 100%;
        padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    }

    .header-title-area {
        width: 100%;
        min-width: 0;
    }

    .sidebar-toggle-btn {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        padding: 0;
    }

    .page-title {
        min-width: 0;
        overflow-wrap: anywhere;
        line-height: 1.25;
    }

    .current-time {
        display: block;
        width: 100%;
        text-align: left;
        white-space: normal;
    }

    .toolbar {
        padding: 14px;
        margin-bottom: 14px;
    }

    .card {
        border-radius: 10px;
        padding: 14px;
    }

    .card + .card {
        margin-top: 14px !important;
    }

    .card-header h3 {
        line-height: 1.35;
    }

    .card-actions,
    .filter-actions,
    .device-search-actions,
    .form-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .card-actions .btn,
    .filter-actions .btn,
    .device-search-actions .btn,
    .form-actions .btn,
    .form-actions button {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding-left: 10px;
        padding-right: 10px;
        white-space: normal;
    }

    .filter-row,
    .filter-bar,
    .tx-completed-filter-bar,
    .device-search-bar,
    .consumable-top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-inline,
    .filter-inline-group {
        width: 100%;
        min-width: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .completed-count-label {
        margin-left: 0;
    }

    .tx-filter-bar,
    .consumable-tabs,
    .sub-filter-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: thin;
        padding-bottom: 8px;
    }

    .tx-filter-bar .btn,
    .consumable-tabs button,
    .btn-sub-filter {
        flex: 0 0 auto;
        min-height: 38px;
        white-space: nowrap;
    }

    .bulk-actions-bar,
    .tx-bulk-bar {
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 10px;
    }

    .bulk-actions-bar .bulk-actions-label,
    .tx-bulk-bar .small {
        width: 100%;
        line-height: 1.4;
    }

    .bulk-actions-bar .btn,
    .tx-bulk-bar .btn {
        min-height: 40px;
        white-space: normal;
    }

    .table-wrap,
    .device-table-wrap,
    .kdn-log-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .table {
        min-width: 720px;
    }

    #asset-list-table {
        min-width: 960px;
    }

    #active-tx-table,
    #completed-tx-table {
        min-width: 860px;
    }

    #device-list-table {
        min-width: 760px;
    }

    #tasks-table {
        min-width: 0;
        width: 100%;
    }

    /* task-inline-form, task-row-form, task-filter-row2 는 별도 task 전용 미디어쿼리에서 처리 */


    .status-cards-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .table th,
    .table td {
        padding: 10px;
        line-height: 1.35;
    }

    .table-actions {
        white-space: normal;
        min-width: 120px;
    }

    .table-actions .btn,
    .table-actions button,
    .table-actions form {
        margin: 2px;
    }

    #active-tx-table td.table-actions {
        white-space: nowrap;
        min-width: 340px;
    }

    #active-tx-table td.table-actions .tx-action-group {
        display: inline-flex;
        flex-wrap: nowrap;
        width: max-content;
    }

    #active-tx-table td.table-actions .ind-tx-form,
    #active-tx-table td.table-actions .btn-tx-text,
    #active-tx-table td.table-actions .ind-tx-date {
        width: auto;
        min-width: 0;
        white-space: nowrap;
    }

    .date-value,
    .data-code,
    .data-id,
    .data-number {
        font-size: 12px;
    }

    .info-grid-3,
    .form-grid-3,
    .form-grid-2,
    .dashboard-grid,
    .dashboard-layouts,
    .asset-profile-grid,
    .transaction-layout,
    .settings-grid {
        grid-template-columns: 1fr !important;
    }

    .info-item {
        padding: 10px 12px;
    }

    .info-val {
        overflow-wrap: anywhere;
    }

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

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

    .modal,
    .modal-backdrop,
    .modal-overlay {
        align-items: flex-end;
        padding: 12px;
    }

    .modal-card,
    .modal-content-card,
    .modal-box {
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
        border-radius: 14px 14px 10px 10px;
        padding: 18px;
    }

    .modal-content-card {
        padding: 0;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-body {
        padding: 16px !important;
    }

    .modal-actions,
    .modal-body .form-actions,
    .modal-box .form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .login-wrapper {
        min-height: calc(100dvh - 80px);
        padding: 10px 0;
    }

    .login-card {
        padding: 24px 18px;
        border-radius: 12px;
    }
}

@media (max-width: 560px) {
    .app-content-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }

    .content-header {
        margin-bottom: 14px;
    }

    .page-title {
        font-size: 19px;
    }

    .card,
    .toolbar {
        padding: 12px;
    }

    .dashboard-grid,
    .dashboard-type-grid,
    .status-cards-container,
    .consumable-stats {
        grid-template-columns: 1fr !important;
    }

    .consumable-stats {
        display: grid;
        width: 100%;
    }

    .cstat-card {
        width: 100%;
        min-width: 0;
    }

    .card-actions,
    .filter-actions,
    .device-search-actions,
    .form-actions {
        grid-template-columns: 1fr;
    }

    .sub-filter-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .table {
        min-width: 680px;
    }

    #asset-list-table {
        min-width: 900px;
    }

    #active-tx-table,
    #completed-tx-table {
        min-width: 820px;
    }

    .tx-bulk-bar,
    .bulk-actions-bar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .bulk-date-group,
    #bulk-end-date-container,
    #bulk-start-date-container,
    #bulk-asset-date-container {
        width: 100%;
    }

    .bulk-date-label,
    .filter-inline-label {
        white-space: normal;
    }

    .kdn-log-pagination-bar {
        padding: 12px;
        align-items: stretch;
    }

    .kdn-log-pagination-bar #log_pagination,
    .kdn-log-pagination-bar #timeline_pagination {
        width: 100%;
    }
}

/* --- Placeholder Styles --- */
::placeholder {
    color: var(--text-muted);
    font-family: inherit;
    opacity: 0.7;
}

/* Enforce monospace font for CSV template textareas and their placeholders */
textarea[name="csvText"],
textarea[name="csvText"]::placeholder {
    font-family: Consolas, "Cascadia Mono", monospace !important;
    font-size: 12px;
}

/* ==========================================
   Flatpickr Calendar Custom Theme (Glassmorphism & System Integration)
   ========================================== */
.flatpickr-calendar {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border, #e2e8f0) !important;
    border-radius: var(--radius, 12px) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15) !important;
    font-family: inherit !important;
}
.flatpickr-months {
    background: transparent !important;
    border-bottom: 1px solid var(--border, #e2e8f0) !important;
    padding-top: 6px !important;
}
.flatpickr-current-month {
    font-weight: 600 !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 700 !important;
}
.flatpickr-weekdays {
    background: transparent !important;
}
.flatpickr-weekday {
    font-weight: 600 !important;
    color: var(--text-secondary, #64748b) !important;
}
.flatpickr-day {
    border-radius: 6px !important;
    font-weight: 500 !important;
    transition: all 0.15s ease-in-out !important;
}
.flatpickr-day.today {
    border-color: var(--primary, #3b82f6) !important;
    color: var(--primary, #3b82f6) !important;
    background: rgba(59, 130, 246, 0.08) !important;
}
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
    background: var(--primary, #3b82f6) !important;
    border-color: var(--primary, #3b82f6) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3) !important;
}
.flatpickr-day:hover {
    background: var(--bg-app, #f4f6fc) !important;
    color: var(--text-primary, #1e293b) !important;
}
.flatpickr-custom-btn {
    transition: all 0.15s ease-in-out !important;
    outline: none !important;
}
.flatpickr-custom-btn:hover {
    background: var(--primary-light, #eff6ff) !important;
    border-color: var(--primary, #3b82f6) !important;
    color: var(--primary, #3b82f6) !important;
}
.flatpickr-custom-btn.clear-btn:hover {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: var(--danger, #ef4444) !important;
    color: var(--danger, #ef4444) !important;
}

/* ==========================================
   Mobile Responsive Cards for Assets and Transactions (≤768px)
   ========================================== */
@media (max-width: 768px) {
    /* 기존 테이블 횡스크롤 강제 해제 */
    #asset-list-table, #active-tx-table, #completed-tx-table {
        min-width: 0 !important;
        width: 100% !important;
        table-layout: auto !important;
    }
    
    /* 테이블 헤더 숨김 */
    #asset-list-table thead, 
    #active-tx-table thead, 
    #completed-tx-table thead {
        display: none !important;
    }
    
    /* 리스트 카드로 감싸기 */
    #asset-list-table tbody,
    #active-tx-table tbody,
    #completed-tx-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding: 4px 0 !important;
    }
    
    /* 개별 로우 카드 레이아웃 전환 */
    #asset-list-table tbody tr,
    #active-tx-table tbody tr,
    #completed-tx-table tbody tr {
        display: grid !important;
        background: var(--bg-card, #fff) !important;
        border: 1px solid var(--border, #e2e8f0) !important;
        border-radius: 12px !important;
        padding: 14px !important;
        gap: 6px 10px !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.03) !important;
        position: relative !important;
    }
    
    #asset-list-table tbody tr td,
    #active-tx-table tbody tr td,
    #completed-tx-table tbody tr td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
        text-align: left !important;
        background: none !important;
    }
    
    /* --- 1. 자산 목록 카드 최적화 --- */
    #asset-list-table tbody tr {
        grid-template-areas:
            "checkbox status actions"
            "asset-no asset-no asset-no"
            "asset-name asset-name asset-name"
            "info info info";
        grid-template-columns: auto auto 1fr;
    }
    
    #asset-list-table tbody tr td:nth-child(1) { grid-area: checkbox; display: flex !important; align-items: center; }
    #asset-list-table tbody tr td:nth-child(10) { grid-area: status; display: flex !important; align-items: center; } /* 상태 */
    #asset-list-table tbody tr td:nth-child(11) { grid-area: actions; display: flex !important; justify-content: flex-end; } /* 작업 */
    #asset-list-table tbody tr td:nth-child(2) { grid-area: asset-no; font-size: 15px; font-weight: 700; } /* 자산번호 */
    #asset-list-table tbody tr td:nth-child(4) { grid-area: asset-name; font-size: 13.5px; color: var(--text-primary); margin-top: 2px; } /* 자산명칭 */
    
    /* 나머지 텍스트 메타데이터 묶음 표시 */
    #asset-list-table tbody tr td:nth-child(3), /* 종류 */
    #asset-list-table tbody tr td:nth-child(5), /* 제조사 */
    #asset-list-table tbody tr td:nth-child(6), /* 시리얼 */
    #asset-list-table tbody tr td:nth-child(7), /* 부서 */
    #asset-list-table tbody tr td:nth-child(8), /* 사용자 */
    #asset-list-table tbody tr td:nth-child(9) { /* 묶음 */
        grid-area: info;
        font-size: 12px;
        color: var(--text-secondary, #64748b);
        display: inline-flex !important;
        align-items: center;
    }
    
    /* 라벨 보강 (메타데이터 항목 구분용) */
    #asset-list-table tbody tr td:nth-child(3)::before { content: "종류: "; font-weight: 600; margin-right: 4px; }
    #asset-list-table tbody tr td:nth-child(5)::before { content: " | 제조사: "; font-weight: 600; margin-right: 4px; }
    #asset-list-table tbody tr td:nth-child(6)::before { content: " | S/N: "; font-weight: 600; margin-right: 4px; }
    #asset-list-table tbody tr td:nth-child(7)::before { content: " | 부서: "; font-weight: 600; margin-right: 4px; }
    #asset-list-table tbody tr td:nth-child(8)::before { content: " | 담당: "; font-weight: 600; margin-right: 4px; }
    #asset-list-table tbody tr td:nth-child(9)::before { content: " | 세트: "; font-weight: 600; margin-right: 4px; }

    /* --- 2. 진행 중인 업무 카드 최적화 --- */
    #active-tx-table tbody tr {
        grid-template-areas:
            "checkbox status actions"
            "asset-no asset-no asset-no"
            "asset-name asset-name asset-name"
            "dates dates dates"
            "info info info";
        grid-template-columns: auto auto 1fr;
        border-left: 4px solid var(--primary, #3b82f6) !important;
    }
    #active-tx-table tbody tr[data-tx-type="RESERVE"] { border-left-color: #a855f7 !important; }
    #active-tx-table tbody tr[data-tx-type="OUT"] { border-left-color: #3b82f6 !important; }
    #active-tx-table tbody tr[data-tx-type="LOAN"] { border-left-color: #f59e0b !important; }
    
    #active-tx-table tbody tr td:nth-child(1) { grid-area: checkbox; display: flex !important; align-items: center; }
    #active-tx-table tbody tr td:nth-child(8) { grid-area: status; display: flex !important; align-items: center; } /* 진행상태 */
    #active-tx-table tbody tr td:nth-child(9) { grid-area: actions; display: flex !important; justify-content: flex-end; } /* 작업 */
    #active-tx-table tbody tr td:nth-child(2) { grid-area: asset-no; font-size: 15px; font-weight: 700; } /* 자산번호 */
    #active-tx-table tbody tr td:nth-child(3) { grid-area: asset-name; font-size: 13.5px; color: var(--text-primary); } /* 자산명칭 */
    #active-tx-table tbody tr td:nth-child(5) { grid-area: dates; font-size: 12px; color: var(--danger, #ef4444); margin: 2px 0; } /* 예정일자 */
    
    #active-tx-table tbody tr td:nth-child(4), /* 구분 */
    #active-tx-table tbody tr td:nth-child(6), /* 부서/담당자 */
    #active-tx-table tbody tr td:nth-child(7) { /* 목적 */
        grid-area: info;
        font-size: 12px;
        color: var(--text-secondary, #64748b);
        display: inline-flex !important;
        align-items: center;
    }
    #active-tx-table tbody tr td:nth-child(4)::before { content: "구분: "; font-weight: 600; margin-right: 4px; }
    #active-tx-table tbody tr td:nth-child(6)::before { content: " | 대상: "; font-weight: 600; margin-right: 4px; }
    #active-tx-table tbody tr td:nth-child(7)::before { content: " | 목적: "; font-weight: 600; margin-right: 4px; }

    /* --- 3. 완료된 업무 이력 카드 최적화 --- */
    #completed-tx-table tbody tr {
        grid-template-areas:
            "asset-no type status"
            "asset-name asset-name asset-name"
            "dates dates dates"
            "info info info";
        grid-template-columns: 1fr auto auto;
        border-left: 4px solid var(--success, #10b981) !important;
    }
    
    #completed-tx-table tbody tr td:nth-child(1) { grid-area: asset-no; font-size: 14.5px; font-weight: 700; } /* 자산번호 */
    #completed-tx-table tbody tr td:nth-child(3) { grid-area: type; display: flex !important; align-items: center; } /* 구분 */
    #completed-tx-table tbody tr td:nth-child(7) { grid-area: status; display: flex !important; align-items: center; } /* 완료상태 */
    #completed-tx-table tbody tr td:nth-child(2) { grid-area: asset-name; font-size: 13px; color: var(--text-primary); } /* 자산명칭 */
    #completed-tx-table tbody tr td:nth-child(4) { grid-area: dates; font-size: 12px; color: var(--text-muted); margin: 2px 0; } /* 이용기간 */
    
    #completed-tx-table tbody tr td:nth-child(5), /* 사용부서/담당자 */
    #completed-tx-table tbody tr td:nth-child(6) { /* 비고 */
        grid-area: info;
        font-size: 12px;
        color: var(--text-secondary, #64748b);
        display: inline-flex !important;
        align-items: center;
    }
    #completed-tx-table tbody tr td:nth-child(5)::before { content: "대상: "; font-weight: 600; margin-right: 4px; }
    #completed-tx-table tbody tr td:nth-child(6)::before { content: " | 비고: "; font-weight: 600; margin-right: 4px; }
}
