* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f4f6f8; color: #222; }
.topbar { background: #1a5f3f; color: #fff; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.topbar h2 { font-size: 20px; }
.topbar a { color: #fff; text-decoration: none; margin-left: 15px; font-size: 14px; }
.back-btn { display: inline-block; background: rgba(255,255,255,0.15); color: #fff; text-decoration: none; padding: 4px 10px; border-radius: 6px; font-size: 14px; margin-right: 10px; margin-left: 0; vertical-align: middle; }
.back-btn:hover { background: rgba(255,255,255,0.28); }
.container { max-width: 1100px; margin: 20px auto; padding: 0 15px; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #fff; padding: 35px; border-radius: 10px; box-shadow: 0 2px 15px rgba(0,0,0,0.1); width: 320px; }
.login-box h1 { text-align: center; margin-bottom: 20px; font-size: 22px; color: #1a5f3f; }

label { display: block; margin: 12px 0 5px; font-weight: 600; font-size: 14px; }
input, select, textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 16px; }
input:focus, select:focus { outline: none; border-color: #1a5f3f; }
.btn { display: inline-block; padding: 10px 18px; border: none; border-radius: 6px; font-size: 15px; cursor: pointer; text-decoration: none; text-align: center; }
.btn-primary { background: #1a5f3f; color: #fff; }
.btn-primary:hover { background: #144a31; }
.btn-secondary { background: #e0e0e0; color: #333; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-block { width: 100%; margin-top: 15px; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; margin: 20px 0; }
.card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.card h3 { font-size: 14px; color: #666; margin-bottom: 8px; }
.card .value { font-size: 26px; font-weight: 700; color: #1a5f3f; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.menu-btn { background: #fff; border-radius: 10px; padding: 25px 15px; text-align: center; text-decoration: none; color: #222; box-shadow: 0 1px 4px rgba(0,0,0,0.08); font-weight: 600; }
.menu-btn:hover { background: #1a5f3f; color: #fff; }
.menu-btn .icon { font-size: 28px; display: block; margin-bottom: 8px; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
th { background: #1a5f3f; color: #fff; }
tr:hover { background: #f9f9f9; }
.status-green { color: #1a7f37; font-weight: 700; }
.status-red { color: #c0392b; font-weight: 700; }
.status-grey { color: #888; }

.alert { padding: 10px 15px; border-radius: 6px; margin-bottom: 15px; font-size: 14px; }
.alert-error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }
.alert-info { background: #e8f4fd; color: #1a5f3f; border: 1px solid #b8e0d2; }
.alert-success { background: #e6f7ec; color: #1a7f37; border: 1px solid #b8e0d2; }

.badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-done { background: #d4f4dd; color: #1a7f37; }
.badge-pending { background: #fde2e2; color: #c0392b; }
.badge-skip { background: #eee; color: #888; }

.flex-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.bill-80mm { width: 80mm; margin: 0 auto; font-family: 'Courier New', monospace; font-size: 12px; padding: 5px; }
.bill-58mm { width: 58mm; }
.bill-80mm h2 { text-align: center; font-size: 15px; margin-bottom: 3px; }
.bill-80mm .center { text-align: center; }
.bill-80mm .line { border-top: 1px dashed #000; margin: 6px 0; }
.bill-80mm table { width: 100%; font-size: 11px; }
.bill-80mm th, .bill-80mm td { padding: 2px; border: none; }
.bill-80mm .totals td { font-weight: bold; }
@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    .bill-80mm { width: 100%; }
    .page-break { page-break-after: always; }
}
