* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

a {
    text-decoration: none;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* ==========================
   SIDEBAR
========================== */

.sidebar {
    width: 260px;
    background: #111827;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.brand {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
    width: 50px;
    height: 50px;
    background: #2563eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.brand h1 {
    font-size: 18px;
}

.brand p {
    font-size: 12px;
    color: #9ca3af;
}

.menu {
    padding: 20px 0;
}

.menu a {
    display: block;
    color: #d1d5db;
    padding: 14px 25px;
    transition: .2s;
}

.menu a:hover {
    background: rgba(255,255,255,.05);
}

.menu a.active {
    background: #2563eb;
    color: #fff;
}

/* ==========================
   MAIN
========================== */

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: #fff;
    padding: 25px;
    border-bottom: 1px solid #e5e7eb;
}

.topbar h2 {
    margin-bottom: 5px;
}

.topbar p {
    color: #6b7280;
    font-size: 14px;
}

.content {
    padding: 25px;
}

/* ==========================
   CARD
========================== */

.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.card-title {
    font-size: 18px;
    margin-bottom: 15px;
}

/* ==========================
   DASHBOARD
========================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.stat-card h3 {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 30px;
    font-weight: bold;
}

/* ==========================
   TABLE
========================== */

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #f9fafb;
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

/* ==========================
   FORM
========================== */

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    height: 45px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

textarea.form-control {
    height: 120px;
    padding: 12px;
}

.btn {
    border: none;
    cursor: pointer;
    height: 45px;
    padding: 0 20px;
    border-radius: 8px;
}

.btn-sm {
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-success {
    background: #16a34a;
    color: #fff;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

/* ==========================
   ALERT
========================== */

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.report-header {
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
}

.report-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.report-header p {
    color: #6b7280;
}

.card-inner {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chart-row {
    display: grid;
    grid-template-columns: 130px 1fr 50px;
    align-items: center;
    gap: 12px;
}

.chart-label {
    font-weight: 600;
}

.chart-track {
    width: 100%;
    height: 18px;
    background: #e5e7eb;
    border-radius: 50px;
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 50px;
}

.chart-value {
    font-weight: 700;
    text-align: right;
}

@media print {
    body {
        background: #fff;
    }

    .sidebar,
    .topbar,
    .no-print {
        display: none !important;
    }

    .app {
        display: block;
    }

    .main {
        display: block;
    }

    .content {
        padding: 0;
    }

    .card,
    .report-area,
    .stat-card,
    .card-inner {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.terminal-card {
    background: #0f172a;
    color: #e5e7eb;
}

.terminal-card .card-title {
    color: #fff;
}


.rf-terminal {
    background: #020617;
    color: #22c55e;

    padding: 20px;
    border-radius: 10px;

    min-height: 300px;
    max-height: 600px;

    overflow-y: auto;

    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.7;

    white-space: pre-wrap;
    word-break: break-word;
}
.terminal-success {
    color: #38bdf8;
    font-weight: bold;
}

.terminal-error {
    color: #ef4444;
    font-weight: bold;
}

/* ==========================
   MOBILE
========================== */

@media (max-width: 992px) {

    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width: 576px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 15px;
    }

    .topbar {
        padding: 15px;
    }
}