:root {
    --primary: #ff6600;
    --primary-dark: #cc5200;
    --black: #000000;
    --white: #ffffff;
    --bg-light: #f5f6f8;
    --text-muted: #6c757d;
    --border-soft: #ececec;
}

body {
    background: var(--bg-light);
    color: #212529;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.layout-wrapper {
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    background: #050505;
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    padding: 1rem;
    box-shadow: 4px 0 18px rgba(0, 0, 0, 0.12);
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.brand-box span {
    color: var(--primary);
}

.brand-logo {
    max-width: 210px;
    max-height: 68px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.menu-title {
    color: #9e9e9e;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 1.5rem 0 0.75rem;
}

.sidebar .nav-link {
    color: #f2f2f2;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: 0.2s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: var(--primary);
    color: var(--white);
}

.sidebar-contact {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.sidebar-contact strong {
    color: var(--primary);
}

.sidebar-activity {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.sidebar-activity strong {
    color: var(--primary);
}

.activity-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-main {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.activity-protocol {
    font-family: "Courier New", Courier, monospace;
    color: #fff;
    font-weight: 700;
}

.activity-status {
    color: #ffd8b5;
    font-size: 0.76rem;
}

.activity-meta {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    line-height: 1.3;
}

.main-content {
    margin-left: 260px;
    min-height: 100vh;
}

.topbar {
    background: var(--black);
    color: var(--white);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
}

.topbar-user .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
}

.page-container {
    padding: 1.75rem;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.content-card,
.summary-card,
.filter-card,
.info-card {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(16, 24, 40, 0.05);
}

.summary-card {
    padding: 1.25rem;
    height: 100%;
}

.summary-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 0.9rem;
}

.icon-orange { background: rgba(255, 102, 0, 0.15); color: var(--primary); }
.icon-green { background: rgba(25, 135, 84, 0.15); color: #198754; }
.icon-red { background: rgba(220, 53, 69, 0.15); color: #dc3545; }
.icon-yellow { background: rgba(255, 193, 7, 0.18); color: #a07900; }

.summary-label {
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.summary-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.btn-primary-custom {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.btn-primary-custom:hover,
.btn-primary-custom:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

.btn-outline-custom {
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline-custom:hover {
    background: var(--primary);
    color: var(--white);
}

.table thead th {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
    white-space: nowrap;
}

.table tbody tr:nth-child(even) {
    background: #fafafa;
}

.table tbody td {
    vertical-align: middle;
}

.badge-soft {
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
}

.action-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-label {
    font-weight: 600;
}

.form-control,
.form-select,
textarea {
    border-radius: 12px;
    border-color: #dcdcdc;
    padding: 0.75rem 0.9rem;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: rgba(255, 102, 0, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(255, 102, 0, 0.15);
}

.info-card {
    padding: 1.4rem;
    margin-bottom: 1rem;
}

.data-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
}

.data-item small {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.receipt-sheet {
    max-width: 820px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 10px 25px rgba(16, 24, 40, 0.08);
    padding: 2rem;
}

.receipt-header {
    border-bottom: 2px dashed #cfcfcf;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f1f1;
}

.receipt-row strong {
    color: var(--text-muted);
}

.thermal-wrap {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.thermal-receipt {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1.1rem 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    font-family: "Courier New", Courier, monospace;
    font-size: 1rem;
    color: #111;
}

.thermal-header {
    text-align: center;
}

.thermal-logo {
    max-width: 170px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto 0.45rem;
    display: block;
}

.thermal-logo-placeholder {
    border: 1px dashed #bbb;
    border-radius: 8px;
    font-size: 0.75rem;
    padding: 0.45rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.06em;
}

.thermal-title {
    font-size: 1.15rem;
    margin: 0;
    letter-spacing: 0.08em;
}

.thermal-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
}

.thermal-divider {
    border-top: 1px dashed #bbb;
    margin: 0.65rem 0;
}

.thermal-receipt .receipt-row {
    border: none;
    padding: 0.38rem 0;
    font-size: 1rem;
}

.thermal-receipt .receipt-row strong {
    color: #111;
    text-align: right;
}

.thermal-notes {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.45;
}

.thermal-footer {
    margin-top: 0.9rem;
    text-align: center;
    font-size: 0.9rem;
}

.thermal-footer p {
    margin: 0.2rem 0;
}

.print-hide {
    display: block;
}

@media (max-width: 991px) {
    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .data-list {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: 80mm auto;
        margin: 0;
    }

    body {
        background: #fff;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-hide,
    .sidebar,
    .topbar {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .page-container {
        padding: 0;
    }

    .receipt-sheet {
        box-shadow: none;
        border: none;
        max-width: 100%;
        padding: 0;
    }

    .thermal-wrap {
        display: block;
        width: 80mm;
        margin: 0 auto;
    }

    .thermal-receipt {
        max-width: 76mm;
        width: 76mm;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 1.5mm 2mm;
        font-size: 11pt;
        line-height: 1.35;
    }

    .thermal-title {
        font-size: 12pt;
    }

    .thermal-subtitle,
    .thermal-footer {
        font-size: 10pt;
    }

    .thermal-receipt .receipt-row,
    .thermal-notes {
        font-size: 10.5pt;
    }
}
