/* Futsal Management System — shared stylesheet */
:root {
    --green: #16a34a;
    --green-dark: #15803d;
    --green-light: #dcfce7;
    --ink: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --card: #ffffff;
    --red: #dc2626;
    --red-light: #fee2e2;
    --amber: #d97706;
    --amber-light: #fef3c7;
    --blue: #2563eb;
    --blue-light: #dbeafe;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
}

a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---- Site header / nav ---- */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}
.site-header .bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}
.brand { font-size: 1.25rem; font-weight: 700; color: var(--green-dark); }
.brand span { color: var(--ink); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--ink); font-weight: 500; }
.btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: var(--green);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn:hover { background: var(--green-dark); text-decoration: none; }
.btn-outline { background: transparent; border-color: var(--green); color: var(--green-dark); }
.btn-outline:hover { background: var(--green-light); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 5px 12px; font-size: 0.85rem; }
.btn-secondary { background: var(--muted); }
.btn-secondary:hover { background: #4b5563; }

/* ---- Hero / home ---- */
.hero {
    background: linear-gradient(135deg, var(--green-dark), var(--green));
    color: #fff;
    padding: 70px 0;
    text-align: center;
}
.hero h1 { font-size: 2.4rem; margin: 0 0 12px; }
.hero p { font-size: 1.1rem; opacity: 0.95; margin: 0 0 26px; }

.section { padding: 50px 0; }
.section h2 { text-align: center; margin-bottom: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

/* ---- Footer ---- */
.site-footer {
    background: var(--ink);
    color: #d1d5db;
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
    font-size: 0.9rem;
}
.site-footer a { color: #a7f3d0; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
input, select, textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.auth-card { max-width: 420px; margin: 60px auto; }
.auth-card h1 { font-size: 1.4rem; text-align: center; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.92rem; }
.alert-error { background: var(--red-light); color: #991b1b; }
.alert-success { background: var(--green-light); color: #166534; }
.alert-info { background: var(--blue-light); color: #1e40af; }

/* ---- Slot booking grid ---- */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.slot {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
    background: #fff;
}
.slot .time { font-weight: 700; }
.slot .price { color: var(--green-dark); font-weight: 600; margin: 6px 0; }
.slot.booked { background: #f3f4f6; color: var(--muted); }
.slot.booked .price { color: var(--muted); }
.date-picker { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; }

/* ---- App layout (customer/agent/admin portals) ---- */
.app-layout { display: flex; min-height: calc(100vh - 60px); }
.app-sidebar {
    width: 230px;
    background: var(--ink);
    color: #e5e7eb;
    padding: 20px 0;
    flex-shrink: 0;
}
.app-sidebar .side-title { padding: 0 20px 16px; font-weight: 700; color: #fff; border-bottom: 1px solid #374151; margin-bottom: 10px;}
.app-sidebar a {
    display: block;
    padding: 10px 20px;
    color: #d1d5db;
    font-size: 0.93rem;
}
.app-sidebar a:hover, .app-sidebar a.active { background: #111827; color: #fff; text-decoration: none; }
.app-main { flex: 1; padding: 26px 30px; }
.app-topbar {
    display: flex; justify-content: space-between; align-items: center;
    background: #fff; border-bottom: 1px solid var(--border); padding: 12px 30px;
}
.notif-bell { position: relative; cursor: pointer; font-size: 1.2rem; }
.notif-count {
    position: absolute; top: -6px; right: -10px; background: var(--red); color: #fff;
    border-radius: 50%; font-size: 0.65rem; padding: 1px 5px;
}
.notif-dropdown {
    position: absolute; right: 20px; top: 50px; background: #fff; border: 1px solid var(--border);
    border-radius: 8px; width: 300px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 30; display: none;
}
.notif-dropdown.open { display: block; }
.notif-dropdown a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.notif-dropdown a:last-child { border-bottom: none; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-card .label { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { background: #f3f4f6; font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table-wrap table { border: none; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select { width: auto; min-width: 150px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge-active, .badge-paid, .badge-approved { background: var(--green-light); color: #166534; }
.badge-cancelled, .badge-rejected { background: var(--red-light); color: #991b1b; }
.badge-pending, .badge-unpaid { background: var(--amber-light); color: #92400e; }
.badge-completed { background: var(--blue-light); color: #1e40af; }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header h1 { margin: 0; font-size: 1.5rem; }

@media (max-width: 800px) {
    .app-layout { flex-direction: column; }
    .app-sidebar { width: 100%; }
}
