/* =========================================
   TORMINAL UI FRAMEWORK
   -----------------------------------------
   Tor-Friendly, CSS-Only Edition
   ========================================= */

:root {
    --bg-base: #030303;
    --bg-surface: #0a0a0a;
    --t-green: #00ff41;
    --t-green-dim: #008f11;
    --t-red: #ff003c;
    --t-yellow: #ffcc00;
    --t-yellow-dim: #b38f00;
    --t-pink: #ff0055;
    --t-pink-dim: #8f0030;
    --t-cyan: #00d9ff;
    --t-cyan-dim: #007a8f;
    --t-purple: #7d4698;
    --t-purple-dim: #4a275c;
    --t-white: #eafff0;

    /* Privacy-first default: no external fonts, no custom font downloads. */
    --t-font: monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

::selection { background: var(--t-green); color: var(--bg-base); text-shadow: none; }
::-moz-selection { background: var(--t-green); color: var(--bg-base); text-shadow: none; }

/* --- SCROLLBAR TOR / FIREFOX STANDARD --- */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--t-green-dim) var(--bg-base);
}

/* Webkit Fallback (Jika dibuka di luar Tor Browser) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); border-left: 1px dashed var(--t-green-dim); }
::-webkit-scrollbar-thumb { background: var(--t-green-dim); border-radius: 0; transition: background 0.2s; }
::-webkit-scrollbar-thumb:hover { background: var(--t-green); }

body {
    background-color: var(--bg-base);
    background-image: radial-gradient(rgba(0, 255, 65, 0.08) 1px, transparent 1px);
    background-size: 18px 18px;
    background-position: 0 0;
    color: var(--t-green);
    font-family: var(--t-font);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    text-shadow: 0 0 2px rgba(0, 255, 65, 0.3);
}

body.t-crt::after {
    content: " "; display: block; position: fixed; top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 100000; background-size: 100% 2px, 3px 100%; pointer-events: none;
}

/* --- UTILITIES & ACCESSIBILITY --- */

/* Screen-reader / visually-hidden helper.
   Useful for checkbox hacks that must remain keyboard-accessible. */
.t-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Indikator Fokus Keyboard (Penting untuk Tor tanpa JS) */
:focus-visible {
    outline: 2px dashed var(--t-green);
    outline-offset: 3px;
    background: rgba(0, 255, 65, 0.1);
}

:focus:not(:focus-visible) {
    outline: none;
}

.d-flex { display: flex !important; }
.d-none { display: none !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.gap-1 { gap: 5px !important; } .gap-2 { gap: 10px !important; } .gap-3 { gap: 15px !important; } .gap-4 { gap: 20px !important; }

/* Sizing Utilities */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.h-100 { height: 100% !important; }

/* Responsive Display Utilities */
@media (max-width: 768px) {
    .d-none-mobile { display: none !important; }
    .d-block-mobile { display: block !important; }
}
@media (min-width: 769px) {
    .d-none-desktop { display: none !important; }
    .d-block-desktop { display: block !important; }
}

.m-0 { margin: 0 !important; } .mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 5px !important; } .mt-2 { margin-top: 10px !important; } .mt-3 { margin-top: 15px !important; } .mt-4 { margin-top: 20px !important; } .mt-5 { margin-top: 30px !important; }
.mb-1 { margin-bottom: 5px !important; } .mb-2 { margin-bottom: 10px !important; } .mb-3 { margin-bottom: 15px !important; } .mb-4 { margin-bottom: 20px !important; } .mb-5 { margin-bottom: 30px !important; }
.my-1 { margin-top: 5px !important; margin-bottom: 5px !important; } .my-2 { margin-top: 10px !important; margin-bottom: 10px !important; } .my-3 { margin-top: 15px !important; margin-bottom: 15px !important; }

