/* Modern Pool Management System - Complete Stylesheet */
:root {
    --primary: #0EA5E9;
    --primary-dark: #0284C7;
    --secondary: #6366F1;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --dark: #1F2937;
    --light: #F9FAFB;
    --gray: #6B7280;
    --border: #E5E7EB;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
}

/* ============================================
   MAIN LAYOUT - SIDEBAR & CONTENT
   ============================================ */

.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease, width 0.3s ease;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    width: calc(100% - 260px);
    background: var(--light);
    transition: margin-left 0.3s ease, width 0.3s ease;
    padding: 0;
    overflow-x: hidden;
}

.content-wrapper {
    padding: 20px 30px;
    max-width: 100%;
    width: 100%;
    margin: 0;
}

/* Responsive Layout */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 220px;
        width: calc(100% - 220px);
    }
    
    .sidebar {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .content-wrapper {
        padding: 15px;
    }
    
    /* Mobile menu overlay */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 10px;
    }
}

/* ============================================
   ALTERNATIVE LAYOUT (main-container & content-area)
   Used by Settings, Products, Payments pages
   ============================================ */

.main-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Content area when used with main-container (Settings, Products, Payments) */
.main-container .content-area {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    width: calc(100% - 260px);
    background: var(--light);
    transition: margin-left 0.3s ease, width 0.3s ease;
    padding: 20px 30px;
    overflow-x: hidden;
}

/* Content area when nested inside main-content (Members index) */
.main-content .content-area {
    margin-left: 0;
    width: 100%;
    padding: 20px 30px;
}

/* Dashboard wrapper layout (Members index page) */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Responsive for alternative layout */
@media (max-width: 1024px) {
    .main-container .content-area {
        margin-left: 220px;
        width: calc(100% - 220px);
    }
}

@media (max-width: 768px) {
    .main-container .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .main-container .sidebar.active {
        transform: translateX(0);
    }
    
    .main-container .content-area {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }
    
    .main-content .content-area {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 10px;
    }
}

/* ============================================
   LOGIN & AUTHENTICATION PAGES
   ============================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    left: -200px;
    animation: float 6s ease-in-out infinite;
}

.auth-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.25);
    padding: 50px 45px;
    width: 100%;
    max-width: 480px;
    animation: slideUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 1;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: white;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.3);
}

.auth-header h1 {
    color: var(--dark);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray);
    font-size: 15px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: #9CA3AF;
}

.input-icon {
    position: relative;
}

.input-icon input {
    padding-left: 48px;
}

.input-icon i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 18px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.form-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--gray);
    font-size: 14px;
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.form-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--light);
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1F2937 0%, #111827 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 30px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.brand-text h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.brand-text p {
    font-size: 12px;
    color: #9CA3AF;
}

.sidebar-menu {
    padding: 20px 15px;
}

.menu-section {
    margin-bottom: 30px;
}

.menu-title {
    color: #6B7280;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 15px;
    margin-bottom: 10px;
}

.menu-list {
    list-style: none;
}

.menu-list li {
    margin-bottom: 5px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #9CA3AF;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.menu-link:hover {
    background: rgba(14, 165, 233, 0.15);
    color: var(--primary);
    transform: translateX(5px);
}

.menu-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.menu-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.menu-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}

.main-content {
    margin-left: 280px;
    flex: 1;
    background: var(--light);
    min-height: 100vh;
}

.topbar {
    background: white;
    padding: 20px 35px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.topbar-left p {
    font-size: 14px;
    color: var(--gray);
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 15px 10px 45px;
    border: 2px solid var(--border);
    border-radius: 10px;
    width: 300px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    width: 350px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.notification-btn {
    position: relative;
    background: var(--light);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.notification-btn:hover {
    background: var(--primary);
    color: white;
}

.notification-btn .badge-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 10px;
    transition: all 0.3s;
}

.user-profile:hover {
    background: var(--light);
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.user-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

.user-info p {
    font-size: 12px;
    color: var(--gray);
}

.content-area {
    padding: 35px;
}

/* ============================================
   STAT CARDS
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.stat-card {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #0EA5E9, #3B82F6);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10B981, #059669);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8B5CF6, #6366F1);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

.stat-body h3 {
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark);
}

.stat-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--gray);
}

/* ============================================
   CARDS & PANELS
   ============================================ */

.card {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--light);
    padding-bottom: 18px;
    margin-bottom: 25px;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ============================================
   TABLES
   ============================================ */

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: var(--light);
}

table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--dark);
}

table tbody tr {
    transition: all 0.2s;
}

