@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --primary: #E31C25;
    /* Gym Red */
    --primary-dark: #b3121a;
    --secondary: #111111;
    /* Pitch Black */
    --accent: #ffffff;
    --text-body: #666666;
    --text-heading: #111111;
    --light-bg: #f8f9fa;
    --border-color: #e5e5e5;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: #f4f4f4;
    /* Light grey bg for contrast */
    color: var(--text-body);
    line-height: 1.7;
    font-size: 16px;
    padding-top: 100px;
    /* IMPORTANT: Space for fixed header */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Home Page specific fix - reset padding because hero handles it */
body.home {
    padding-top: 0;
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background-color: var(--primary);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    clip-path: polygon(10% 0, 100% 0, 100% 80%, 90% 100%, 0 100%, 0 20%);
    transition: all 0.3s;
}

.btn:hover {
    background-color: var(--secondary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #fff;
    clip-path: none;
    border-radius: 0;
}

.btn-outline:hover {
    background-color: #fff;
    color: var(--secondary);
}

/* Header & Navbar */
.main-header {
    background-color: #111;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    height: 80px;
    /* Fixed height */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.brand-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: #fff;
    font-weight: 700;
    line-height: 1;
}

.brand-logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu li a {
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-content h4 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: 5rem;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

/* AUTH PAGES (Login/Register) */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px - 300px);
    /* rough calc: viewport - header - footer */
    padding: 60px 0;
}

.auth-box {
    width: 100%;
    max-width: 450px;
    background: #fff;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--primary);
    border-radius: 4px;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-family: var(--font-heading);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    font-family: var(--font-body);
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    background: #fff;
}

/* Dashboard / Admin Panels */
.dashboard-layout {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 260px;
    background-color: var(--secondary);
    color: #fff;
    padding: 30px 0;
    position: fixed;
    top: 80px;
    /* Below Header */
    left: 0;
    height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 900;
}

.sidebar-menu {
    padding: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    color: #aaa;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    font-size: 14px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-left: 4px solid var(--primary);
}

.main-content {
    margin-left: 260px;
    /* Offset for sidebar */
    padding: 40px;
    width: calc(100% - 260px);
    background-color: #f4f6f9;
    min-height: calc(100vh - 80px);
}

/* Tables - UPDATED ROBUST STYLING */
.table-custom {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
}

.table-custom thead {
    background-color: #222;
    color: #fff;
}

.table-custom thead tr {
    background-color: #222 !important;
    /* Force black header */
    color: #fff !important;
}

.table-custom th {
    background-color: #222;
    color: #fff;
    padding: 18px 25px;
    text-align: left;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 3px solid var(--primary);
}

.table-custom td {
    padding: 15px 25px;
    text-align: left;
    border-bottom: 1px solid #eee;
    color: #555;
    font-family: var(--font-body);
    font-size: 15px;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: #f9f9f9;
}

/* Footer */
footer {
    background-color: #111;
    color: #888;
    padding: 80px 0 30px;
    margin-top: auto;
    /* Push to bottom */
}

.footer-widget h3 {
    color: #fff;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 30px;
    margin-top: 50px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    /* Mobile Menu needed */
    .sidebar {
        width: 0;
        display: none;
    }

    /* Mobile sidebar hidden */
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}