.p-0 { padding: 0 !important; } .p-1 { padding: 5px !important; } .p-2 { padding: 10px !important; } .p-3 { padding: 15px !important; } .p-4 { padding: 20px !important; }
.py-1 { padding-top: 5px !important; padding-bottom: 5px !important; } .py-2 { padding-top: 10px !important; padding-bottom: 10px !important; } .py-3 { padding-top: 15px !important; padding-bottom: 15px !important; }
.px-1 { padding-left: 5px !important; padding-right: 5px !important; } .px-2 { padding-left: 10px !important; padding-right: 10px !important; } .px-3 { padding-left: 15px !important; padding-right: 15px !important; }

.t-border-bottom { border-bottom: 1px dashed var(--t-green-dim) !important; }
.t-border-top { border-top: 1px dashed var(--t-green-dim) !important; }
.t-border { border: 1px solid var(--t-green-dim) !important; }

.text-center { text-align: center !important; } .text-right { text-align: right !important; } .text-left { text-align: left !important; }
.text-muted { color: var(--t-green-dim) !important; } 
.text-danger { color: var(--t-red) !important; } 
.text-success { color: var(--t-green) !important; }
.text-warning { color: var(--t-yellow) !important; }

.font-bold { font-weight: bold !important; } .fw-normal { font-weight: normal !important; } .fs-small { font-size: 11px !important; }

/* ANIMATIONS */
.t-blink { animation: t-blink-anim 1s step-end infinite; }
@keyframes t-blink-anim { 50% { opacity: 0; } }

