/* ============================================
   ManproApp - Style CSS
   Tampilan profesional bersih
   Warna: Biru Tua, Putih, Abu-abu
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: #1a5276;
}

a:hover {
    text-decoration: underline;
}

/* ============ LAYOUT UTAMA ============ */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ============ MOBILE TOPBAR (hidden on desktop) ============ */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(180deg, #0c2340 0%, #1a3a5c 100%);
    color: #fff;
    z-index: 1100;
    align-items: center;
    padding: 0 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.mobile-topbar .mobile-topbar-title {
    font-size: 16px;
    font-weight: 600;
    margin-left: 8px;
    letter-spacing: 0.5px;
}

.hamburger-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.hamburger-btn:hover,
.hamburger-btn:focus {
    background: rgba(255,255,255,0.1);
    outline: none;
}

.hamburger-icon {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: all 0.2s;
}

/* ============ SIDEBAR BACKDROP ============ */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* ============ SIDEBAR CLOSE BUTTON ============ */
.sidebar-close {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.sidebar-close:hover {
    background: rgba(255,255,255,0.25);
}

/* ============ SIDEBAR ============ */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #0c2340 0%, #1a3a5c 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand img {
    max-width: 60px;
    width: 60px;
    height: auto;
    margin-bottom: 8px;
    border-radius: 8px;
}

.sidebar-brand h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.sidebar-brand p {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
    border-left-color: #3498db;
}

.sidebar-menu li a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-left-color: #3498db;
    font-weight: 600;
}

.sidebar-menu li a .icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-menu .menu-label {
    padding: 15px 20px 5px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

.sidebar-menu .submenu {
    list-style: none;
    padding: 0;
    display: none;
}

.sidebar-menu li.open .submenu {
    display: block;
}

.sidebar-menu .submenu li a {
    padding: 8px 20px 8px 56px;
    font-size: 12px;
}

.sidebar-menu .submenu li a:hover,
.sidebar-menu .submenu li a.active {
    border-left-color: #5dade2;
}

.sidebar-user {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.15);
}

