/**
 * @project     Smart PBB
 * @author      PT. MNDS DIGITAL SOLUTION
 * @copyright   2026
 * @description Main Stylesheet & Thermal Print Configuration
 */

:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --bg-color: #f4f6f9;
    --text-color: #333;
    --border-color: #ddd;
    --error-color: #dc3545;
    --success-color: #28a745;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.bg-light {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.text-center { text-align: center; margin-bottom: 25px; }
.title { color: var(--primary-color); font-size: 24px; margin-bottom: 5px; }
.subtitle { font-size: 14px; color: #666; font-weight: bold; }

.input-group { margin-bottom: 15px; }
.input-group label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 14px; }
.input-group input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    outline: none;
}
.input-group input:focus { border-color: var(--primary-color); }

.btn {
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-primary:hover { background-color: var(--primary-hover); }
.w-100 { width: 100%; }

.alert-error {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8d7da;
    color: var(--error-color);
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
}

/* --- FORMAT DASHBOARD --- */
.container { width: 100%; max-width: 800px; margin: 0 auto; padding: 20px; }
.main-content { margin-top: 60px; }

.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}
.nav-brand { font-weight: bold; font-size: 18px; }

.btn-danger { background-color: var(--error-color); color: white; }
.btn-danger:hover { background-color: #c82333; }
.btn-sm { padding: 8px 15px; font-size: 14px; }

.welcome-card { margin-bottom: 25px; background: linear-gradient(135deg, #007bff, #0056b3); color: white; }
.welcome-card p { opacity: 0.9; margin-top: 5px; }

.grid-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.menu-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s;
}
.menu-card:active { transform: scale(0.95); }
.menu-icon { font-size: 40px; margin-bottom: 10px; }
.menu-title { font-weight: bold; font-size: 16px; margin-bottom: 5px; }
.menu-desc { font-size: 12px; color: #777; }

/* --- FORMAT CETAK STRUK THERMAL (58mm) --- */
@media print {
    body { margin: 0; padding: 0; background: white; }
    #areaWeb { display: none !important; } 
    #areaStruk { 
        display: block !important; 
        width: 58mm; 
        font-family: 'Courier New', Courier, monospace; 
        font-size: 12px;
        color: black;
        margin: 0;
    }
    .struk-header { text-align: center; margin-bottom: 10px; }
    .struk-header h3 { margin: 0; font-size: 14px; }
    .struk-header p { margin: 2px 0; }
    .struk-body p { margin: 4px 0; display: flex; justify-content: space-between; }
    .struk-footer { text-align: center; margin-top: 10px; }
    .struk-footer p { margin: 2px 0; }
}