.t-glow { text-shadow: 0 0 10px var(--t-green), 0 0 20px rgba(0, 255, 65, 0.4) !important; }
.t-flicker { animation: t-flicker-anim 0.3s infinite alternate; }
@keyframes t-flicker-anim { 0% { opacity: 1; } 50% { opacity: 0.8; } 100% { opacity: 0.95; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* --- LAYOUTS --- */
.t-container { width: 100%; max-width: 800px; margin: 0 auto; padding: 20px; }
.t-container-fluid { width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px; }
.t-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) { .t-grid-2 { grid-template-columns: 1fr 1fr; } .t-grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
.t-grid-layout { display: flex; flex-wrap: wrap; gap: 20px; }
.t-main-panel { flex: 3; min-width: 300px; }
.t-side-panel { flex: 1; min-width: 250px; }
.t-center-screen { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; width: 100%; position: relative; }

.t-center-box { width: 100%; max-width: 400px; margin: 0 auto; }
.t-box-md { max-width: 650px; }
.t-box-lg { max-width: 850px; }

/* --- CSS-ONLY CHECKBOX TOGGLE HACK --- */
/* Keep toggle inputs accessible; display:none breaks keyboard/screen-reader access. */
.t-toggle-checkbox {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* --- NAVBAR MODULE (CSS-Only Toggler) --- */
.t-navbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; border-bottom: 1px dashed var(--t-green-dim); background: var(--bg-surface); margin-bottom: 20px; }
.t-nav-brand { font-weight: bold; color: var(--t-green); font-size: 16px; text-transform: uppercase; letter-spacing: 1px; }
.t-nav-menu { display: flex; gap: 15px; }
.t-nav-menu a { color: var(--t-green-dim); text-decoration: none; font-size: 13px; transition: 0.2s; }
.t-nav-menu a:hover { color: var(--t-green); text-shadow: 0 0 5px var(--t-green); }

.t-nav-toggler-label { display: none; background: transparent; border: 1px solid var(--t-green-dim); color: var(--t-green); padding: 5px 10px; cursor: pointer; font-family: inherit; font-size: 12px; transition: 0.2s; }
.t-nav-toggler-label:hover { background: rgba(0,255,65,0.1); }

@media (max-width: 768px) {
    .t-navbar { flex-wrap: wrap; }
    .t-nav-toggler-label { display: inline-block; }
    .t-nav-menu.t-nav-collapse { display: none; width: 100%; flex-direction: column; gap: 10px; margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--t-green-dim); }
    #nav-toggle:checked ~ .t-nav-menu.t-nav-collapse { display: flex; animation: fadeIn 0.3s ease; }
}

/* --- CARD MODULE --- */
.t-card { background-color: var(--bg-surface); border: 1px solid var(--t-green-dim); padding: 20px; margin-bottom: 20px; border-top: 3px solid var(--t-green-dim); position: relative; transition: box-shadow 0.3s ease; }
.t-card-header { border-bottom: 1px dashed var(--t-green-dim); padding-bottom: 10px; margin-bottom: 15px; font-weight: bold; text-transform: uppercase; }
.t-card.danger { border-color: var(--t-red); border-top-color: var(--t-red); background-color: var(--bg-surface); color: var(--t-red); }
.t-card.danger .t-card-header { border-bottom-color: var(--t-red); color: var(--t-red); }
.t-card.warning { border-color: var(--t-yellow); border-top-color: var(--t-yellow); background-color: var(--bg-surface); color: var(--t-yellow); }
.t-card.warning .t-card-header { border-bottom-color: var(--t-yellow); color: var(--t-yellow); }

hr.t-divider { border: 0; border-top: 1px dashed var(--t-green-dim); margin: 20px 0; }

/* --- FORMS & BUTTONS --- */
.t-btn { display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--t-green); border: 1px solid var(--t-green); padding: 8px 16px; font-family: inherit; font-size: 14px; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: all 0.2s ease; border-radius: 0; }
.t-btn:hover { background: var(--t-green); color: var(--bg-base); box-shadow: 0 0 10px var(--t-green); }
.t-btn:active { transform: translateY(2px); }
.t-btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.t-btn.danger { color: var(--t-red); border-color: var(--t-red); }
.t-btn.danger:hover { background: var(--t-red); color: #fff; box-shadow: 0 0 10px var(--t-red); }
.t-btn.warning { color: var(--t-yellow); border-color: var(--t-yellow-dim); }
.t-btn.warning:hover { background: var(--t-yellow); color: var(--bg-base); box-shadow: 0 0 10px var(--t-yellow); }
.t-btn.info { color: var(--t-cyan); border-color: var(--t-cyan-dim); }
.t-btn.info:hover { background: var(--t-cyan); color: var(--bg-base); box-shadow: 0 0 10px var(--t-cyan); }
.t-btn.ghost { color: var(--t-green-dim); border-color: var(--t-green-dim); opacity: 0.85; }
.t-btn.ghost:hover { color: var(--t-green); border-color: var(--t-green); background: rgba(0,255,65,0.08); box-shadow: none; }
.t-btn-sm { padding: 4px 10px; font-size: 11px; }
.t-btn-block { display: flex; width: 100%; }

.t-form-label { display: block; font-size: 12px; color: var(--t-green-dim); margin-bottom: 8px; text-transform: uppercase; }
.t-input { width: 100%; background: transparent; color: var(--t-green); border: none; border-bottom: 1px solid var(--t-green-dim); padding: 10px 0; font-family: inherit; font-size: 14px; outline: none; margin-bottom: 15px; transition: 0.2s; border-radius: 0; }
.t-input:focus { border-bottom-color: var(--t-green); box-shadow: 0 1px 0 var(--t-green); }
.t-input:disabled { opacity: 0.5; cursor: not-allowed; border-bottom-style: dashed; }

.t-input.error { border-bottom-color: var(--t-red) !important; color: var(--t-red); box-shadow: 0 1px 0 var(--t-red); }
.t-input.success { border-bottom-color: var(--t-green) !important; box-shadow: 0 1px 0 var(--t-green); }
.t-feedback { font-size: 11px; margin-top: -10px; margin-bottom: 15px; display: block; }

.t-textarea { width: 100%; background: transparent; color: var(--t-green); border: 1px solid var(--t-green-dim); padding: 10px; font-family: inherit; font-size: 14px; outline: none; margin-bottom: 15px; resize: vertical; transition: 0.2s; }
.t-textarea:focus { border-color: var(--t-green); box-shadow: 0 0 8px rgba(0, 255, 65, 0.2); }
.t-select { width: 100%; background: var(--bg-surface); color: var(--t-green); border: 1px solid var(--t-green-dim); padding: 8px 10px; font-family: inherit; font-size: 14px; outline: none; cursor: pointer; appearance: none; margin-bottom: 15px; }
.t-select:focus { border-color: var(--t-green); }
.t-select option { background: var(--bg-base); color: var(--t-green); }

.t-checkbox-label, .t-radio-label { display: flex; align-items: center; cursor: pointer; font-size: 13px; margin-bottom: 10px; color: var(--t-green-dim); transition: 0.2s; }
.t-checkbox-label:hover, .t-radio-label:hover { color: var(--t-green); }
.t-checkbox-label input, .t-radio-label input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.t-checkmark::before { content: "[ ]"; margin-right: 8px; font-family: inherit; font-weight: bold; }
.t-checkbox-label input:checked ~ .t-checkmark::before { content: "[X]"; color: var(--t-green); }
.t-radiomark::before { content: "( )"; margin-right: 8px; font-family: inherit; font-weight: bold; }
.t-radio-label input:checked ~ .t-radiomark::before { content: "(*)"; color: var(--t-green); }

/* --- COMPONENTS --- */
.t-table-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--t-green-dim); margin-bottom: 20px; }
.t-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.t-table th, .t-table td { border: 1px solid var(--t-green-dim); padding: 10px; text-align: left; }
.t-table th { background-color: rgba(0, 255, 65, 0.1); text-transform: uppercase; }

