* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.w-100 {
    width: 100%;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.overflow-auto {
    overflow: auto;
}

/* Header & Navigation */
header {
    background: #2c3e50;
    color: white;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: relative;
}

.nav-brand {
    font-size: 24px;
    font-weight: bold;
    z-index: 1001;
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-menu a:hover {
    background: #34495e;
}

.nav-menu a.active {
    background: #e67e22 !important;
    font-weight: 600 !important;
}

.dropdown-menu a.active {
    background: #e67e22 !important;
    font-weight: 600 !important;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}


/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.btn-primary {
    background: #3498db;
}

.btn-success {
    background: #27ae60;
}

.btn-danger {
    background: #e74c3c;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.login-box h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

.login-box h2 {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 18px;
}

/* Kasir Layout */
.kasir-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.produk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.produk-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #ecf0f1;
    cursor: pointer;
    transition: all 0.3s;
}

.produk-card:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.produk-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.produk-card .harga {
    color: #27ae60;
    font-weight: bold;
    font-size: 18px;
}

.produk-card .stok {
    color: #7f8c8d;
    font-size: 12px;
}

.keranjang-section {
    position: sticky;
    top: 20px;
}

#keranjang {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.keranjang-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.total-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}

.total-section h3 {
    margin-bottom: 10px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header > div {
    display: flex;
    gap: 10px;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Alert */
.alert {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Filter Form */
.filter-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    /* Navigation Mobile */
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: #2c3e50;
        width: 100%;
        text-align: left;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 20px;
        gap: 0;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0;
        border-bottom: 1px solid #34495e;
    }
    
    .nav-menu a {
        display: block;
        padding: 15px;
        border-radius: 0;
    }
    
    .nav-user {
        position: fixed;
        bottom: 0;
        left: -100%;
        width: 100%;
        background: #34495e;
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        transition: 0.3s;
        z-index: 999;
    }
    
    .nav-user.active {
        left: 0;
    }
    
    .nav-user span {
        font-size: 14px;
    }
    
    .nav-brand {
        font-size: 20px;
    }
    
    /* Dropdown Mobile */
    .dropdown-menu {
        position: static;
        display: none;
        background: #34495e;
        box-shadow: none;
        padding-left: 20px;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-toggle::after {
        content: ' ▼';
        font-size: 10px;
    }
    
    .dropdown.active .dropdown-toggle::after {
        content: ' ▲';
    }
    
    /* Container */
    .container {
        padding: 10px;
    }
    
    /* Kasir Layout */
    .kasir-layout {
        grid-template-columns: 1fr;
    }
    
    .keranjang-section {
        position: static;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Produk Grid */
    .produk-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .produk-card {
        padding: 10px;
    }
    
    .produk-card h3 {
        font-size: 14px;
    }
    
    .produk-card .harga {
        font-size: 16px;
    }
    
    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 8px;
        white-space: nowrap;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .btn-sm {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .page-header > div {
        width: 100%;
        flex-wrap: wrap;
    }
    
    /* Form Actions */
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* Filter Form */
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-form .form-group {
        width: 100%;
    }
    
    /* Cards */
    .card {
        padding: 15px;
    }
    
    /* Metode Grid */
    .metode-grid {
        grid-template-columns: 1fr;
    }
    
    /* Shift Info Grid */
    .shift-info-grid {
        grid-template-columns: 1fr !important;
    }
    
    .shift-actions {
        flex-direction: column;
    }
    
    .shift-actions .btn {
        width: 100%;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    /* Login */
    .login-box {
        padding: 30px 20px;
    }
    
    /* Stat Number */
    .stat-number {
        font-size: 24px;
    }
    
    /* Hide on mobile */
    .hide-mobile {
        display: none !important;
    }
}

/* Textarea */
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

/* Select */
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: white;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-cash {
    background: #27ae60;
    color: white;
}

.badge-debit-card {
    background: #3498db;
    color: white;
}

.badge-kartu-kredit {
    background: #9b59b6;
    color: white;
}

.badge-qris {
    background: #e74c3c;
    color: white;
}

/* Metode Grid */
.metode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.metode-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.metode-card h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.metode-count {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 5px;
}

.metode-total {
    color: #27ae60;
    font-weight: bold;
    font-size: 18px;
}

/* Badge Kas */
.badge-masuk {
    background: #27ae60;
    color: white;
}

.badge-keluar {
    background: #e74c3c;
    color: white;
}

/* Text Colors */
.text-success {
    color: #27ae60;
    font-weight: bold;
}

.text-danger {
    color: #e74c3c;
    font-weight: bold;
}

/* Badge Role */
.badge-role-administrator {
    background: #e74c3c;
    color: white;
}

.badge-role-admin {
    background: #3498db;
    color: white;
}

.badge-role-kasir {
    background: #95a5a6;
    color: white;
}

/* Nav User Small Text */
.nav-user small {
    font-size: 11px;
    opacity: 0.8;
}

/* Alert Success */
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* File Input */
input[type="file"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
}

/* Small Text */
small {
    color: #7f8c8d;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

/* Checkbox Custom */
input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Label with checkbox */
label {
    cursor: pointer;
}

/* Image Preview */
img {
    max-width: 100%;
    height: auto;
}

/* Produk Card with Image */
.produk-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Table Image */
table img {
    display: block;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #34495e;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 150px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background: #2c3e50;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    header, nav {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    table {
        page-break-inside: auto;
    }
    
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}
