﻿/* Layout */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f3f4f6;
}
.wt-app {
    display: flex;
    height: 100vh;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fa;
}

.wt-main {
    flex: 1;
    overflow-y: auto;
}

.wt-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 12px;
}

.wt-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.wt-empty-sub {
    font-size: 14px;
    color: #6b7280;
}

.wt-content {
    padding: 20px 24px;
    max-width: 1400px;
}

/* Sidebar */
.wt-sidebar {
    width: 210px;
    background: #1e1e2e;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.wt-brand {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.wt-brand-icon {
    width: 32px;
    height: 32px;
    background: #185FA5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.wt-brand-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.wt-brand-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
}

.wt-nav {
    padding: 10px 8px;
    flex: 1;
}

.wt-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s;
}

    .wt-nav-item:hover {
        background: rgba(255,255,255,0.06);
        color: rgba(255,255,255,0.9);
    }

    .wt-nav-item.active {
        background: rgba(24,95,165,0.3);
        color: #60a5fa;
    }

    .wt-nav-item i {
        font-size: 16px;
        width: 18px;
    }

.wt-nav-section {
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    padding: 12px 10px 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Page header */
.wt-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.wt-page-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.wt-header-badges {
    display: flex;
    gap: 8px;
}

/* Badges */
.wt-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.wt-badge-success {
    background: #dcfce7;
    color: #166534;
}

.wt-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.wt-badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

/* Stats */
.wt-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.wt-stat-card {
    background: white;
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
}

.wt-stat-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.wt-stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #111827;
    line-height: 1;
}

.wt-stat-sub {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Alert strips */
.wt-alert-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.wt-alert-critical {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.wt-alert-warning {
    background: #fef9c3;
    border: 1px solid #fde047;
    color: #854d0e;
}

.wt-alert-text {
    flex: 1;
}

.wt-alert-time {
    font-size: 11px;
    opacity: 0.7;
}

/* Section label */
.wt-section-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin: 20px 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Client card */
.wt-client-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.wt-client-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    background: #f9fafb;
}

.wt-client-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.wt-client-meta {
    font-size: 12px;
    color: #6b7280;
}

/* Endpoint grid */
.wt-endpoint-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    padding: 10px;
}

.wt-endpoint-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .wt-endpoint-card:hover {
        border-color: #93c5fd;
        box-shadow: 0 0 0 3px rgba(147,197,253,0.2);
    }

.wt-ep-offline {
    opacity: 0.6;
}

.wt-ep-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.wt-ep-name {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-ep-type-badge {
    font-size: 9px;
    font-weight: 700;
    background: #dbeafe;
    color: #1e40af;
    padding: 1px 5px;
    border-radius: 4px;
}

.wt-ep-os {
    font-size: 10px;
    color: #9ca3af;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-ep-offline-label {
    font-size: 11px;
    color: #ef4444;
    margin-top: 6px;
}

/* Mini bars */
.wt-ep-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wt-bar-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wt-bar-label {
    font-size: 9px;
    color: #9ca3af;
    width: 26px;
    flex-shrink: 0;
}

.wt-bar-track {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.wt-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.wt-bar-ok {
    background: #22c55e;
}

.wt-bar-warning {
    background: #f59e0b;
}

.wt-bar-critical {
    background: #ef4444;
}

.wt-bar-pct {
    font-size: 10px;
    color: #6b7280;
    width: 28px;
    text-align: right;
    flex-shrink: 0;
}

/* Status dots */
.wt-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wt-dot-success {
    background: #22c55e;
}

.wt-dot-danger {
    background: #ef4444;
}

.wt-dot-warning {
    background: #f59e0b;
}

/* Text colors */
.wt-text-success {
    color: #16a34a;
}

.wt-text-danger {
    color: #dc2626;
}

.wt-text-warning {
    color: #d97706;
}

/* Loading */
.wt-loading {
    padding: 40px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}
/* Detail page */
.wt-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
}

.wt-detail-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Tabs */
.wt-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.wt-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    color: #6b7280;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 0.15s;
}

    .wt-tab:hover {
        color: #111827;
    }

    .wt-tab.active {
        color: #185FA5;
        border-bottom-color: #185FA5;
        font-weight: 500;
    }

.wt-tab-sm {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
}

    .wt-tab-sm.active {
        background: rgba(255,255,255,0.15);
        color: white;
    }

/* Health cards */
.wt-health-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.wt-health-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
}

.wt-health-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.wt-health-value {
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 4px;
}

.wt-health-sub {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.wt-health-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.wt-health-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Info card */
.wt-info-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.wt-info-grid {
    display: flex;
    flex-direction: column;
}

.wt-info-row {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid #f3f4f6;
    gap: 12px;
}

    .wt-info-row:last-child {
        border-bottom: none;
    }

.wt-info-label {
    font-size: 12px;
    color: #6b7280;
    width: 120px;
    flex-shrink: 0;
}

.wt-info-value {
    font-size: 12px;
    color: #111827;
    font-weight: 500;
}

/* Card */
.wt-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.wt-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    background: #f9fafb;
}