.t-list-group { display: flex; flex-direction: column; border: 1px dashed var(--t-green-dim); margin-bottom: 20px; }
.t-list-item { padding: 15px; border-bottom: 1px dashed var(--t-green-dim); cursor: pointer; text-decoration: none; color: var(--t-green-dim); transition: 0.2s; position: relative; display: block; }
.t-list-item:last-child { border-bottom: none; }
.t-list-item:hover { background: rgba(0, 255, 65, 0.05); color: var(--t-green); border-left: 3px solid var(--t-green); padding-left: 12px; }

.t-badge { display: inline-block; padding: 2px 8px; font-size: 11px; font-weight: bold; text-transform: uppercase; background: rgba(0, 255, 65, 0.1); color: var(--t-green); border: 1px solid var(--t-green-dim); }
.t-badge.danger { background: rgba(255, 0, 60, 0.1); color: var(--t-red); border-color: var(--t-red); }
.t-badge.warning { background: rgba(255, 204, 0, 0.1); color: var(--t-yellow); border-color: var(--t-yellow-dim); }
.t-badge.info { background: rgba(0, 217, 255, 0.1); color: var(--t-cyan); border-color: var(--t-cyan-dim); }
.t-badge.private { background: rgba(255, 0, 85, 0.1); color: var(--t-pink); border-color: var(--t-pink-dim); }
.t-badge.muted { background: rgba(0, 255, 65, 0.04); color: var(--t-green-dim); border-color: var(--t-green-dim); }

.t-alert { padding: 15px; border: 1px solid var(--t-green-dim); background: rgba(0, 255, 65, 0.05); margin-bottom: 15px; font-size: 13px; border-left: 4px solid var(--t-green); }
.t-alert.warning { border-color: var(--t-yellow-dim); background: rgba(255, 204, 0, 0.05); color: var(--t-yellow); border-left-color: var(--t-yellow); }
.t-alert.danger { border-color: var(--t-red); background: rgba(255, 0, 60, 0.05); color: var(--t-red); border-left-color: var(--t-red); }
.t-alert.info { border-color: var(--t-cyan-dim); background: rgba(0, 217, 255, 0.05); color: var(--t-cyan); border-left-color: var(--t-cyan); }
.t-alert.private { border-color: var(--t-pink-dim); background: rgba(255, 0, 85, 0.05); color: var(--t-pink); border-left-color: var(--t-pink); }

.t-spinner { display: inline-block; font-family: inherit; font-weight: bold; color: var(--t-green); }
.t-spinner::after { content: "|"; animation: terminal-spin 0.8s infinite step-end; }
@keyframes terminal-spin { 0% { content: "|"; } 25% { content: "/"; } 50% { content: "-"; } 75% { content: "\\"; } }

