/* Layout Styles - SwimSwam */

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    color: var(--primary-red);
    font-size: 1.8rem;
    margin: 0;
}

/* Main Content */
.main {
    min-height: calc(100vh - 140px);
    padding: 0;
    position: relative;
}

/* Footer */
.footer {
    background-color: var(--primary-black);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    color: var(--white);
    margin: 0;
}

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Dashboard Layout */
.dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    min-height: calc(100vh - 140px);
}

.sidebar {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 2px solid #e0e0e0;
    border-left: 4px solid var(--primary-red);
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-blue);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    border: 1px solid transparent;
    margin-bottom: 0.25rem;
}

.sidebar-nav a:hover {
    background-color: #f8f9fa;
    color: var(--primary-red);
    border-color: #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-nav a.active {
    background-color: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
    box-shadow: 0 4px 8px rgba(94, 5, 15, 0.3);
}

.dashboard-content {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}

/* Widget Grid */
.widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.widget {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-red);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.widget-title {
    color: var(--primary-red);
    font-size: 1.2rem;
    margin: 0;
}

.widget-icon {
    font-size: 1.5rem;
    color: var(--text-blue);
}

.widget-content {
    color: var(--text-blue);
}

/* Content Sections */
.content-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.section-title {
    color: var(--primary-red);
    font-size: 1.8rem;
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.modal-title {
    color: var(--primary-red);
    font-size: 1.5rem;
    margin: 0;
}

.close {
    color: var(--dark-gray);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--primary-red);
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

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

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

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

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

/* Progress Bars */
.progress {
    background-color: var(--light-gray);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-red);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    text-align: center;
    border-top: 4px solid var(--primary-red);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-blue);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .widgets {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav {
        flex-direction: row;
        justify-content: center;
    }
    
    .dashboard-content {
        padding: 1rem;
    }
    
    .widgets {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .main {
        padding: 1rem 0;
    }
    
    .dashboard-content {
        padding: 0.5rem;
    }
    
    .widget {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}