.wt-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

/* Table */
.wt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .wt-table th {
        text-align: left;
        padding: 8px 14px;
        font-size: 11px;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        border-bottom: 1px solid #e5e7eb;
        background: #f9fafb;
    }

    .wt-table td {
        padding: 8px 14px;
        border-bottom: 1px solid #f3f4f6;
        color: #111827;
        vertical-align: middle;
    }

    .wt-table tr:last-child td {
        border-bottom: none;
    }

    .wt-table tr:hover td {
        background: #f9fafb;
    }

.wt-td-mono {
    font-family: monospace;
    font-size: 11px;
}

.wt-td-muted {
    color: #6b7280;
}

.wt-td-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wt-td-empty {
    text-align: center;
    color: #9ca3af;
    padding: 24px !important;
}

/* Search */
.wt-search {
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    outline: none;
    width: 200px;
}

    .wt-search:focus {
        border-color: #93c5fd;
    }

/* Action buttons */
.wt-action-btns {
    display: flex;
    gap: 4px;
}

.wt-btn-sm {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.wt-btn-warning {
    background: #fef9c3;
    color: #854d0e;
}

    .wt-btn-warning:hover {
        background: #fde047;
    }

.wt-btn-danger {
    background: #fee2e2;
    color: #991b1b;
}

    .wt-btn-danger:hover {
        background: #fca5a5;
    }

.wt-btn-success {
    background: #dcfce7;
    color: #166534;
}

    .wt-btn-success:hover {
        background: #86efac;
    }

.wt-btn-ghost {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 18px;
    padding: 4px;
    border-radius: 4px;
}

    .wt-btn-ghost:hover {
        background: #f3f4f6;
        color: #111827;
    }

.wt-btn-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #185FA5;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}

    .wt-btn-primary:hover {
        background: #1a6dbf;
    }

    .wt-btn-primary:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* Disk cards */
.wt-disk-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
}

.wt-disk-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
}

.wt-disk-letter {
    font-weight: 700;
    font-size: 15px;
    color: #111827;
}

.wt-disk-label {
    color: #6b7280;
}

.wt-disk-pct {
    font-weight: 600;
    font-size: 13px;
}

.wt-disk-stats {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
}

/* Terminal */
.wt-terminal-shell {
    background: #1a1a2e;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.wt-terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #16213e;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.wt-terminal-output {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
    min-height: 300px;
    max-height: 400px;
}

.wt-terminal-entry {
    margin-bottom: 14px;
}

.wt-terminal-cmd {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
    font-size: 13px;
    color: #60a5fa;
    margin-bottom: 4px;
}

.wt-terminal-prompt {
    color: #34d399;
    font-weight: 700;
}

.wt-terminal-time {
    margin-left: auto;
    font-size: 10px;
    color: rgba(255,255,255,0.3);
}

.wt-terminal-result {
    font-family: monospace;
    font-size: 12px;
    color: #e5e7eb;
    white-space: pre-wrap;
    padding: 6px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    border-left: 2px solid #34d399;
}

.wt-terminal-error {
    color: #fca5a5;
    border-left-color: #ef4444;
}

.wt-terminal-pending {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}

.wt-terminal-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: #16213e;
}

.wt-terminal-prompt-inline {
    font-family: monospace;
    font-size: 14px;
    color: #34d399;
    font-weight: 700;
    flex-shrink: 0;
}

.wt-terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: monospace;
    font-size: 13px;
    color: #e5e7eb;
    caret-color: #34d399;
}

.wt-terminal-offline-msg {
    text-align: center;
    font-size: 12px;
    color: #ef4444;
    padding: 6px;
    background: rgba(239,68,68,0.1);
}

/* Misc */
.wt-badge-neutral {
    background: #f3f4f6;
    color: #374151;
}
/* Auth pages */
.wt-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    padding: 20px;
}

.wt-auth-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.wt-auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.wt-auth-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.wt-auth-sub {
    font-size: 12px;
    color: #6b7280;
}

.wt-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wt-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wt-form-label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.wt-form-input {
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
    color: #111827;
}

    .wt-form-input:focus {
        border-color: #185FA5;
        box-shadow: 0 0 0 3px rgba(24,95,165,0.1);
    }

.wt-auth-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wt-mfa-icon {
    text-align: center;
    padding: 8px 0;
}

.wt-mfa-label {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    line-height: 1.5;
}

.wt-mfa-input {
    text-align: center;
    font-size: 24px;
    font-family: monospace;
    letter-spacing: 8px;
    font-weight: 600;
}
/* Modal */
.wt-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.wt-modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.wt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.wt-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.wt-modal-body {
    padding: 20px;
}

.wt-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
}

.wt-modal-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 20px 0 12px;
}

.wt-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.wt-toggle {
    display: flex;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.wt-toggle-btn {
    font-size: 13px;
    padding: 6px 14px;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

    .wt-toggle-btn:hover {
        background: #f3f4f6;
        color: #111827;
    }

    .wt-toggle-btn.active {
        background: #185FA5;
        color: white;
    }