/* --- CSS-ONLY TABS --- */
.t-tabs-wrapper { margin-bottom: 20px; }
.t-tabs-header { display: flex; border-bottom: 1px dashed var(--t-green-dim); margin-bottom: 15px; overflow-x: auto; flex-wrap: wrap; }
.t-tab-radio { display: none; }
.t-tab-label { color: var(--t-green-dim); padding: 8px 15px; cursor: pointer; font-family: inherit; font-size: 13px; text-transform: uppercase; white-space: nowrap; transition: 0.2s; }
.t-tab-label:hover { color: var(--t-green); }
.t-tab-radio:checked + .t-tab-label { color: var(--t-green); border-bottom: 2px solid var(--t-green); font-weight: bold; }
.t-tab-content-css { display: none; width: 100%; animation: fadeIn 0.3s ease; }
/* Logic untuk menampilkan tab (Asumsi max 5 tab dalam satu wrapper, tambah jika perlu) */
#tab1:checked ~ #content1, #tab2:checked ~ #content2, #tab3:checked ~ #content3, #tab4:checked ~ #content4, #tab5:checked ~ #content5 { display: block; }

/* --- CSS-ONLY ACCORDION (HTML5 NATIVE) --- */
details.t-accordion-native { border: 1px solid var(--t-green-dim); margin-bottom: 10px; background: transparent; }
details.t-accordion-native summary { padding: 12px 15px; cursor: pointer; color: var(--t-green-dim); font-size: 13px; text-transform: uppercase; display: block; user-select: none; transition: 0.2s; }
details.t-accordion-native summary::-webkit-details-marker { display: none; }
details.t-accordion-native summary:hover { color: var(--t-green); background: rgba(0, 255, 65, 0.05); }
details.t-accordion-native summary::before { content: "[+] "; margin-right: 10px; }
details.t-accordion-native[open] summary { border-bottom: 1px dashed var(--t-green-dim); color: var(--t-green); background: rgba(0, 255, 65, 0.05); }
details.t-accordion-native[open] summary::before { content: "[-] "; }
details.t-accordion-native .t-accordion-body { padding: 15px; color: var(--t-green-dim); font-size: 13px; animation: fadeIn 0.3s ease; }

/* --- CSS-ONLY MODAL (TARGET HACK) --- */
.t-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; z-index: 10000; padding: 20px; }
.t-modal:target { display: flex; }
.t-modal-content { background: var(--bg-surface); border: 1px solid var(--t-green); width: 100%; max-width: 500px; padding: 20px; box-shadow: 0 0 15px rgba(0, 255, 65, 0.1); max-height: 90vh; overflow-y: auto; position: relative; }
.t-modal-close-btn { position: absolute; top: 15px; right: 15px; color: var(--t-red); text-decoration: none; font-weight: bold; border: 1px solid var(--t-red); padding: 2px 6px; font-size: 12px; transition: 0.2s; }
.t-modal-close-btn:hover { background: var(--t-red); color: var(--bg-base); }

/* --- WINDOW COMPONENT --- */
.t-window { border: 1px solid var(--t-green-dim); margin-bottom: 20px; background: var(--bg-base); }
.t-window-header { background: var(--bg-surface); border-bottom: 1px dashed var(--t-green-dim); padding: 5px 10px; font-size: 12px; color: var(--t-green-dim); display: flex; justify-content: space-between; align-items: center; }
.t-window-body { padding: 15px; overflow-x: auto; font-family: inherit; font-size: 13px; color: var(--t-green); margin: 0; }
.t-window-body code { white-space: pre; }