.sidebar-user .user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.sidebar-user .user-level {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

.sidebar-user a {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
}

.sidebar-user a:hover {
    color: #fff;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============ HEADER ============ */
.header {
    background: #fff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header h1 {
    font-size: 18px;
    color: #1a3a5c;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right .user-info {
    font-size: 13px;
    color: #666;
}

.header-right a.btn-logout {
    padding: 6px 16px;
    background: #e74c3c;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    transition: background 0.2s;
}

.header-right a.btn-logout:hover {
    background: #c0392b;
    text-decoration: none;
}

/* ============ CONTENT AREA ============ */
.content {
    padding: 25px;
    flex: 1;
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
    font-size: 12px;
    color: #888;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #1a5276;
}

/* ============ CARD / PANEL ============ */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background: #1a3a5c;
    color: #fff;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header a {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    font-weight: 400;
}

.card-header a:hover {
    color: #fff;
}

.card-body {
    padding: 20px;
}

/* ============ DASHBOARD STATS ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border-left: 4px solid #1a3a5c;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-card.blue { border-left-color: #2980b9; }
.stat-card.green { border-left-color: #27ae60; }
.stat-card.orange { border-left-color: #e67e22; }
.stat-card.purple { border-left-color: #8e44ad; }
.stat-card.red { border-left-color: #e74c3c; }

.stat-card .stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a3a5c;
}

.stat-card .stat-desc {
    font-size: 11px;
    color: #aaa;
    margin-top: 5px;
}

/* ============ TABLE ============ */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table thead {
    background: #f8f9fa;
}

table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #1a3a5c;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

table td {
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    color: #444;
}

table tbody tr:hover {
    background: #f8fafc;
}

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

table tbody tr:nth-child(even):hover {
    background: #f0f4f8;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-block;
    padding: 8px 18px;
    font-size: 13px;
    font-family: inherit;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-weight: 500;
}

.btn:hover {
    text-decoration: none;
    opacity: 0.9;
}

.btn-primary {
    background: #2980b9;
    color: #fff;
}

.btn-primary:hover {
    background: #1a6da0;
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background: #1e8c4c;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
    color: #fff;
}

.btn-warning:hover {
    background: #d68910;
}

.btn-info {
    background: #17a2b8;
    color: #fff;
}

.btn-info:hover {
    background: #138496;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ============ FORMS ============ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41,128,185,0.1);
}

select.form-control {
    appearance: auto;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

/* ============ SEARCH BOX ============ */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.search-box input {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    width: 300px;
}

.search-box input:focus {
    outline: none;
    border-color: #2980b9;
}

/* ============ ALERT / MESSAGE ============ */
.alert {
    padding: 12px 18px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 13px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ============ PAGINATION (sederhana) ============ */
.pagination {
    display: flex;
    gap: 5px;
    margin-top: 15px;
    justify-content: center;
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
}

.pagination a:hover {
    background: #2980b9;
    color: #fff;
    text-decoration: none;
}

.pagination .active {
    background: #1a3a5c;
    color: #fff;
    border-color: #1a3a5c;
}

/* ============ LOGIN PAGE ============ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0c2340 0%, #1a3a5c 50%, #2980b9 100%);
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #0c2340, #1a3a5c);
    padding: 30px;
    text-align: center;
    color: #fff;
}

.login-header img {
    max-width: 80px;
    width: 80px;
    height: auto;
    margin-bottom: 10px;
    border-radius: 10px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.login-header p {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-top: 5px;
}

.login-body {
    padding: 30px;
}

.login-body .form-group {
    margin-bottom: 20px;
}

.login-body .btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
}

/* ============ PRINT STYLES ============ */
.print-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.print-header h2 {
    font-size: 18px;
    color: #333;
}

.print-header p {
    font-size: 12px;
    color: #666;
}

.print-info {
    margin-bottom: 15px;
    font-size: 13px;
}

@media print {
    .sidebar, .header, .no-print, .btn {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
    .content {
        padding: 0 !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    .card-header {
        background: #f8f9fa !important;
        color: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    body {
        background: #fff;
        font-size: 11px;
    }
    table {
        font-size: 11px;
    }
    table th, table td {
        padding: 6px 8px;
    }
}

/* ============ FILTER FORM (Laporan) ============ */
.filter-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.filter-form .form-group {
    margin-bottom: 0;
}

.filter-form .form-group label {
    font-size: 12px;
    color: #666;
}

.filter-form input {
    padding: 7px 12px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: inherit;
}

/* ============ DASHBOARD 2-COLUMN GRID (responsive) ============ */
.dashboard-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============ RESPONSIVE - MOBILE / ANDROID ============ */

/* Tablet & small desktop (<= 768px) - sidebar collapses to off-canvas */
@media screen and (max-width: 768px) {
    /* Show mobile topbar with hamburger */
    .mobile-topbar {
        display: flex;
    }
    /* Show sidebar close button */
    .sidebar-close {
        display: flex;
    }

    /* V6.0: Show bottom navigation */
    .bottom-nav {
        display: flex;
    }

    /* V6.0: Show sidebar expand/collapse all buttons */
    .sidebar-mobile-actions {
        display: flex;
    }

    /* Sidebar becomes off-canvas drawer */
    .sidebar {
        transform: translateX(-100%);
        width: 270px;
        box-shadow: 2px 0 12px rgba(0,0,0,0.3);
    }
    .sidebar.show {
        transform: translateX(0);
    }

    /* Body lock when sidebar open (prevent background scroll) */
    body.sidebar-open {
        overflow: hidden;
    }

    /* Main content takes full width, offset for mobile topbar + bottom nav */
    .main-content {
        margin-left: 0;
        padding-top: 56px;
        padding-bottom: 70px; /* space for bottom nav */
    }

    /* Header sits below mobile topbar */
    .header {
        padding: 12px 15px;
        position: sticky;
        top: 56px;
    }

    .content {
        padding: 15px 12px;
    }

    /* Stat cards: 2 columns on tablet, 1 on phone (handled by 480 breakpoint) */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Dashboard 2-column grid: stack on tablet/phone */
    .dashboard-grid-2col {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Form rows: single column */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Search box: stack vertically */
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box input {
        width: 100%;
    }

    /* Filter form: stack vertically */
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-form .form-group {
        width: 100%;
    }
    .filter-form input,
    .filter-form select {
        width: 100%;
    }

    /* Touch-friendly buttons: larger tap target */
    .btn {
        padding: 11px 18px;
        font-size: 14px;
    }
    .btn-sm {
        padding: 8px 14px;
        font-size: 13px;
    }

    /* Button group: stack on narrow screens */
    .btn-group {
        flex-direction: column;
        gap: 8px;
    }
    .btn-group .btn {
        width: 100%;
    }

    /* Card header: stack title and actions */
    .card-header {
        padding: 12px 15px;
        font-size: 13px;
    }
    .card-body {
        padding: 15px 12px;
    }

    /* Tables: smaller padding, ensure horizontal scroll works */
    table {
        font-size: 12px;
    }
    table th {
        padding: 8px 10px;
        font-size: 11px;
    }
    table td {
        padding: 8px 10px;
    }

    /* Stat card value a bit smaller on tablet */
    .stat-card {
        padding: 15px;
    }
    .stat-card .stat-value {
        font-size: 22px;
    }

    /* Header right: hide user name on narrow screens, keep logout button */
    .header-right .user-info {
        display: none;
    }

    /* Foto thumbnail: prevent crazy hover scale on touch */
    .foto-thumb:hover {
        transform: scale(1.5);
    }

    /* Sticky header stacks */
    .header {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Login page: smaller padding */
    .login-body {
        padding: 20px;
    }
    .login-header {
        padding: 22px 18px;
    }
    .login-header h1 {
        font-size: 20px;
    }
}

/* Phone (<= 480px) - smaller phones like Android */
@media screen and (max-width: 480px) {
    body {
        font-size: 13px;
    }

    .mobile-topbar .mobile-topbar-title {
        font-size: 15px;
    }

    /* Stat cards: single column on phone */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card .stat-value {
        font-size: 20px;
    }

    /* Header h1 smaller */
    .header h1 {
        font-size: 15px;
    }

    /* Card header: title and actions stacked */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .card-header > div {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .card-header .btn {
        flex: 1 1 auto;
        text-align: center;
    }

    /* Content tighter padding */
    .content {
        padding: 12px 10px;
    }

    /* Header tighter */
    .header {
        padding: 10px 12px;
    }

    /* Tables: very small font, but keep readable */
    table {
        font-size: 11px;
    }
    table th {
        padding: 6px 8px;
        font-size: 10px;
    }
    table td {
        padding: 6px 8px;
    }

    /* Action button group inside table cells: stack and full width */
    .btn-group {
        gap: 4px;
    }
    .btn-group .btn {
        padding: 6px 8px;
        font-size: 11px;
    }

    /* Search button full width */
    .search-box .btn {
        width: 100%;
    }

    /* Filter form button full width */
    .filter-form .btn {
        width: 100%;
    }

    /* Form actions: stack buttons */
    .form-actions {
        flex-direction: column;
        gap: 8px;
    }
    .form-actions .btn {
        width: 100%;
    }

    /* Login box: take near-full width */
    .login-wrapper {
        padding: 12px;
    }
    .login-box {
        max-width: 100%;
    }
    .login-body {
        padding: 18px 15px;
    }
    .login-header {
        padding: 18px 12px;
    }
    .login-header h1 {
        font-size: 18px;
    }
    .login-header img {
        width: 60px;
        max-width: 60px;
    }

    /* Foto thumb: smaller on phone */
    .foto-thumb,
    .foto-thumb-placeholder {
        width: 36px;
        height: 36px;
    }

    /* Back link: tap friendly */
    .back-link {
        display: inline-block;
        padding: 6px 0;
        font-size: 14px;
    }

    /* V6.0: Menu grid - 2 columns on phone */
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .menu-grid-item {
        padding: 14px 6px;
        min-height: 90px;
    }

    .menu-grid-icon {
        font-size: 24px;
    }

    .menu-grid-label {
        font-size: 11px;
    }

    /* V6.0: Notif dropdown full width on phone */
    .notif-dropdown {
        right: 4px;
        left: 4px;
        width: auto;
        max-width: none;
    }

    /* V6.0: Bottom nav labels smaller */
    .bottom-nav-label {
        font-size: 9px;
    }

    .bottom-nav-icon {
        font-size: 18px;
    }

    /* V6.0: Toast container above bottom nav on mobile */
    .toast-container {
        left: 8px;
        right: 8px;
        bottom: 70px;
        width: auto;
        max-width: none;
    }
}

/* Very small phones (<= 360px) - tiny Android devices */
@media screen and (max-width: 360px) {
    .header h1 {
        font-size: 14px;
    }
    .stat-card .stat-value {
        font-size: 18px;
    }
    table {
        font-size: 10px;
    }
    table th,
    table td {
        padding: 5px 6px;
    }
}

/* Landscape mode on phones - allow wider layout */
@media screen and (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
    .sidebar-brand {
        padding: 10px 15px;
    }
    .sidebar-brand img {
        width: 40px !important;
        height: 40px !important;
    }
    .sidebar-brand h2 {
        font-size: 16px;
    }
    .sidebar-menu li a {
        padding: 8px 18px;
    }
}

/* ============ UTILITY ============ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-danger { color: #e74c3c; }
.text-success { color: #27ae60; }
.text-warning { color: #f39c12; }
.text-muted { color: #888; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.fw-bold { font-weight: 700; }
.danger-row { background: #fff5f5 !important; }

/* Stok warning */
.stok-warning {
    color: #e74c3c;
    font-weight: 700;
}

.stok-safe {
    color: #27ae60;
    font-weight: 600;
}

/* Detail table in produksi */
.detail-table {
    margin-top: 15px;
}

.detail-table table {
    font-size: 12px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* Back link */
.back-link {
    display: inline-block;
    margin-bottom: 15px;
    font-size: 13px;
    color: #1a5276;
}

.back-link:hover {
    text-decoration: underline;
}

/* ============================================
   Struktur Folder Aplikasi (Dashboard)
   ============================================ */
.folder-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.folder-table thead th {
    background-color: #1a5276;
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid #154360;
}

.folder-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

.folder-table tbody tr:hover {
    background-color: #f5f8fb;
}

.folder-table .folder-row {
    background-color: #eaf2f8;
    font-weight: 600;
}

.folder-table .folder-row:hover {
    background-color: #d4e6f1;
}

.folder-icon {
    font-size: 16px;
    margin-right: 6px;
}

.file-icon {
    display: inline-block;
    padding: 1px 8px;
    background-color: #eaecee;
    border: 1px solid #ccd1d1;
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    color: #555;
    margin-right: 4px;
}

.file-icon-php {
    display: inline-block;
    padding: 1px 8px;
    background-color: #e8f6f3;
    border: 1px solid #a3d9cc;
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    color: #117a65;
    margin-right: 4px;
}

.file-icon-css {
    display: inline-block;
    padding: 1px 8px;
    background-color: #fef9e7;
    border: 1px solid #f4d03f;
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    color: #7d6608;
    margin-right: 4px;
}

@media print {
    .folder-table {
        font-size: 11px;
    }
    .folder-table thead th {
        padding: 6px 8px;
    }
    .folder-table tbody td {
        padding: 5px 8px;
    }
}

/* ============ FOTO / IMAGE STYLES ============ */
.foto-thumb {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: transform 0.2s;
}

.foto-thumb:hover {
    transform: scale(2.5);
    border-color: #2980b9;
    z-index: 1000;
    position: relative;
}

.foto-thumb-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    background: #f0f2f5;
    border: 2px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 14px;
}

.foto-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    object-fit: cover;
}

.foto-preview-container {
    margin-top: 10px;
    text-align: left;
}

/* ============ BADGE KATEGORI ============ */
.badge-kategori {
    display: inline-block;
    padding: 3px 10px;
    background: #eaf2f8;
    color: #1a5276;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #b8d4e8;
}

/* ============ STAT CARD RED (RUSAK) ============ */
.stat-card.red {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.stat-card.red .stat-value {
    color: #c0392b;
}

/* ============ STAT CARD ORANGE (Bahan Rusak) ============ */
.stat-card.orange {
    border-left-color: #e67e22;
}

/* ============================================================
   V6.0 — BOTTOM NAVIGATION (mobile only)
   ============================================================ */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #1a3a5c 0%, #0c2340 100%);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 1100;
    padding: 0;
    margin: 0;
    height: 60px;
    justify-content: space-around;
    align-items: stretch;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 6px 2px;
    font-size: 10px;
    transition: all 0.2s;
    border-top: 3px solid transparent;
    min-width: 0;
}

.bottom-nav-item:hover {
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,0.05);
}

.bottom-nav-item[data-active="1"] {
    color: #fff;
    border-top-color: #3498db;
    background: rgba(255,255,255,0.08);
}

.bottom-nav-icon {
    font-size: 20px;
    line-height: 1;
    margin-bottom: 4px;
}

.bottom-nav-label {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
}

/* ============================================================
   V6.0 — NOTIFICATION BELL + DROPDOWN
   ============================================================ */
.notif-bell-btn {
    position: relative;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.notif-bell-btn:hover {
    background: rgba(255,255,255,0.1);
}

.notif-bell-icon {
    font-size: 18px;
    line-height: 1;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #0c2340;
    box-sizing: content-box;
}

.notif-dropdown {
    position: fixed;
    top: 56px;
    right: 8px;
    width: 320px;
    max-width: calc(100vw - 16px);
    max-height: 70vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    z-index: 1150;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.notif-dropdown-header {
    background: #1a3a5c;
    color: #fff;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.notif-dropdown-header button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.notif-dropdown-header button:hover {
    background: rgba(255,255,255,0.15);
}

.notif-dropdown-body {
    overflow-y: auto;
    flex: 1;
    background: #fff;
}

.notif-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    line-height: 1.4;
}

.notif-item:hover {
    background: #f8f9fa;
}

.notif-item.notif-bahan {
    border-left: 3px solid #2980b9;
}

.notif-item.notif-produk {
    border-left: 3px solid #27ae60;
}

.notif-item-jenis {
    display: inline-block;
    background: #eaf2f8;
    color: #1a5276;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.notif-item.notif-produk .notif-item-jenis {
    background: #e8f6ef;
    color: #117a65;
}

.notif-item-kode {
    font-weight: 700;
    color: #1a3a5c;
    font-size: 12px;
}

.notif-item-nama {
    color: #444;
    font-size: 12px;
    margin: 2px 0;
}

.notif-item-stok {
    color: #e74c3c;
    font-size: 11px;
}

.notif-dropdown-footer {
    padding: 10px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* ============================================================
   V6.0 — TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: auto;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: 360px;
    max-width: calc(100vw - 32px);
}

.toast {
    background: #1a3a5c;
    color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(0);
    max-width: 100%;
}

.toast.toast-hide {
    opacity: 0;
    transform: translateY(20px);
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-msg {
    flex: 1;
    line-height: 1.4;
}

.toast-success { background: #27ae60; }
.toast-danger  { background: #e74c3c; }
.toast-warning { background: #f39c12; color: #fff; }
.toast-info    { background: #2980b9; }

/* ============================================================
   V6.0 — SIDEBAR MOBILE ACTIONS (Expand/Collapse All)
   ============================================================ */
.sidebar-mobile-actions {
    display: none;
    padding: 8px 12px;
    background: rgba(0,0,0,0.2);
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-action-btn {
    flex: 1;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}

.sidebar-action-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Sidebar badge for notification count */
.sidebar-badge {
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    line-height: 1;
}

.sidebar-menu li a .sidebar-badge {
    margin-left: auto;
}

/* ============================================================
   V6.0 — MENU GRID (Semua Menu page)
   ============================================================ */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.menu-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #1a3a5c;
    transition: all 0.2s;
    text-align: center;
    min-height: 100px;
}

.menu-grid-item:hover {
    background: #eaf2f8;
    border-color: #2980b9;
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.menu-grid-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 8px;
}

.menu-grid-label {
    font-size: 12px;
    font-weight: 600;
    color: #1a3a5c;
    line-height: 1.3;
}

/* ============================================================
   V6.0 — BADGES (status pills)
   ============================================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

.badge-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.badge-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.badge-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }
.badge-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.badge-secondary { background: #e2e3e5; color: #383d41; border: 1px solid #d6d8db; }

/* ============================================================
   V7.0 — SETTING PAGE
   ============================================================ */
.setting-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    flex-wrap: wrap;
    border-bottom: 2px solid #1a3a5c;
}

.setting-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f0f2f5;
    color: #555;
    border: 1px solid #d1d5db;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.setting-tab:hover {
    background: #e8ecef;
    color: #1a3a5c;
    text-decoration: none;
}

.setting-tab.active {
    background: #1a3a5c;
    color: #fff;
    border-color: #1a3a5c;
}

.setting-tab-icon {
    font-size: 16px;
}

.setting-logo-section {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.setting-logo-preview {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border: 2px dashed #b0bec5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.setting-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.setting-logo-info {
    flex: 1;
    min-width: 240px;
}

.setting-logo-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #1a3a5c;
}

@media screen and (max-width: 480px) {
    .setting-tabs {
        flex-direction: column;
        border-bottom: none;
    }
    .setting-tab {
        width: 100%;
        border-radius: 4px;
        border: 1px solid #d1d5db;
        margin-bottom: 4px;
        padding: 10px 14px;
    }
    .setting-logo-section {
        flex-direction: column;
        align-items: stretch;
    }
    .setting-logo-preview {
        width: 100%;
        height: 160px;
    }
}