* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #dc3002;
    --primary-dark: #b82800;
    --bg: #f5f5f5;
    --white: #fff;
    --text: #333;
    --text-light: #666;
    --border: #ddd;
    --danger: #e63946;
    --radius: 8px;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }
html { overflow-x: hidden; }

.header { background: var(--primary); color: var(--white); padding: 0.8rem max(1rem, calc((100% - 1200px) / 2)); display: flex; justify-content: space-between; align-items: center; }
.header nav { display: flex; gap: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.3); }
.header nav a { color: var(--white); text-decoration: none; margin-left: 0; padding: 0.45rem 1rem; font-size: 0.9rem; font-weight: 600; transition: all 0.15s; border-right: 1px solid rgba(255,255,255,0.2); text-align: center; }
.header nav a:last-child { border-right: none; }
.header nav a:hover { background: rgba(255,255,255,0.15); }

.container { max-width: 1200px; margin: 0 auto; padding: 1rem; overflow-x: hidden; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1); cursor: pointer; transition: transform 0.2s; }
.card:hover { transform: translateY(-2px); }
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1rem; }
.card-body h3 { margin-bottom: 0.5rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.3rem; font-weight: 500; color: var(--primary); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.6rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; }
.form-group input[type="date"], .form-group input[type="time"] { min-height: 2.5rem; }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

.btn { padding: 0.7rem 1.5rem; border: none; border-radius: var(--radius); cursor: pointer; font-size: 1rem; font-weight: 500; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }

.login-container { max-width: 400px; margin: 4rem auto; padding: 2rem; background: var(--white); border-radius: var(--radius); box-shadow: 0 2px 16px rgba(0,0,0,0.1); text-align: center; width: calc(100% - 2rem); }

.voucher { width: 700px; min-width: 700px; margin: 0 auto; background: var(--white); padding: 0; font-family: 'Montserrat', Arial, sans-serif; font-weight: 600; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.voucher-header { text-align: center; }
.voucher-row { display: flex; padding: 0.35rem 1rem; border-top: 1px solid var(--border); }
.voucher-label { width: 30%; font-weight: 900; color: var(--primary); font-size: 0.9rem; }
.voucher-value { width: 70%; font-size: 1rem; font-weight: 700; }
.voucher-section { padding: 0.6rem 1rem 0.3rem; border-top: 1px solid var(--border); margin-top: 0.3rem; }
.voucher-section h4 { color: var(--primary); margin-bottom: 0.15rem; font-size: 0.95rem; font-weight: 900; }
.voucher-section p { font-size: 0.9rem; line-height: 1.35; font-weight: 700; }
.voucher-quantity { display: flex; justify-content: space-between; padding: 0.15rem 1rem; text-align: center; border-top: 1px solid var(--border); }
.voucher-quantity div { flex: 1; }
.voucher-quantity .qty-label { font-weight: 900; font-size: 0.9rem; color: var(--primary); }
.voucher-quantity .qty-value { font-size: 1rem; font-weight: 700; }

table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
th { background: var(--primary); color: var(--white); padding: 0.8rem; text-align: left; }
td { padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--border); }
tr:hover { background: #fdf0ee; }

.admin-nav { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.admin-nav a { padding: 0.5rem 1rem; background: var(--white); border-radius: var(--radius); text-decoration: none; color: var(--text); border: 1px solid var(--border); }
.admin-nav a.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal-overlay.active { display: flex; }
.modal { background: var(--white); border-radius: var(--radius); padding: 2rem; max-width: 600px; width: 90%; max-height: 90vh; overflow-y: auto; }

.alert { padding: 0.8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-error { background: #fde8e8; color: var(--danger); }
.alert-success { background: #e8fde8; color: #2d6a2d; }

@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .header { flex-direction: column; gap: 0; align-items: center; padding: 0.6rem 1rem; }
    .header nav { gap: 0; width: 100%; border-radius: var(--radius); }
    .header nav a { flex: 1; font-size: 0.85rem; padding: 0.45rem 0.5rem; }
    .container { padding: 0.7rem; }
    .cards { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .card img { height: 120px; }
    .card-body { padding: 0.6rem; }
    .card-body h3 { font-size: 0.9rem; }
    .login-container { margin: 2rem auto; padding: 1.5rem; }
    .btn { padding: 0.6rem 1rem; font-size: 0.9rem; }
    table { font-size: 0.8rem; }
    th { padding: 0.5rem; }
    td { padding: 0.4rem 0.5rem; }
    .modal { padding: 1.2rem; width: 95%; }
    .admin-nav { gap: 0.3rem; margin-bottom: 1rem; }
    .admin-nav a { padding: 0.4rem 0.6rem; font-size: 0.85rem; }
    h2 { font-size: 1.2rem; }
    .no-transfer-row { font-size: 0.9rem; }
    .form-group label { font-size: 0.85rem; }
    .form-group input, .form-group select, .form-group textarea { font-size: 16px; padding: 0.5rem; }
}
