* { box-sizing: border-box; }
body { font-family: -apple-system, Segoe UI, Roboto, sans-serif; margin: 0; background: #f4f6f8; color: #1f2937; }
a { color: #2563eb; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px; }

.navbar { display: flex; align-items: center; justify-content: space-between; background: #111827; color: white; padding: 12px 24px; flex-wrap: wrap; gap: 12px; }
.navbar a { color: #e5e7eb; margin-right: 16px; }
.navbar a:hover { color: #fff; }
.nav-brand a { font-weight: 700; font-size: 1.1em; color: #fff; }
.nav-user span { margin-right: 12px; color: #9ca3af; font-size: 0.9em; }

.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: #111827; }
.login-box { background: white; padding: 32px; border-radius: 8px; width: 320px; box-shadow: 0 4px 24px rgba(0,0,0,0.2); }
.login-box h1 { font-size: 1.2em; margin-top: 0; }
.login-box label { display: block; margin-top: 12px; font-size: 0.85em; color: #6b7280; }
.login-box input { width: 100%; padding: 8px; margin-top: 4px; border: 1px solid #d1d5db; border-radius: 4px; }
.login-box button { margin-top: 20px; width: 100%; padding: 10px; background: #2563eb; color: white; border: none; border-radius: 4px; cursor: pointer; }
.error { color: #dc2626; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 20px; }
.card { background: white; padding: 24px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); text-align: center; font-weight: 600; }
.card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.15); }

table { width: 100%; border-collapse: collapse; margin-top: 16px; background: white; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e5e7eb; }
th { background: #f9fafb; font-size: 0.85em; text-transform: uppercase; color: #6b7280; }
tr:hover { background: #f9fafb; }

.btn { display: inline-block; padding: 8px 14px; background: #2563eb; color: white; border-radius: 4px; border: none; cursor: pointer; font-size: 0.9em; }
.btn.secondary { background: #6b7280; }
.btn.danger { background: #dc2626; }
.btn.small { padding: 4px 10px; font-size: 0.8em; }

.form-card { background: white; padding: 24px; border-radius: 8px; max-width: 600px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.form-card label { display: block; margin-top: 14px; font-size: 0.85em; color: #6b7280; }
.form-card input, .form-card select, .form-card textarea { width: 100%; padding: 8px; margin-top: 4px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.95em; }
.form-card .actions { margin-top: 20px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.badge { padding: 2px 8px; border-radius: 12px; font-size: 0.75em; font-weight: 600; }
.badge.active { background: #dcfce7; color: #166534; }
.badge.disabled { background: #fee2e2; color: #991b1b; }

.invoice-doc { background: white; padding: 32px; border-radius: 8px; max-width: 800px; }
.invoice-doc .total-row td { font-weight: 700; border-top: 2px solid #111827; }
.invoice-header { display: flex; justify-content: space-between; margin-bottom: 24px; }
.filter-bar { background: white; padding: 16px; border-radius: 8px; margin-bottom: 16px; display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.filter-bar label { font-size: 0.8em; color: #6b7280; display: block; }
.filter-bar input, .filter-bar select { padding: 6px; border: 1px solid #d1d5db; border-radius: 4px; }
