/* assets/css/style.css - Wellhub Mobile-First Native App Styling */

:root {
    --primary-color: #DE2B58;
    --primary-hover: #c42249;
    --primary-light: rgba(222, 43, 88, 0.1);
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-light: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 30px -10px rgba(0,0,0,0.12);
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    position: relative;
    background-color: #f6f8fa;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

/* Navbar */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    width: 100%;
}

.nav-container {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.brand-logo img {
    max-height: 36px;
    width: auto;
    object-fit: contain;
}

.brand-badge {
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.nav-link {
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

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

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #334155;
}

.tier-tag {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 99px;
    text-transform: uppercase;
}

.tier-Basic { background: #e0f2fe; color: #0369a1; }
.tier-Silver { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.tier-Gold { background: #fef3c7; color: #b45309; }
.tier-Platinum { background: #f3e8ff; color: #6b21a8; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(222, 43, 88, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(222, 43, 88, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-danger {
    background: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

/* Mobile Toggle & Drawer Styles */
.mobile-toggle-btn {
    background: #f1f5f9;
    border: none;
    color: #0f172a;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-drawer.active {
    transform: translateX(-320px);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.drawer-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-close-btn {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    color: #334155;
}

.drawer-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
}

.drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.drawer-link:active {
    background: #e2e8f0;
}

.drawer-admin-highlight {
    background: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px;
    box-sizing: border-box;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 40px 28px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 100%;
    box-sizing: border-box;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: -0.8px;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: #94a3b8;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Search Bar */
.search-box {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 6px;
    display: flex;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    box-sizing: border-box;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 14px;
    font-size: 0.95rem;
    color: #1e293b;
    border-radius: var(--radius-sm);
    min-width: 0;
}

/* Categories Bar */
.category-filter {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 24px;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.cat-btn {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.cat-btn:hover, .cat-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* Studios Grid */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
}

.studios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.studio-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

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

.studio-image-wrapper {
    height: 180px;
    width: 100%;
    position: relative;
    background: #1e293b;
    overflow: hidden;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.studio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.studio-tier-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 99px;
}

.studio-category-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.studio-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.studio-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.studio-address {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.studio-desc {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.45;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.studio-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.studio-hours {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

/* Studio Details Page */
.studio-detail-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.studio-main-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.studio-hero-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.studio-detail-content {
    padding: 24px;
}

.checkin-action-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

/* Forms & Auth */
.auth-box {
    max-width: 420px;
    width: 100%;
    margin: 40px auto;
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 32px 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 18px;
    width: 100%;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: #334155;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Admin Dashboard Tables & Forms */
.admin-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    box-sizing: border-box;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Table */
.data-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
    min-width: 600px;
}

.data-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 12px 14px;
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: #334155;
    vertical-align: middle;
}

/* Status Badges */
.badge-status {
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-active { background: #dcfce7; color: #15803d; }
.badge-inactive { background: #fee2e2; color: #b91c1c; }

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

/* Footer & Agency Credit */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 32px 20px;
    margin-top: auto;
    font-size: 0.88rem;
    width: 100%;
    box-sizing: border-box;
}

.footer-container {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.agency-credit-wrapper {
    margin-top: 8px;
}

.agency-credit-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(222, 43, 88, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border: 1px solid rgba(222, 43, 88, 0.35);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 99px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.agency-credit-badge:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(222, 43, 88, 0.4);
}

.agency-name {
    color: #ff4d73;
    font-weight: 800;
}

.agency-credit-badge:hover .agency-name {
    color: #ffffff;
}

.heart-pulse {
    display: inline-block;
    animation: heartBeat 1.5s infinite ease-in-out;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

/* Mobile Portrait Breakpoints & Responsive App Navigation */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    .navbar {
        padding-top: max(10px, env(safe-area-inset-top));
    }

    .nav-container {
        height: 64px;
        padding: 0 16px;
    }

    .mobile-toggle-btn {
        width: 44px;
        height: 44px;
        padding: 0;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: #f1f5f9;
    }

    .brand-logo img {
        max-height: 32px;
        height: 32px;
        max-width: 120px;
    }

    .studio-hero-img {
        height: 220px;
    }

    .studio-detail-container {
        grid-template-columns: 1fr;
    }

    .hero-section {
        padding: 24px 18px;
        border-radius: var(--radius-md);
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.92rem;
    }

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

    .auth-box {
        margin: 16px auto;
        padding: 24px 16px;
    }

    .main-wrapper {
        padding: 16px 12px;
    }

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

    .stat-card {
        padding: 14px 12px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .stat-number {
        font-size: 1.4rem;
    }
}