/* 1. AUTO-HIDE SPLASH SCREEN (CSS Animation) */
.t-splash { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background-color: var(--bg-base);
    background-image: radial-gradient(rgba(0, 255, 65, 0.08) 1px, transparent 1px);
    background-size: 18px 18px;
    background-position: 0 0;
    z-index: 99999; display: flex; flex-direction: column; justify-content: center; align-items: center;
    /* Auto-hide trick */
    animation: torminal-hide-splash 0.5s ease-out forwards;
    animation-delay: 2.5s; 
}
.t-loading-dots::after { content: "."; animation: loadingDots 1.5s infinite steps(4, end); }
@keyframes loadingDots { 0%, 100% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@keyframes torminal-hide-splash { to { opacity: 0; visibility: hidden; z-index: -1; } }

/* 2. CSS-ONLY DROPDOWN MENU */
.t-dropdown { position: relative; display: inline-block; }
.t-dropdown-label { display: inline-block; cursor: pointer; }
.t-dropdown-menu { display: none; position: absolute; top: 100%; right: 0; background-color: var(--bg-surface); min-width: 160px; border: 1px solid var(--t-green); box-shadow: 0 8px 16px rgba(0,255,65,0.15); z-index: 1000; margin-top: 5px; }
.t-toggle-checkbox:checked ~ .t-dropdown-menu { display: block; animation: fadeIn 0.2s ease; }
.t-dropdown-item { color: var(--t-green-dim); padding: 10px 15px; text-decoration: none; display: block; font-size: 13px; border-bottom: 1px dashed var(--t-green-dim); transition: 0.2s; cursor: pointer; }
.t-dropdown-item:last-child { border-bottom: none; }
.t-dropdown-item:hover { background-color: rgba(0, 255, 65, 0.1); color: var(--t-green); padding-left: 20px; border-left: 2px solid var(--t-green); }

/* 3. TOGGLE SWITCH */
.t-switch { position: relative; display: inline-block; width: 40px; height: 20px; vertical-align: middle; }
.t-switch input { opacity: 0; width: 0; height: 0; }
.t-switch-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: transparent; border: 1px solid var(--t-green-dim); transition: .2s; }
.t-switch-slider:before { position: absolute; content: ""; height: 12px; width: 12px; left: 3px; bottom: 3px; background-color: var(--t-green-dim); transition: .2s; }
.t-switch input:checked + .t-switch-slider { border-color: var(--t-green); background-color: rgba(0,255,65,0.1); box-shadow: 0 0 5px rgba(0,255,65,0.2); }
.t-switch input:checked + .t-switch-slider:before { transform: translateX(20px); background-color: var(--t-green); box-shadow: 0 0 5px var(--t-green); }

/* 4. RANGE SLIDER (CALIBRATOR) */
.t-range { -webkit-appearance: none; appearance: none; width: 100%; background: transparent; height: 20px; outline: none; margin: 10px 0; }
.t-range::-webkit-slider-runnable-track { width: 100%; height: 2px; background: repeating-linear-gradient(to right, var(--t-green-dim) 0, var(--t-green-dim) 5px, transparent 5px, transparent 10px); cursor: pointer; }
.t-range::-webkit-slider-thumb { height: 16px; width: 10px; background: var(--t-green); cursor: pointer; -webkit-appearance: none; appearance: none; margin-top: -7px; border: 1px solid var(--bg-base); box-shadow: 0 0 5px var(--t-green); transition: 0.2s; }
.t-range::-webkit-slider-thumb:hover { background: var(--t-yellow); box-shadow: 0 0 8px var(--t-yellow); }
.t-range:focus::-webkit-slider-runnable-track { background: repeating-linear-gradient(to right, var(--t-green) 0, var(--t-green) 5px, transparent 5px, transparent 10px); }

