/* ?????? Torn Dashboard: Targets Panel & Tab Styles ????????????????????????????????? */

/* Panel ??? same pattern as War Room / Education */
#targets-panel {
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: 40px 20px;
    overflow-y: auto;
    background: var(--bg-color);
    visibility: hidden;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.5s;
}

.main-wrapper.targets-active #targets-panel {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition-delay: 0s;
}

/* Targets Section */
.targets-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Stats Grid */
.t-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.t-stat-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.t-stat-card .t-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0fbc8f;
    display: block;
}

.t-stat-card .t-stat-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Filter Bar */
.t-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.t-filter-bar input {
    background: #1a1a2e;
    border: 1px solid #333;
    color: #eee;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.t-filter-bar input:focus {
    outline: none;
    border-color: #0fbc8f;
}

.t-filter-bar input[type="search"] {
    flex: 1;
    min-width: 200px;
}

/* Buttons */
.t-btn {
    background: linear-gradient(135deg, #0fbc8f 0%, #0d9668 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.t-btn:hover { opacity: 0.9; }
.t-btn:active { transform: scale(0.98); }

.t-btn-outline {
    background: transparent;
    color: #0fbc8f;
    border: 1px solid #0fbc8f;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.t-btn-outline:hover {
    background: rgba(15, 188, 143, 0.1);
}

/* Table */
.t-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
}

.t-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.t-table thead th {
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    padding: 0.75rem 0.5rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.t-sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.2em !important;
}

.t-sortable::after {
    content: '\2195';
    position: absolute;
    right: 4px;
    opacity: 0.3;
    font-size: 0.75em;
}

.t-sortable.t-sorted-asc::after { content: '\2191'; opacity: 1; color: #0fbc8f; }
.t-sortable.t-sorted-desc::after { content: '\2193'; opacity: 1; color: #0fbc8f; }

.t-table tbody td {
    padding: 0.5rem;
    color: #ccc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    white-space: nowrap;
}

.t-table tbody tr:hover {
    background: rgba(15, 188, 143, 0.05);
}

.t-table tbody tr:last-child td { border-bottom: none; }

/* Specific columns */
.t-nw { font-weight: 600; color: #0fbc8f; }

.t-inactive-high { color: #e74c3c; font-weight: 600; }
.t-inactive-mid { color: #f39c12; }

/* Copy button */
.t-copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #aaa;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.78rem;
    font-family: monospace;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.15s;
}

.t-copy-btn:hover {
    background: rgba(15, 188, 143, 0.15);
    border-color: #0fbc8f;
    color: #0fbc8f;
}

.t-copy-icon { font-size: 0.7rem; opacity: 0.5; }
.t-copy-btn:hover .t-copy-icon { opacity: 1; }

/* Profile link */
.t-profile-link {
    color: #5dade2;
    text-decoration: none;
    font-weight: 500;
}

.t-profile-link:hover { text-decoration: underline; }

/* Attack button */
.t-attack-btn {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.t-attack-btn:hover {
    background: rgba(231, 76, 60, 0.3);
    transform: scale(1.1);
}

/* Toast */
#t-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a2e;
    color: #0fbc8f;
    border: 1px solid #0fbc8f;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    pointer-events: none;
}

.t-toast-visible {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .t-table { font-size: 0.75rem; }
    .t-filter-bar { flex-direction: column; }
    .t-filter-bar input { width: 100%; }
}

/* Dark scrollbar */
.t-table-wrapper::-webkit-scrollbar { height: 6px; }
.t-table-wrapper::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.t-table-wrapper::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
