* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f3f4f6; color: #111827; }
a { color: inherit; text-decoration: none; }
table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; background: white; border-radius: 0.75rem; overflow: hidden; }
th, td { padding: 0.5rem 0.75rem; border-bottom: 1px solid #e5e7eb; font-size: 0.9rem; }
th { background: #f9fafb; text-align: left; }
tr:last-child td { border-bottom: none; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.5rem; background: #111827; color: white; }
.logo { font-weight: 600; letter-spacing: .04em; }
.topnav a { margin-right: 1rem; font-size: 0.95rem; opacity: 0.9; }
.topnav a:hover { opacity: 1; }
.user-info { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }

.container { max-width: 1100px; margin: 1.5rem auto 3rem; padding: 0 1rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-top: 1rem; }
.card { background: white; padding: 1rem 1.1rem; border-radius: 0.75rem; box-shadow: 0 8px 20px rgba(15,23,42,0.08); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15,23,42,0.12); }
.card h2 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.card p { font-size: 0.9rem; color: #6b7280; }

.grid-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 1.25rem; margin-top: 1rem; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.form-card { background: white; border-radius: 0.75rem; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
label { display: flex; flex-direction: column; font-size: 0.85rem; gap: 0.15rem; color: #374151; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], textarea, select {
  padding: 0.45rem 0.55rem; border-radius: 0.5rem; border: 1px solid #d1d5db; font-size: 0.9rem;
}
textarea { min-height: 80px; resize: vertical; }

.btn-primary, .btn-outline, .btn-small {
  border-radius: 999px; border: none; cursor: pointer; padding: 0.4rem 0.9rem; font-size: 0.85rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem;
}
.btn-primary { background: #2563eb; color: white; }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: transparent; border: 1px solid #9ca3af; color: #374151; }
.btn-small { background: #e5e7eb; color: #111827; padding: 0.25rem 0.6rem; }
.btn-small:hover { background: #d1d5db; }
.btn-small.btn-danger { background: #fee2e2; color: #b91c1c; }

.inline-form { display: inline-flex; gap: 0.25rem; }

.alert { border-radius: 0.75rem; padding: 0.5rem 0.75rem; margin-bottom: 0.75rem; font-size: 0.9rem; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.footer { text-align: center; padding: 1rem 0; font-size: 0.8rem; color: #6b7280; }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: radial-gradient(circle at top, #1d4ed8 0, #0f172a 50%, #020617 100%); color: white; }
.login-card { background: rgba(15,23,42,0.96); padding: 2rem 2.2rem; border-radius: 1rem; width: 320px; box-shadow: 0 20px 60px rgba(0,0,0,0.45); }
.login-card h1 { font-size: 1.2rem; margin-bottom: 0.4rem; letter-spacing: .08em; text-transform: uppercase; color: #93c5fd; }
.login-card h2 { font-size: 1.1rem; margin-bottom: 0.9rem; }
.login-card form { display: flex; flex-direction: column; gap: 0.65rem; }
.login-card input { background: #020617; border-color: #1f2937; color: #e5e7eb; }

/* Mesas */
.mesas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.mesa { background: white; border-radius: 0.9rem; padding: 0.75rem; box-shadow: 0 4px 12px rgba(15,23,42,0.08); display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.mesa-number { font-size: 1.2rem; font-weight: 600; }
.mesa-name { font-size: 0.9rem; color: #4b5563; }
.mesa-status { font-size: 0.75rem; margin-top: 0.15rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: #e5e7eb; text-transform: uppercase; letter-spacing: .05em; }
.mesa-free { border-left: 4px solid #16a34a; }
.mesa-occupied { border-left: 4px solid #f59e0b; }
.mesa-occupied .mesa-status { background: #fef3c7; color: #92400e; }
.mesa-closed { border-left: 4px solid #9ca3af; }

.form-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; margin: 0.75rem 0; }

.quote-item-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }

.footer { margin-top: 2rem; }
