/* RacketSportsConnect - Main Stylesheet */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Navbar Customization */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

.navbar-nav .nav-link {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.navbar-nav .nav-link.active {
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    font-weight: 500;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #218838;
    border-color: #218838;
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Badges */
.badge {
    padding: 0.35rem 0.65rem;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Tables */
.table {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #333;
    padding: 1rem 0.75rem;
}

.table tbody tr {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #dee2e6;
}

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

.table-responsive {
    border-radius: 0.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.375rem;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: #fff3cd;
    color: #856404;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

/* Navigation Tabs */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #666;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: transparent;
    border-bottom-color: var(--primary-color);
}

/* Dashboard Widgets */
.dashboard-widget {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-widget-title {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin-bottom: 1rem;
}

.dashboard-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.dashboard-stat:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: #666;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Loading Spinner */
.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
}

.spinner-border-sm {
    width: 1.5rem;
    height: 1.5rem;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .table {
        font-size: 0.9rem;
    }

    .dashboard-stat {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Login Page Specific */
.min-vh-100 {
    min-height: 100vh;
}

.login-card {
    border-radius: 0.75rem;
    overflow: hidden;
}

/* Admin Dashboard Specific */
.bg-danger {
    background-color: #dc3545 !important;
}

/* Feature Cards */
.feature-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-left-color: #0056b3;
}

.feature-enabled {
    border-left-color: var(--success-color);
}

.feature-disabled {
    border-left-color: var(--danger-color);
    opacity: 0.8;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #333;
    font-weight: 600;
}

/* Override heading colors when text-white is applied */
.text-white h1,
.text-white h2,
.text-white h3,
.text-white h4,
.text-white h5,
.text-white h6,
h1.text-white,
h2.text-white,
h3.text-white,
h4.text-white,
h5.text-white,
h6.text-white {
    color: white !important;
}

code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    color: #e83e8c;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0;
}

/* Utility Classes */
.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.transition-all {
    transition: all 0.3s ease;
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16), 0 10px 10px rgba(0, 0, 0, 0.23);
}

/* Active States */
.nav-item .nav-link.active {
    font-weight: 600;
}

/* Accessible focus states */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}
