/* Elite Trainings – App Styles */
:root {
    --primary: #15b5c4;
    --primary-dark: #0d8f9c;
    --primary-light: #e0f7fa;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --red-light: #fef2f2;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --white: #ffffff;
    --green: #16a34a;
    --yellow: #d97706;
    --blue: #2563eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--dark); background: var(--white); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ── Utilities ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.text-red { color: var(--red); }
.text-gray { color: var(--gray); }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-4 { margin-top: 1rem; } .mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: .5rem; } .mb-4 { margin-bottom: 1rem; } .mb-8 { margin-bottom: 2rem; }
.gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .625rem 1.25rem; border-radius: .5rem; font-size: .9rem; font-weight: 600; cursor: pointer; border: none; transition: all .2s; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #1e293b; color: #fff; text-decoration: none; }
.btn-sm { padding: .375rem .75rem; font-size: .8rem; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-gray { background: #e2e8f0; color: var(--dark); }
.btn-gray:hover { background: #cbd5e1; }
.btn-green { background: #16a34a; color: #fff; }
.btn-green:hover { background: #15803d; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: 9999px; font-size: .75rem; font-weight: 600; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-pink { background: #fce7f3; color: #9d174d; }
.badge-orange { background: #ffedd5; color: #9a3412; }

/* ── Alerts ── */
.alert { padding: 1rem 1.25rem; border-radius: .5rem; margin-bottom: 1rem; }
.alert-success { background: #dcfce7; color: #15803d; border-left: 4px solid #16a34a; }
.alert-error { background: #fee2e2; color: #b91c1c; border-left: 4px solid #dc2626; }
.alert-info { background: #dbeafe; color: #1d4ed8; border-left: 4px solid #2563eb; }

/* ── Cards ── */
.card { background: var(--white); border-radius: .75rem; border: 1px solid var(--border); padding: 1.5rem; }
.card-shadow { box-shadow: 0 2px 8px rgba(0,0,0,.07); }

/* ── Form controls ── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .375rem; color: var(--dark); }
.form-control { width: 100%; padding: .6rem .875rem; border: 1px solid var(--border); border-radius: .5rem; font-size: .9rem; color: var(--dark); background: var(--white); transition: border-color .2s; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,181,196,.15); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-help { font-size: .8rem; color: var(--gray); margin-top: .25rem; }
.form-check { display: flex; align-items: center; gap: .5rem; }
.form-check input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--primary); }

/* ── Tables ── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { text-align: left; padding: .75rem 1rem; background: var(--light); border-bottom: 2px solid var(--border); font-weight: 600; color: var(--gray); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--light); }

/* ── Modals ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: var(--white); border-radius: .75rem; padding: 1.75rem; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-title { font-size: 1.15rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--gray); line-height: 1; }
.modal-footer { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1.25rem; }

/* ── Page hero ── */
.page-hero { background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%); color: #fff; padding: 3rem 0; }
.page-hero h1 { font-size: 2.25rem; font-weight: 800; margin-bottom: .5rem; }
.page-hero p { color: #94a3b8; font-size: 1.05rem; }

/* ── Navbar ── */
.topbar { background: var(--dark); color: #94a3b8; padding: .4rem 0; font-size: .82rem; }
.topbar a { color: #94a3b8; } .topbar a:hover { color: #fff; text-decoration: none; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.navbar { background: var(--white); border-bottom: 1px solid var(--border); padding: .75rem 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.navbar-brand .brand-icon { width: 2.5rem; height: 2.5rem; background: var(--primary); border-radius: .5rem; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; font-weight: 800; flex-shrink: 0; }
.brand-name { font-size: 1rem; font-weight: 700; color: var(--dark); line-height: 1.2; }
.brand-sub { font-size: .72rem; color: var(--gray); }
.navbar-nav { display: flex; align-items: center; gap: .25rem; list-style: none; }
.navbar-nav a { padding: .5rem .85rem; border-radius: .375rem; color: var(--dark); font-size: .9rem; font-weight: 500; text-decoration: none; transition: all .2s; }
.navbar-nav a:hover, .navbar-nav a.active { background: var(--primary-light); color: var(--primary); }
.navbar-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--dark); }

/* ── Footer ── */
.footer-newsletter { background: var(--primary); color: #fff; padding: 2.5rem 0; }
.footer { background: var(--dark); color: #94a3b8; padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 2.5rem; margin-bottom: 2rem; }
.footer-brand-name { color: #fff; font-weight: 700; font-size: 1.1rem; margin-bottom: .5rem; }
.footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; }
.footer a { color: #94a3b8; font-size: .875rem; display: block; margin-bottom: .4rem; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; font-size: .8rem; flex-wrap: wrap; gap: .5rem; }
.footer-bottom a { color: #64748b; display: inline; margin: 0 .5rem; }

/* ── Course cards ── */
.course-card { background: var(--white); border-radius: .75rem; border: 1px solid var(--border); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.course-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.course-card-header { height: 120px; display: flex; align-items: flex-end; padding: 1rem; position: relative; }
.course-card-body { padding: 1.25rem; }
.course-card-title { font-weight: 700; font-size: 1rem; margin-bottom: .5rem; }
.course-card-desc { font-size: .85rem; color: var(--gray); margin-bottom: 1rem; line-height: 1.5; }
.course-card-meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--gray); border-top: 1px solid var(--border); padding-top: .75rem; }

/* ── Gallery ── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; }
.gallery-thumb { cursor: pointer; border-radius: .5rem; overflow: hidden; aspect-ratio: 4/3; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.gallery-thumb:hover img { transform: scale(1.05); }
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 2000; align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: .5rem; }
.lightbox-close { position: absolute; top: 1rem; right: 1.5rem; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 2.5rem; cursor: pointer; padding: .5rem; background: rgba(0,0,0,.4); border-radius: 50%; line-height: 1; border: none; }
.lightbox-prev { left: 1rem; } .lightbox-next { right: 1rem; }
.lightbox-counter { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); color: #fff; font-size: .875rem; }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 1.5rem; }
.stat-card { background: rgba(255,255,255,.1); border-radius: .75rem; padding: 1.25rem; text-align: center; }
.stat-number { font-size: 2rem; font-weight: 800; }
.stat-label { font-size: .85rem; opacity: .8; }

/* ── Admin layout ── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; background: var(--dark); color: #94a3b8; flex-shrink: 0; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; overflow-y: auto; z-index: 50; }
.admin-sidebar-header { padding: 1.25rem 1rem; border-bottom: 1px solid #1e293b; }
.admin-sidebar-brand { color: #fff; font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.admin-sidebar-brand .brand-icon { background: var(--primary); border-radius: .375rem; width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: .85rem; flex-shrink: 0; }
.admin-nav { padding: 1rem 0; flex: 1; }
.admin-nav-item { display: flex; align-items: center; gap: .75rem; padding: .625rem 1.25rem; font-size: .875rem; color: #94a3b8; text-decoration: none; transition: all .15s; }
.admin-nav-item:hover { background: #1e293b; color: #fff; text-decoration: none; }
.admin-nav-item.active { background: rgba(21,181,196,.15); color: #67e8f9; border-right: 3px solid var(--primary); }
.admin-nav-section { padding: .5rem 1.25rem .25rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #475569; margin-top: .5rem; }
.admin-sidebar-footer { padding: 1rem; border-top: 1px solid #1e293b; }
.admin-main { margin-left: 240px; flex: 1; background: #f8fafc; min-height: 100vh; }
.admin-topbar { background: var(--white); border-bottom: 1px solid var(--border); padding: .875rem 1.75rem; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 40; }
.admin-content { padding: 1.75rem; }
.admin-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.admin-page-title { font-size: 1.4rem; font-weight: 700; }

/* ── Admin stat cards ── */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; margin-bottom: 1.75rem; }
.admin-stat-card { background: var(--white); border: 1px solid var(--border); border-radius: .75rem; padding: 1.25rem; display: flex; align-items: center; gap: 1rem; }
.admin-stat-icon { width: 3rem; height: 3rem; border-radius: .625rem; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.admin-stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.admin-stat-label { font-size: .8rem; color: var(--gray); margin-top: .2rem; }

/* ── Tabs ── */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; gap: .25rem; }
.tab-btn { padding: .625rem 1.25rem; border: none; background: none; cursor: pointer; font-size: .9rem; font-weight: 500; color: var(--gray); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; } .tab-panel.active { display: block; }

/* ── Filter bar ── */
.filter-bar { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; align-items: center; }
.filter-bar .form-control { width: auto; min-width: 200px; }
.filter-bar select.form-control { min-width: 160px; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .navbar-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); padding: 1rem; border-top: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
    .navbar-nav.open { display: flex; }
    .navbar-toggle { display: block; }
    .navbar { position: relative; }
    .admin-sidebar { transform: translateX(-100%); transition: transform .3s; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .page-hero h1 { font-size: 1.6rem; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2,1fr); }
}
