* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: #030712; color: #f8fafc; min-height: 100vh; }
a { color: #06b6d4; text-decoration: none; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 256px; background: #0f172a; border-right: 1px solid #1e293b; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; z-index: 40; transition: transform 0.3s; }
.sidebar-logo { padding: 24px; border-bottom: 1px solid #1e293b; display: flex; align-items: center; gap: 12px; }
.sidebar-logo .icon { width: 40px; height: 40px; background: linear-gradient(135deg, #06b6d4, #0891b2); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 900; font-size: 14px; }
.sidebar-logo h1 { color: white; font-size: 18px; font-weight: 700; line-height: 1.2; }
.sidebar-logo p { color: #64748b; font-size: 11px; }
.sidebar-nav { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; color: #94a3b8; font-size: 14px; font-weight: 500; transition: all 0.2s; cursor: pointer; }
.sidebar-nav a:hover { background: rgba(30,41,59,0.5); color: white; }
.sidebar-nav a.active { background: rgba(6,182,212,0.1); color: #06b6d4; border: 1px solid rgba(6,182,212,0.2); }
.sidebar-footer { padding: 16px; border-top: 1px solid #1e293b; }
.sidebar-footer button { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; color: #ef4444; font-size: 14px; background: none; border: none; width: 100%; cursor: pointer; transition: all 0.2s; }
.sidebar-footer button:hover { background: rgba(239,68,68,0.1); }
.main { margin-left: 256px; flex: 1; padding: 32px; min-height: 100vh; }

/* Mobile */
.mobile-toggle { display: none; position: fixed; top: 16px; left: 16px; z-index: 50; padding: 8px; background: #1e293b; border-radius: 12px; color: white; border: 1px solid #334155; cursor: pointer; font-size: 20px; }
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 39; }
@media (max-width: 1024px) {
  .mobile-toggle { display: block; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .mobile-overlay.open { display: block; }
  .main { margin-left: 0; padding: 16px; padding-top: 64px; }
}

/* Login */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #0f172a, #1e293b, #0f172a); padding: 16px; }
.login-card { width: 100%; max-width: 420px; }
.login-card .logo { text-align: center; margin-bottom: 32px; }
.login-card .logo .icon { width: 96px; height: 96px; background: linear-gradient(135deg, #06b6d4, #0891b2); border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; color: white; font-size: 40px; font-weight: 900; margin-bottom: 16px; box-shadow: 0 20px 40px rgba(6,182,212,0.3); }
.login-card .logo h1 { color: white; font-size: 30px; font-weight: 700; }
.login-card .logo p { color: #64748b; font-size: 14px; margin-top: 4px; }
.login-card form { background: #1e293b; border-radius: 20px; padding: 32px; border: 1px solid #334155; box-shadow: 0 25px 50px rgba(0,0,0,0.3); }

/* Forms */
label { display: block; font-size: 13px; font-weight: 500; color: #94a3b8; margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 12px 16px; background: #374151; border: 1px solid #4b5563; border-radius: 12px; color: white; font-size: 16px; outline: none; transition: all 0.2s; }
input:focus, select:focus, textarea:focus { border-color: #06b6d4; box-shadow: 0 0 0 2px rgba(6,182,212,0.2); }
input::placeholder { color: #6b7280; }
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 12px; font-weight: 700; font-size: 16px; border: none; cursor: pointer; transition: all 0.2s; }
.btn-lg { padding: 16px 32px; font-size: 18px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-cyan { background: #06b6d4; color: white; box-shadow: 0 10px 20px rgba(6,182,212,0.2); }
.btn-cyan:hover { background: #22d3ee; }
.btn-green { background: #22c55e; color: white; }
.btn-green:hover { background: #16a34a; }
.btn-yellow { background: #f59e0b; color: #111; }
.btn-yellow:hover { background: #d97706; }
.btn-purple { background: #8b5cf6; color: white; }
.btn-purple:hover { background: #7c3aed; }
.btn-red { background: #ef4444; color: white; }
.btn-red:hover { background: #dc2626; }
.btn-gray { background: #374151; color: white; }
.btn-gray:hover { background: #4b5563; }
.btn-lime { background: #84cc16; color: #111; }
.btn-lime:hover { background: #65a30d; }
.btn-orange { background: #f97316; color: white; }
.btn-icon { padding: 8px; border-radius: 8px; background: none; border: none; cursor: pointer; transition: all 0.2s; }
.btn-icon:hover { background: rgba(255,255,255,0.1); }

/* Cards */
.card { background: #1e293b; border-radius: 16px; border: 1px solid #334155; padding: 24px; }
.stat-card { border-radius: 16px; padding: 20px; color: white; }
.stat-card .label { font-size: 12px; opacity: 0.8; }
.stat-card .value { font-size: 28px; font-weight: 700; margin-top: 4px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

/* Page header */
.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-header h1 { font-size: 28px; font-weight: 700; color: white; display: flex; align-items: center; gap: 12px; }
.page-header p { color: #64748b; margin-top: 4px; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Table */
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 20px; text-align: left; color: #64748b; font-size: 13px; font-weight: 500; border-bottom: 1px solid #334155; }
td { padding: 16px 20px; border-bottom: 1px solid rgba(51,65,85,0.5); }
tr:hover { background: rgba(30,41,59,0.3); }

/* Badge */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-green { background: rgba(34,197,94,0.2); color: #4ade80; }
.badge-yellow { background: rgba(245,158,11,0.2); color: #fbbf24; }
.badge-red { background: rgba(239,68,68,0.2); color: #f87171; }
.badge-blue { background: rgba(59,130,246,0.2); color: #60a5fa; }
.badge-cyan { background: rgba(6,182,212,0.2); color: #22d3ee; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 100; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal { background: #1e293b; border-radius: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; border: 1px solid #334155; box-shadow: 0 25px 50px rgba(0,0,0,0.5); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 24px; border-bottom: 1px solid #334155; }
.modal-header h2 { color: white; font-size: 20px; font-weight: 700; }
.modal-header .close { background: none; border: none; color: #64748b; cursor: pointer; font-size: 20px; padding: 8px; border-radius: 8px; }
.modal-header .close:hover { background: rgba(255,255,255,0.1); color: white; }
.modal-body { padding: 24px; }
.modal-footer { display: flex; gap: 12px; padding: 24px; border-top: 1px solid #334155; }
.modal-footer .btn { flex: 1; }

/* Date nav */
.date-nav { display: flex; align-items: center; gap: 12px; background: #1e293b; border-radius: 12px; padding: 12px; border: 1px solid #334155; margin-bottom: 16px; }
.date-nav input { flex: 1; text-align: center; }
.date-nav button { padding: 8px 12px; background: #374151; border: none; color: #94a3b8; border-radius: 8px; cursor: pointer; font-size: 16px; }
.date-nav button:hover { background: #4b5563; color: white; }
.date-nav .btn-today { background: #3b82f6; color: white; font-size: 13px; font-weight: 600; padding: 8px 16px; }

/* Booking Grid */
.booking-grid { display: flex; background: #1e293b; border-radius: 16px; border: 1px solid #334155; overflow: hidden; }
.booking-grid .time-col { width: 64px; flex-shrink: 0; }
.booking-grid .time-col .slot { height: 48px; padding: 0 12px; display: flex; align-items: center; color: #64748b; font-size: 12px; font-family: monospace; border-bottom: 1px solid rgba(51,65,85,0.3); }
.booking-grid .court-col { flex: 1; position: relative; }
.booking-grid .court-col .header { padding: 12px; text-align: center; font-size: 13px; font-weight: 700; border-bottom: 1px solid #334155; }
.booking-grid .court-col .slot { height: 48px; border-bottom: 1px solid rgba(51,65,85,0.3); display: flex; align-items: center; justify-content: center; }
.booking-grid .court-col .slot.empty { cursor: pointer; }
.booking-grid .court-col .slot.empty:hover { background: rgba(6,182,212,0.05); }
.booking-grid .court-col .slot.empty span { color: #374151; font-size: 14px; }
.booking-grid .court-col .slot.empty:hover span { color: #06b6d4; }
.booking-grid .booking-block { position: absolute; left: 4px; right: 4px; border-radius: 12px; padding: 8px; cursor: pointer; overflow: hidden; z-index: 10; transition: opacity 0.2s; }
.booking-grid .booking-block:hover { opacity: 0.9; }
.booking-grid .booking-block .name { color: white; font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booking-grid .booking-block .time { color: rgba(255,255,255,0.7); font-size: 11px; }

/* Status buttons */
.status-buttons { display: flex; gap: 8px; }
.status-buttons button { flex: 1; padding: 12px; border-radius: 12px; font-weight: 600; font-size: 13px; border: none; cursor: pointer; transition: all 0.2s; }
.status-buttons button.inactive { background: #374151; color: #94a3b8; }

/* Charts placeholder */
.chart-container { height: 250px; display: flex; align-items: center; justify-content: center; background: rgba(6,182,212,0.05); border-radius: 12px; border: 1px dashed #334155; }

/* Period selector */
.period-selector { display: flex; gap: 4px; background: #374151; border-radius: 12px; padding: 4px; }
.period-selector button { padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; border: none; cursor: pointer; color: #64748b; background: none; transition: all 0.2s; }
.period-selector button.active { background: #06b6d4; color: white; }

/* List items */
.list-item { display: flex; align-items: center; justify-content: space-between; background: rgba(51,65,85,0.3); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.list-item .info { display: flex; align-items: center; gap: 12px; }
.list-item .info .dot { width: 8px; height: 8px; border-radius: 50%; }
.list-item .info h4 { color: white; font-size: 14px; font-weight: 600; }
.list-item .info p { color: #64748b; font-size: 12px; }
.list-item .actions { display: flex; align-items: center; gap: 8px; }

/* Sections hidden by default */
.section { display: none; }
.section.active { display: block; }

/* Search */
.search-bar { position: relative; margin-bottom: 16px; }
.search-bar input { padding-left: 40px; }
.search-bar .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #64748b; }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.product-card { background: #1e293b; border-radius: 16px; border: 1px solid #334155; overflow: hidden; transition: all 0.2s; }
.product-card:hover { border-color: rgba(139,92,246,0.5); }
.product-card .image { height: 120px; background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(59,130,246,0.2)); display: flex; align-items: center; justify-content: center; color: rgba(139,92,246,0.5); font-size: 40px; }
.product-card .body { padding: 16px; }
.product-card .category { color: #8b5cf6; font-size: 12px; font-weight: 500; }
.product-card .name { color: white; font-size: 16px; font-weight: 700; margin-top: 4px; }
.product-card .price-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.product-card .price { color: #84cc16; font-size: 20px; font-weight: 700; }
.product-card .actions { display: flex; gap: 8px; margin-top: 12px; }
.product-card .actions .btn { flex: 1; }

/* Error message */
.error-msg { background: rgba(239,68,68,0.15); border: 1px solid #ef4444; color: #fca5a5; padding: 12px 16px; border-radius: 12px; font-size: 13px; margin-bottom: 12px; }

/* Staff info */
.staff-badge { background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.2); border-radius: 12px; padding: 8px 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.staff-badge .label { color: #06b6d4; font-size: 12px; font-weight: 500; }
.staff-badge .name { color: white; font-size: 14px; font-weight: 700; }

/* Bar chart simple */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding: 16px 0; }
.bar-chart .bar { flex: 1; border-radius: 8px 8px 0 0; min-height: 4px; transition: all 0.3s; position: relative; }
.bar-chart .bar .tooltip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #1e293b; color: white; padding: 4px 8px; border-radius: 6px; font-size: 11px; white-space: nowrap; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.bar-chart .bar:hover .tooltip { opacity: 1; }
.bar-chart .bar .label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); color: #64748b; font-size: 10px; margin-top: 4px; white-space: nowrap; }

/* Top list */
.top-list .item { display: flex; align-items: center; gap: 12px; background: rgba(51,65,85,0.3); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.top-list .item .rank { font-size: 20px; width: 32px; text-align: center; }
.top-list .item .info { flex: 1; }
.top-list .item .info h4 { color: white; font-size: 14px; font-weight: 700; }
.top-list .item .info p { color: #64748b; font-size: 12px; }
.top-list .item .value { color: #06b6d4; font-weight: 700; font-size: 16px; }

/* Progress bar */
.progress-bar { width: 100%; height: 8px; background: #374151; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.progress-bar .fill { height: 100%; background: #06b6d4; border-radius: 4px; transition: width 0.3s; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #1e293b; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Hidden */
.hidden { display: none !important; }