table tbody tr:hover {
    background: var(--light);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-details h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.user-details p {
    font-size: 12px;
    color: var(--gray);
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-icon.edit {
    background: #DBEAFE;
    color: #1E40AF;
}

.btn-icon.edit:hover {
    background: #3B82F6;
    color: white;
}

.btn-icon.delete {
    background: #FEE2E2;
    color: #991B1B;
}

.btn-icon.delete:hover {
    background: #EF4444;
    color: white;
}

.btn-icon.view {
    background: #D1FAE5;
    color: #065F46;
}

.btn-icon.view:hover {
    background: #10B981;
    color: white;
}

/* ============================================
   CHARTS
   ============================================ */

.chart-container {
    position: relative;
    height: 350px;
    margin-top: 20px;
}

/* ============================================
   MEMBERSHIP STATUS
   ============================================ */

.membership-status {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 35px;
    border-radius: 20px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.membership-status::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.membership-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.plan-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.plan-type {
    font-size: 14px;
    opacity: 0.9;
}

.days-remaining {
    text-align: right;
}

.days-count {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 5px;
}

.days-label {
    font-size: 13px;
    opacity: 0.9;
}

.membership-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    position: relative;
    z-index: 1;
}

.detail-item h4 {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.detail-item p {
    font-size: 18px;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    margin-top: 20px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 10px;
    transition: width 1s ease;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .topbar {
        padding: 15px 20px;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .search-box input:focus {
        width: 250px;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .membership-details {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 35px 25px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-gray { color: var(--gray); }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-normal { font-weight: 400; }

 
 /* ============================================
   FORM CARDS & CONTAINERS
   ============================================ */

.form-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.form-card h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f3f4f6;
}

/* ============================================
   ALERT MESSAGES
   ============================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.2rem;
}

.alert-success {
    background: #d1fae5;
    border: 2px solid #10b981;
    color: #065f46;
}

.alert-success::before {
    content: '\f058';
    color: #10b981;
}

.alert-error {
    background: #fee2e2;
    border: 2px solid #ef4444;
    color: #991b1b;
}

.alert-error::before {
    content: '\f06a';
    color: #ef4444;
}

.alert-warning {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    color: #92400e;
}

.alert-warning::before {
    content: '\f071';
    color: #f59e0b;
}

.alert-info {
    background: #dbeafe;
    border: 2px solid #3b82f6;
    color: #1e40af;
}

.alert-info::before {
    content: '\f05a';
    color: #3b82f6;
}

.alert ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.alert li {
    margin: 0.25rem 0;
}

/* ============================================
   ENHANCED BUTTONS
   ============================================ */

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success,
.btn-warning {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ============================================
   DETAIL CARDS
   ============================================ */

.detail-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.detail-header {
    display: flex;
    align-items: center;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f3f4f6;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin-right: 1.5rem;
}

.detail-header h2 {
    margin: 0 0 0.5rem 0;
    color: #111827;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1200px) {
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.detail-section {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.detail-section h3 {
    color: #111827;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: #374151;
    font-weight: 600;
}

.detail-item span {
    color: #6b7280;
    text-align: right;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    margin: 0;
    color: #111827;
    font-size: 1.5rem;
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #9ca3af;
}

/* ============================================
   DATA TABLES
   ============================================ */

.data-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination-wrapper {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    border-top: 1px solid #e5e7eb;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
    display: flex;
    min-height: 100vh;
    background: #f3f4f6;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.content-wrapper {
    padding: 2rem;
    flex: 1;
    max-width: 100%;
    width: 100%;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

@media (max-width: 768px) {
    /* Container & Layout */
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* Topbar Mobile */
    .topbar {
        padding: 15px;
    }
    
    .topbar h1 {
        font-size: 18px;
    }
    
    .topbar p {
        font-size: 12px;
    }
    
    .user-profile {
        flex-direction: row;
        gap: 8px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .user-info h4 {
        font-size: 13px;
    }
    
    .user-info p {
        font-size: 11px;
    }
    
    /* Stats Cards */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card h3 {
        font-size: 20px;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .page-header > div {
        width: 100%;
    }
    
    .page-header > div[style*="display: flex"] {
        flex-direction: column;
        gap: 8px !important;
    }
    
    .page-header .btn-primary,
    .page-header .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    /* Form Actions */
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    /* Tables */
    .data-table {
        overflow-x: auto;
        display: block;
    }
    
    .data-table table {
        min-width: 600px;
    }
    
    /* Cards */
    .card {
        padding: 16px;
    }
    
    .detail-card {
        padding: 16px;
    }
    
    /* Modal */
    #send-notification-modal > div {
        max-width: 95% !important;
        padding: 20px !important;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    #send-notification-modal h3 {
        font-size: 16px !important;
    }
    
    /* Notification Method Grid */
    #send-notification-modal [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    
    #send-notification-modal label[style*="border"] {
        padding: 12px !important;
    }
    
    #send-notification-modal i[style*="font-size: 32px"] {
        font-size: 24px !important;
    }
    
    /* Member Detail Avatar */
    .user-avatar-large {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .detail-header h2 {
        font-size: 20px;
    }
    
    /* Auth Pages Mobile */
    .auth-card {
        padding: 30px 20px;
        max-width: 100%;
    }
    
    .auth-card h1 {
        font-size: 24px;
    }
    
    /* Dashboard Specific */
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    /* Button Groups */
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        overflow-x: hidden;
    }
    
    .main-content {
        overflow-x: hidden;
    }
    
    .content-wrapper {
        padding: 15px;
        overflow-x: hidden;
    }
    
    .topbar {
        padding: 12px 15px;
    }
    
    .topbar h1 {
        font-size: 16px;
    }
    
    .topbar p {
        font-size: 11px;
    }
    
    .stat-card h3 {
        font-size: 18px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .form-control {
        font-size: 14px;
        padding: 10px;
    }
    
    .badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    /* Fix page header overflow */
    .page-header {
        gap: 8px;
    }
    
    .page-header > div {
        width: 100%;
    }
    
    /* Fix detail grid */
    .detail-grid {
        gap: 12px;
    }
    
    .detail-section {
        padding: 12px;
    }
    
    .detail-item {
        font-size: 13px;
    }
    
    /* Fix tables */
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
        font-size: 12px;
    }
    
    /* Fix modal */
    #send-notification-modal {
        padding: 10px !important;
    }
    
    #send-notification-modal > div {
        padding: 20px !important;
        font-size: 14px;
    }
    
    #send-notification-modal h3 {
        font-size: 16px !important;
    }
    
    #send-notification-modal .form-control {
        font-size: 13px;
    }
    
    #send-notification-modal label {
        font-size: 13px;
    }
    
    #send-notification-modal small {
        font-size: 11px;
    }
}

/* ============================================
   SMOOTH SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}
