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

:root {
    --bg: #f3f4f6;
    --card: #ffffff;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #22c55e;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --radius: 0.75rem;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 900px; margin: 0 auto; padding: 1.5rem; }

/* Flash messages */
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.875rem; }
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.5rem; }

/* Buttons */
.btn { display: inline-block; padding: 0.625rem 1.25rem; border-radius: var(--radius); font-size: 0.875rem; font-weight: 600; text-align: center; cursor: pointer; border: none; transition: background 0.2s; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-cashapp { background: #00d632; color: #fff; }
.btn-cashapp:hover { background: #00b82b; }
.btn-paypal { background: #0070ba; color: #fff; }
.btn-paypal:hover { background: #005ea6; }
.btn-block { width: 100%; display: block; margin-bottom: 0.5rem; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 0.625rem 0.75rem; border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 4px); font-size: 0.875rem; background: #fff; color: var(--text);
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Admin header */
.admin-header { background: var(--card); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.admin-header h1 { font-size: 1.25rem; font-weight: 700; }
.admin-header .meta { display: flex; align-items: center; gap: 1rem; font-size: 0.875rem; color: var(--muted); }

/* Client layout */
.client-body { background: var(--bg); }
.client-header {
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem; display: flex; align-items: center; position: sticky; top: 0; z-index: 40;
}
.company-title { font-size: 1.125rem; font-weight: 700; cursor: pointer; flex: 1; text-align: center; }
.hamburger { background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 0.25rem 0.5rem; color: var(--text); }
.spacer { width: 2.5rem; }
.client-main { max-width: 640px; margin: 0 auto; padding: 1.5rem 1rem; }

/* Mobile menu */
.mobile-menu {
    display: none; background: var(--card); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 0.5rem 0;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 0.75rem 1.5rem; font-size: 0.875rem; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--border); }
.mobile-menu a:hover { background: var(--bg); text-decoration: none; }
.mobile-menu .logout-link { color: var(--danger); }

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-lg { font-size: 1.125rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.icon-circle { width: 4rem; height: 4rem; border-radius: 50%; background: rgba(59,130,246,0.1); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.5rem; }
.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 600px) { .quick-links { grid-template-columns: 1fr; } }
.quick-link { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; text-align: center; cursor: pointer; transition: box-shadow 0.2s; text-decoration: none; color: var(--text); }
.quick-link:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); text-decoration: none; }
.quick-link .icon { font-size: 2rem; margin-bottom: 0.5rem; }
.quick-link .label { font-weight: 600; font-size: 0.875rem; }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab { padding: 0.75rem 1.25rem; font-size: 0.875rem; font-weight: 500; cursor: pointer; border: none; background: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Search */
.search-bar { margin-bottom: 1rem; }
.search-bar input { max-width: 300px; }

/* Login page */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; }
.login-card .subtitle { text-align: center; color: var(--muted); margin-bottom: 1rem; font-size: 0.875rem; }

/* Profile */
.profile-row { display: flex; align-items: center; gap: 1rem; }
.profile-avatar { width: 3rem; height: 3rem; border-radius: 50%; background: rgba(59,130,246,0.1); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 700; color: var(--primary); }