/* 5. TOTP / AUTH MODULE */
.t-totp-code { font-size: 2.2rem; letter-spacing: 8px; font-weight: bold; cursor: copy; transition: 0.2s; user-select: none; text-align: center; }
.t-totp-code:hover { color: #fff !important; text-shadow: 0 0 15px var(--t-green); }
.t-totp-code.warning { color: var(--t-red) !important; text-shadow: 0 0 10px var(--t-red); }

/* 6. EMPTY STATE MODULE */
.t-empty-state { padding: 40px 20px; text-align: center; border: 1px dashed var(--t-green-dim); background: rgba(0, 255, 65, 0.02); margin-bottom: 20px; }
.t-empty-state-icon { font-size: 2rem; color: var(--t-green-dim); margin-bottom: 10px; display: block; opacity: 0.5; font-family: monospace; }


/* =========================================
   TORMINAL V10 REUSABLE APP MODULES
   -----------------------------------------
   Shared components for DeadDrop pages:
   timeline, inbox, radar, profile, install docs.
   Zero-JS / Tor-Safest friendly.
   ========================================= */

/* --- Terminal Shell / Command Center --- */
.t-shell {
    border: 1px solid var(--t-green-dim);
    background: rgba(10, 10, 10, 0.92);
    box-shadow: inset 0 0 0 1px rgba(0,255,65,0.03);
    margin-bottom: 20px;
}

.t-shell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px dashed var(--t-green-dim);
    background: rgba(0, 255, 65, 0.03);
    color: var(--t-green-dim);
    font-size: 12px;
    text-transform: uppercase;
}

.t-shell-title {
    color: var(--t-green);
    font-weight: bold;
    letter-spacing: 0.5px;
}

.t-shell-body { padding: 15px; }

.t-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px dashed var(--t-green-dim);
    border-bottom: 1px dashed var(--t-green-dim);
    margin-bottom: 15px;
}

.t-statusline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    border: 1px dashed var(--t-green-dim);
    background: rgba(0,255,65,0.025);
    color: var(--t-green-dim);
    padding: 8px 10px;
    font-size: 12px;
    margin-bottom: 15px;
}

.t-command {
    display: block;
    border-left: 3px solid var(--t-green-dim);
    background: rgba(0,255,65,0.03);
    padding: 10px 12px;
    margin-bottom: 15px;
    color: var(--t-green);
    overflow-x: auto;
}

.t-command::before {
    content: "$ ";
    color: var(--t-green-dim);
}

/* --- Timeline / Inbox Post Module --- */
.t-feed {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.t-post {
    border: 1px solid var(--t-green-dim);
    border-left: 3px solid var(--t-green-dim);
    background: rgba(10, 10, 10, 0.88);
    padding: 15px;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}

.t-post:hover {
    border-left-color: var(--t-green);
    background: rgba(0,255,65,0.025);
}

.t-post.local,
.t-post.local-node {
    border-left-width: 4px;
    border-left-color: var(--t-green);
}

.t-post.private,
.t-post.inbox {
    border-left-color: var(--t-pink);
    background: rgba(255,0,85,0.025);
}

.t-post.burner {
    border-color: var(--t-red);
    border-left-color: var(--t-red);
    background: rgba(255,0,60,0.035);
}

.t-post.deleted,
.t-post.tombstone {
    opacity: 0.72;
    border-style: dashed;
}

.t-post-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--t-green-dim);
}

.t-post-author {
    font-weight: bold;
    color: var(--t-green);
}

.t-post.private .t-post-author,
.t-post.inbox .t-post-author {
    color: var(--t-pink);
}

.t-post-meta {
    color: var(--t-green-dim);
    font-size: 11px;
    text-transform: uppercase;
}

.t-post-content {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
}

.t-post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0,255,65,0.22);
}

.t-thread-quote,
.t-quote {
    background: rgba(0, 0, 0, 0.5);
    border-left: 2px dashed var(--t-green-dim);
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--t-green-dim);
}

.t-thread-quote.private,
.t-quote.private {
    border-left-color: var(--t-pink);
    color: #ff88aa;
}

.t-quote-author {
    display: block;
    font-weight: bold;
    color: var(--t-green);
    margin-bottom: 4px;
}

.t-quote.private .t-quote-author,
.t-thread-quote.private .t-quote-author {
    color: var(--t-pink);
}

/* Backward-compatible aliases for old inline page CSS. */
.post-card {
    border: 1px solid var(--t-green-dim);
    border-left: 3px solid var(--t-green-dim);
    background: rgba(10, 10, 10, 0.88);
    padding: 15px;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}
.post-card:hover {
    border-left-color: var(--t-green);
    background: rgba(0,255,65,0.025);
}
.post-card.local-node {
    border-left-width: 4px;
    border-left-color: var(--t-green);
}

