/* ============================================
   KazPools.com - Main Stylesheet
   Modern, clean design with blue/white theme
   ============================================ */

/* ---- RESET & BASE ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary:       #1a73e8;
    --primary-dark:  #1557b0;
    --primary-light: #e8f0fe;
    --accent:        #00b4d8;
    --success:       #2e7d32;
    --success-light: #e8f5e9;
    --error:         #c62828;
    --error-light:   #ffebee;
    --warning:       #f57f17;
    --warning-light: #fff8e1;
    --dark:          #1a1a2e;
    --gray-dark:     #444;
    --gray:          #777;
    --gray-light:    #ccc;
    --bg:            #f0f4ff;
    --white:         #ffffff;
    --shadow:        0 4px 20px rgba(0,0,0,0.12);
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.08);
    --radius:        12px;
    --radius-sm:     6px;
    --transition:    all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--dark);
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.navbar {
    background: var(--dark);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-brand .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.navbar-brand .brand-text {
    font-size: 22px;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}

.navbar-brand .brand-text span {
    color: var(--accent);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.navbar-nav a {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.navbar-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}

.navbar-nav .btn-nav {
    background: var(--primary);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
}

.navbar-nav .btn-nav:hover {
    background: var(--primary-dark);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--dark) 0%, #16213e 100%);
    padding: 30px;
    text-align: center;
}

.card-header .logo {
    width: 70px;
    height: 70px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 30px;
    color: white;
    box-shadow: 0 4px 15px rgba(26,115,232,0.4);
}

.card-header h1 {
    font-size: 26px;
    color: white;
    font-weight: 700;
    letter-spacing: 1px;
}

.card-header h1 span {
    color: var(--accent);
}

.card-header p {
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    margin-top: 6px;
}

.card-body {
    padding: 35px;
}

/* ============================================
   AUTH FORMS (Login / Register)
   ============================================ */
.auth-card {
    width: 100%;
    max-width: 440px;
}

.auth-card.wide {
    max-width: 580px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group .input-wrapper {
    position: relative;
}

.form-group .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 16px;
    pointer-events: none;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--dark);
    background: #fafafa;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

.form-group input.error {
    border-color: var(--error);
}

.form-group input.success {
    border-color: var(--success);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(26,115,232,0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(26,115,232,0.45);
    color: white;
    text-decoration: none;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-danger {
    background: linear-gradient(135deg, #e53935 0%, var(--error) 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn-success {
    background: linear-gradient(135deg, #43a047 0%, var(--success) 100%);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    text-decoration: none;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    width: auto;
}

/* ============================================
   ALERTS / MESSAGES
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-left: 4px solid transparent;
}

.alert-error {
    background: var(--error-light);
    color: var(--error);
    border-left-color: var(--error);
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border-left-color: var(--success);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning);
    border-left-color: var(--warning);
}

.alert ul {
    margin: 5px 0 0 15px;
}

/* ============================================
   FORM FOOTER LINKS
   ============================================ */
.form-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: var(--gray);
}

.form-footer a {
    color: var(--primary);
    font-weight: 600;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--gray-light);
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-light);
}

/* ============================================
   PASSWORD STRENGTH METER
   ============================================ */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--gray-light);
    margin-bottom: 4px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: var(--transition);
}

.strength-text {
    font-size: 11px;
    color: var(--gray);
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 250px;
    background: var(--dark);
    color: white;
    padding: 25px 0;
    flex-shrink: 0;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-section {
    padding: 0 15px;
    margin-bottom: 25px;
}

.sidebar-section .section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.35);
    padding: 0 10px;
    margin-bottom: 8px;
}

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

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: rgba(255,255,255,0.75);
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}

.sidebar-nav li a .icon {
    font-size: 18px;
    width: 22px;
    text-align: center;
}

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

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.page-subtitle {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 30px;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 18px;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-card.blue  { border-left-color: var(--primary); }
.stat-card.green { border-left-color: #43a047; }
.stat-card.red   { border-left-color: #e53935; }
.stat-card.cyan  { border-left-color: var(--accent); }

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card.blue  .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-card.green .stat-icon { background: #e8f5e9; color: #43a047; }
.stat-card.red   .stat-icon { background: #ffebee; color: #e53935; }
.stat-card.cyan  .stat-icon { background: #e0f7fa; color: var(--accent); }

.stat-info .stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.stat-info .stat-label {
    font-size: 13px;
    color: var(--gray);
}

/* ============================================
   TABLES
   ============================================ */
.table-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.table-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: #f8f9ff;
    padding: 12px 18px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    border-bottom: 2px solid #eee;
}

tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
}

tbody tr:hover {
    background: #fafbff;
}

tbody td {
    padding: 13px 18px;
    font-size: 14px;
    color: var(--gray-dark);
}

/* ============================================
   BADGES / ROLE PILLS
   ============================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin     { background: #fce4ec; color: #c62828; }
.badge-moderator { background: #fff3e0; color: #e65100; }
.badge-member    { background: var(--primary-light); color: var(--primary); }
.badge-guest     { background: #f5f5f5; color: var(--gray); }
.badge-active    { background: var(--success-light); color: var(--success); }
.badge-inactive  { background: #f5f5f5; color: var(--gray); }
.badge-verified  { background: var(--success-light); color: var(--success); }
.badge-unverified{ background: var(--error-light); color: var(--error); }

/* ============================================
   USER AVATAR
   ============================================ */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================
   WELCOME BANNER
   ============================================ */
.welcome-banner {
    background: linear-gradient(135deg, var(--dark) 0%, #16213e 60%, #0f3460 100%);
    border-radius: var(--radius);
    padding: 28px;
    color: white;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.welcome-banner::after {
    content: '🏊';
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 70px;
    opacity: 0.15;
}

.welcome-banner h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

.welcome-banner p {
    color: rgba(255,255,255,0.65);
    font-size: 14px;
}

.welcome-banner .role-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 20px;
    font-size: 13px;
    margin-top: auto;
}

.footer a {
    color: rgba(255,255,255,0.65);
}

/* ============================================
   SHOW/HIDE PASSWORD
   ============================================ */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray);
    font-size: 16px;
    user-select: none;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary);
}

/* ============================================
   CHECKBOX / REMEMBER ME
   ============================================ */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray);
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .card-body {
        padding: 22px;
    }

    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .main-content {
        padding: 20px;
    }

    .navbar-nav {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        max-width: 100%;
    }
}