:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #10b981;
    --danger: #ef4444;
    --background: #f3f4f6;
    --surface: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    display: block;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 5px;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    background-color: #eff6ff;
    color: var(--primary);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
}

/* Cards & Grid */
.grid {
    display: grid;
    gap: 20px;
}

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

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

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
}

/* Form Styles */
.form-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-input, .form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-size: 16px;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-block {
    width: 100%;
}

/* Specific Registration Styles */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-muted);
    z-index: 1;
    position: relative;
}

.step.active {
    background: var(--primary);
    color: white;
}

.step-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border);
    z-index: 0;
    transform: translateY(-50%);
}

.option-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.option-card:hover {
    border-color: var(--primary);
    background-color: #f9fafb;
}

.option-card.selected {
    border-color: var(--primary);
    background-color: #eff6ff;
}

.option-card input {
    margin-right: 10px;
}

.price-tag {
    margin-left: auto;
    font-weight: bold;
    color: var(--primary);
}

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

/* Clickable card */
.clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* Small buttons */
.btn-small {
    padding: 8px 14px;
    font-size: 13px;
}

/* Success color */
:root {
    --success: #10b981;
    --warning: #f59e0b;
}

/* =====================================================
   MOBILE RESPONSIVE STYLES
   ===================================================== */

@media (max-width: 768px) {
    /* Layout: Stack vertically */
    .layout {
        flex-direction: column;
    }
    
    /* Sidebar: Horizontal scrollable navigation */
    .sidebar {
        width: 100%;
        padding: 10px 15px;
        flex-direction: row;
        overflow-x: auto;
        gap: 5px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar .logo {
        display: none;
    }
    
    .sidebar nav {
        display: flex;
        flex-direction: row;
        gap: 5px;
        width: max-content;
    }
    
    .sidebar .nav-link {
        white-space: nowrap;
        padding: 10px 12px;
        font-size: 13px;
        margin-bottom: 0;
    }
    
    /* Main content: Less padding on mobile */
    .main-content {
        padding: 15px;
    }
    
    /* Header: Stack on mobile */
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    /* Grids: Stack on mobile */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Cards: Smaller on mobile */
    .card {
        padding: 15px;
    }
    
    .card-title {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    /* Buttons: Full width on mobile when needed */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .btn-small {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* Forms: Full width inputs */
    .form-input, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px;
    }
    
    .form-card {
        padding: 20px;
    }
}

/* Extra small screens (phones) */
@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 10px;
    }
    
    .card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
}

/* =====================================================
   TABLE MOBILE STYLES - Horizontal Scroll
   ===================================================== */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -15px;
    padding: 0 15px;
}

@media (max-width: 768px) {
    /* Make tables scrollable horizontally */
    .card table,
    table {
        min-width: 600px;
    }
    
    /* Reduce cell padding on mobile */
    table th,
    table td {
        padding: 10px 8px !important;
        font-size: 13px;
    }
}

/* =====================================================
   FILTER BAR MOBILE STYLES
   ===================================================== */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-buttons {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .filter-buttons .btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* =====================================================
   HOURS FORM MOBILE STYLES
   ===================================================== */
.hours-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.hours-form .form-group {
    flex: 1;
    min-width: 120px;
    margin-bottom: 0;
}

.hours-form .form-group.small {
    flex: 0 0 80px;
    min-width: 80px;
}

.hours-form .form-group.medium {
    flex: 0 0 120px;
    min-width: 120px;
}

.hours-form .btn-group {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hours-form {
        flex-direction: column;
    }
    
    .hours-form .form-group,
    .hours-form .form-group.small,
    .hours-form .form-group.medium {
        flex: none;
        width: 100%;
        min-width: 100%;
    }
    
    .hours-form .btn-group {
        width: 100%;
    }
    
    .hours-form .btn-group .btn {
        flex: 1;
    }
}

/* =====================================================
   MEMBER LIST MOBILE CARD VIEW
   ===================================================== */
@media (max-width: 600px) {
    .mobile-card-view tbody tr {
        display: block;
        padding: 15px;
        border-bottom: 1px solid var(--border);
        margin-bottom: 10px;
        background: var(--surface);
        border-radius: var(--radius);
    }
    
    .mobile-card-view tbody td {
        display: flex;
        justify-content: space-between;
        padding: 5px 0 !important;
        border: none !important;
    }
    
    .mobile-card-view tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 12px;
    }
    
    .mobile-card-view thead {
        display: none;
    }
    
    .mobile-card-view table {
        min-width: unset;
    }
}