.media-attachment,
.t-media-attachment {
    display: block;
    max-width: 100%;
    max-height: 420px;
    border: 1px dashed var(--t-green-dim);
    margin-top: 10px;
    object-fit: contain;
    background: var(--bg-base);
}

.t-media-attachment:hover,
.media-attachment:hover {
    border-color: var(--t-green);
}

.t-media-frame {
    border: 1px dashed var(--t-green-dim);
    background: rgba(0,0,0,0.35);
    padding: 8px;
    margin-top: 10px;
}

.t-media-caption {
    margin-top: 6px;
    color: var(--t-green-dim);
    font-size: 11px;
}

/* --- Auth / Vault / Lock Screens --- */
.t-vault-panel,
.t-lock-panel {
    margin-top: 12vh;
    text-align: center;
    border: 1px dashed var(--t-green-dim);
    padding: 40px 20px;
    background: rgba(0,255,65,0.02);
}

.t-vault-panel.private,
.t-lock-panel.private {
    border-color: var(--t-pink);
    background: rgba(255,0,85,0.02);
}

.t-vault-title {
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.t-vault-subtitle {
    color: var(--t-green-dim);
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* --- Key/Value, Metrics, Inspector UI --- */
.t-kv {
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) 2fr;
    gap: 0;
    border: 1px dashed var(--t-green-dim);
    margin-bottom: 15px;
}

.t-kv dt,
.t-kv dd {
    padding: 8px 10px;
    border-bottom: 1px dashed rgba(0,255,65,0.2);
}

.t-kv dt {
    color: var(--t-green-dim);
    text-transform: uppercase;
    font-size: 11px;
}

.t-kv dd {
    color: var(--t-green);
    overflow-wrap: anywhere;
}

.t-kv dt:last-of-type,
.t-kv dd:last-of-type {
    border-bottom: none;
}

.t-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.t-metric {
    border: 1px dashed var(--t-green-dim);
    background: rgba(0,255,65,0.025);
    padding: 12px;
}

.t-metric-value {
    display: block;
    font-size: 1.4rem;
    color: var(--t-green);
    font-weight: bold;
}

.t-metric-label {
    display: block;
    color: var(--t-green-dim);
    font-size: 11px;
    text-transform: uppercase;
}

/* --- Pagination --- */
.t-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}

.t-page-link,
.t-page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--t-green-dim);
    color: var(--t-green-dim);
    text-decoration: none;
    font-size: 12px;
}

.t-page-link:hover,
.t-page-current {
    color: var(--t-green);
    border-color: var(--t-green);
    background: rgba(0,255,65,0.08);
}

/* --- Code / Keys / Long Identifiers --- */
.t-code,
.t-kbd,
.t-fingerprint {
    font-family: var(--t-font);
    border: 1px solid var(--t-green-dim);
    background: rgba(0,255,65,0.04);
    color: var(--t-green);
}

.t-code {
    display: block;
    padding: 10px;
    overflow-x: auto;
    white-space: pre;
    margin-bottom: 15px;
}

.t-kbd {
    display: inline-block;
    padding: 1px 6px;
    font-size: 11px;
}

.t-fingerprint {
    display: inline-block;
    padding: 2px 6px;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
}

/* --- Responsive Helpers --- */
@media (max-width: 768px) {
    .t-stack-mobile {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .t-toolbar {
        align-items: stretch;
    }

    .t-toolbar .t-btn {
        width: 100%;
    }

    .t-kv {
        grid-template-columns: 1fr;
    }

    .t-kv dt {
        border-bottom: none;
        padding-bottom: 2px;
    }

    .t-kv dd {
        padding-top: 2px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    .t-container,
    .t-container-fluid {
        padding: 12px;
    }

    .t-card,
    .t-post,
    .t-shell-body {
        padding: 12px;
    }

    .t-vault-title {
        font-size: 1.45rem;
    }
}

/* --- REDUCED MOTION (Penting untuk Tor / Aksesibilitas) --- */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .t-glow, body.t-crt::after {
        text-shadow: none !important;
        display: none !important;
    }
}