/* Main stylesheet for Rallyz Billing System */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #2c3e50;
    --text-light: #fff;
    --text-dark: #333;
    --background-light: #f5f5f5;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #c0392b;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    padding: 2rem;
}

.container-fluid {
    width: 100%;
    padding: 0 2rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Sidebar Styles */
.has-sidebar {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

.sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    left: -280px;
    top: 0;
    background-color: var(--primary-color);
    color: var(--text-light);
    transition: left 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    box-shadow: none;
    display: none;
}

.sidebar.show {
    left: 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
}

.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1002;
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    opacity: 1;
    visibility: visible;
}

.sidebar.show ~ .sidebar-toggle {
    left: 290px;
}

.main-content {
    margin-left: 0;
    width: 100%;
    transition: margin-left 0.3s ease, width 0.3s ease;
    position: relative;
    z-index: 1000;
    flex: 1;
}

.sidebar.show ~ .main-content {
    margin-left: 280px;
    width: calc(100% - 280px);
}

/* Responsive Design */
@media (max-width: 991px) {
    .sidebar.show ~ .main-content {
        margin-left: 0;
        width: 100%;
    }

    .content-wrapper {
        padding: 1rem;
        overflow-x: hidden;
    }

    .container-fluid {
        padding: 0 1rem;
        overflow-x: hidden;
    }

    .sidebar {
        width: 100%;
        max-width: 280px;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.show ~ .sidebar-toggle {
        left: calc(100% - 50px);
        max-left: 230px;
    }

    .sidebar-nav .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .has-sidebar {
        flex-direction: column;
    }

    body {
        font-size: 14px;
    }

    .container {
        padding: 0 10px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .row {
        margin-left: -5px;
        margin-right: -5px;
    }

    .col, [class*='col-'] {
        padding-left: 5px;
        padding-right: 5px;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .content-wrapper {
        padding: 0.5rem;
    }

    .container-fluid {
        padding: 0 0.5rem;
    }

    .sidebar-toggle {
        width: 35px;
        height: 35px;
    }

    .card {
        margin-bottom: 0.75rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    .form-control {
        font-size: 0.9rem;
        height: calc(1.5em + 0.75rem + 2px);
    }

    h1, .h1 { font-size: 1.75rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.25rem; }
    h4, .h4 { font-size: 1.125rem; }
    h5, .h5 { font-size: 1rem; }
    h6, .h6 { font-size: 0.875rem; }
}

.sidebar-header {
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    margin: 1rem;
    background-color: rgb(255, 255, 255);
}

.sidebar-logo {
    height: 50px;
    width: auto;
}

.user-profile {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info h6 {
    margin: 0;
    color: var(--text-light);
    font-size: 1rem;
}

.user-role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-link {
    color: var(--text-light);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav .bi {
    font-size: 1.1rem;
}

.sidebar-nav .nav-link[data-bs-toggle="collapse"] {
    position: relative;
}

.sidebar-nav .nav-link[data-bs-toggle="collapse"] .bi-chevron-down {
    position: absolute;
    right: 1.5rem;
    transition: transform 0.3s;
}

.sidebar-nav .nav-link[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}


.sub-menu {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.sub-menu .sub-menu {
    background-color: rgba(0, 0, 0, 0.2);
    margin-left: 0;
    padding-left: 1rem;
}

.collapse {
    transition: all 0.3s ease;
}

.collapse:not(.show) {
    display: none;
}

.collapsing {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
}

.sub-menu .nav-link {
    padding-left: 3.5rem;
    font-size: 0.9rem;
}

.main-content {
    flex: 1;
    width: 100%;
    margin-left: 0;
    transition: margin-left 0.3s ease, width 0.3s ease;
    min-height: 100vh;
    background-color: var(--background-light);
    position: relative;
    z-index: 1;
}

@media (min-width: 992px) {
    .sidebar.show ~ .main-content {
        margin-left: 280px;
        width: calc(100% - 280px);
    }
}

.top-nav {
    padding: 1rem;
    background-color: #fff;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    display: none;
    font-size: 1.5rem;
    padding: 0;
    color: var(--text-dark);
}

@media (max-width: 991px) {
    body.has-sidebar .sidebar.show ~ .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar-toggle {
        display: block;
    }
}

/* Main Content Styles */
.content-wrapper {
    min-height: calc(100vh - 120px);
    padding: 2rem;
    background-color: var(--background-light);
}

.content-footer {
    padding: 1rem 2rem;
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.top-nav {
    padding: 1rem 2rem;
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-toggle {
    font-size: 1.5rem;
    color: var(--text-dark);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.sidebar-toggle:hover {
    color: var(--primary-color);
}
main {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
    padding: 2rem 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    background: url('../images/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    padding: 8rem 0;
    text-align: center;
    color: var(--text-light);
    margin-top: -80px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 999;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.page-title {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin: 0 1rem 2rem;
    flex: 1 1 300px;
}

/* Membership Section Styles */
.membership-section {
    margin-bottom: 2rem;
}

.membership-section h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.membership-section p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    justify-items: center;
    width: 100%;
}

.plan-card {
    background-color: white;
    border-radius: 5px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.plan-card-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
}

.plan-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.plan-card-body {
    padding: 1.5rem;
    min-height: 200px;
}

.plan-price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 1rem;
}

.plan-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.plan-features li {
    padding: 0.5rem 0;
    color: var(--text-dark);
    text-align: center;
    border-bottom: 1px solid #eee;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-card-footer {
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--background-light);
    border-top: 1px solid #eee;
    min-height: 70px;
    height: 70px;
    flex-grow: 0;
    margin-top: auto;
    width: 100%;
}

@media (max-width: 768px) {
    .plan-cards {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    .plan-card {
        max-width: 400px;
        margin: 0 auto;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
}

.court-booking-cards {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 2rem 0;
}

.court-booking-card {
    flex: 1;
    min-width: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

.court-booking-card .btn {
    width: 100%;
    margin-top: auto;
    align-self: flex-end;
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.25rem;
    color: var(--text-dark);
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #000000; background-color: #ffffff;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #2c3e50; background-color: #2c3e50;
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: #2c3e50;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.table th {
    background-color: var(--background-light);
    font-weight: 600;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

    .hamburger {
        display: block;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
}

/* Footer Styles */
.footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 3px solid var(--secondary-color);
}

.footer .container {
    max-width: 1200px;
}

.footer p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--text-light);
}

.footer-links a i {
    font-size: 0.8rem;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer {
        padding: 1rem 0;
        margin-top: 2rem;
        text-align: center;
    }
    
    .footer .row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer .col-md-6 {
        text-align: center !important;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .footer p,
    .footer-links a {
        font-size: 0.8rem;
    }
}