@font-face {
    font-family: 'BYekan';
    src: url('/fonts/BYekan.woff2') format('woff2'), url('/fonts/BYekan.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'FarCasablanca';
    src: url('/fonts/FarCasablanca.woff2') format('woff2'), url('/fonts/FarCasablanca.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Lalezar-Regular';
    src: url('/fonts/Lalezar-Regular.woff2') format('woff2'), url('/fonts/Lalezar-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* ============================================================
   Modern Global Resets & Typography
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: #090d16;
    color: #f8fafc;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body, 
.mud-typography, 
.mud-input, 
.mud-button-root, 
.mud-table, 
.mud-dialog, 
.mud-input-control,
.mud-nav-link,
.mud-chip {
    font-family: 'FarCasablanca', 'BYekan', sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #ffffff !important;
    line-height: 1.3;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
}

img, svg {
    vertical-align: middle;
}

button, input, optgroup, select, textarea {
    font-family: inherit;
}

/* ============================================================
   GymPlanner Modern Authentication Theme (Login & Register)
   ============================================================ */

.auth-page-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.15) 0%, transparent 45%),
                radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.1) 0%, transparent 40%),
                #0b0f19;
    font-family: 'FarCasablanca', 'BYekan', sans-serif !important;
    direction: rtl;
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(19, 26, 43, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-card.register-card {
    max-width: 620px;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #f97316, transparent);
    border-radius: 3px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo-icon {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.05));
    border: 1px solid rgba(249, 115, 22, 0.4);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #f97316;
    box-shadow: 0 8px 20px -4px rgba(249, 115, 22, 0.25);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
}

.auth-subtitle {
    font-size: 0.88rem;
    color: #94a3b8;
    margin: 0;
}

.auth-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 24px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.auth-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.auth-tab.active {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.auth-form-group {
    margin-bottom: 18px;
    text-align: right;
}

.auth-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 7px;
}

.auth-label svg {
    width: 16px;
    height: 16px;
    color: #f97316;
}

.auth-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.92rem;
    font-family: inherit;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #f97316;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.auth-input::placeholder {
    color: #64748b;
    font-size: 0.85rem;
}

select.auth-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 16px;
    padding-left: 36px;
}

select.auth-input option {
    background-color: #1e293b;
    color: #ffffff;
}

.auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 540px) {
    .auth-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .auth-card {
        padding: 28px 20px;
    }
}

.auth-btn-submit {
    width: 100%;
    padding: 13px;
    margin-top: 10px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.5);
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
}

.auth-btn-submit:active {
    transform: translateY(0);
}

.validation-message {
    color: #f87171 !important;
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
    text-align: right;
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
    line-height: 1.5;
}

.auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 0.86rem;
    color: #94a3b8;
}

.auth-footer a {
    color: #f97316;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #fb923c;
    text-decoration: underline;
}

.auth-help-text {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

/* ============================================================
   GymPlanner Custom Modern Dashboard & Component System
   ============================================================ */

:root {
    --gp-bg-base: #090d16;
    --gp-bg-surface: #101624;
    --gp-bg-surface-elevated: #161e31;
    --gp-bg-card: rgba(16, 22, 36, 0.85);
    --gp-border: rgba(255, 255, 255, 0.07);
    --gp-border-hover: rgba(249, 115, 22, 0.35);
    --gp-orange: #f97316;
    --gp-orange-glow: rgba(249, 115, 22, 0.2);
    --gp-cyan: #06b6d4;
    --gp-cyan-glow: rgba(6, 182, 212, 0.2);
    --gp-emerald: #10b981;
    --gp-emerald-glow: rgba(16, 185, 129, 0.2);
    --gp-purple: #8b5cf6;
    --gp-purple-glow: rgba(139, 92, 246, 0.2);
    --gp-rose: #f43f5e;
    --gp-rose-glow: rgba(244, 63, 94, 0.2);
    --gp-text-main: #f8fafc;
    --gp-text-secondary: #94a3b8;
    --gp-text-muted: #64748b;
}

/* Layout */
.gp-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--gp-bg-base);
    color: var(--gp-text-main);
    direction: rtl;
    font-family: 'FarCasablanca', 'BYekan', sans-serif !important;
}

/* Modern Sidebar */
.gp-sidebar {
    width: 270px;
    background: var(--gp-bg-surface);
    border-left: 1px solid var(--gp-border);
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
    z-index: 50;
    position: sticky;
    top: 0;
    height: 100vh;
    box-sizing: border-box;
}

.gp-sidebar.collapsed {
    width: 80px;
}

.gp-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid var(--gp-border);
}

.gp-brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(234, 88, 12, 0.1));
    border: 1px solid var(--gp-orange);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gp-orange);
    box-shadow: 0 4px 14px var(--gp-orange-glow);
    flex-shrink: 0;
}

.gp-brand-text {
    font-family: 'Lalezar-Regular', 'FarCasablanca', sans-serif;
    font-size: 1.35rem;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #fff 40%, #fdba74);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    overflow: hidden;
}

.gp-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gp-nav-label {
    font-size: 0.72rem;
    color: var(--gp-text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 10px 14px 4px;
    white-space: nowrap;
}

.gp-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--gp-text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}

.gp-nav-item:hover {
    color: #fff;
    background: var(--gp-bg-surface-elevated);
    border-color: rgba(255, 255, 255, 0.05);
    transform: translateX(-3px);
}

.gp-nav-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.18), rgba(249, 115, 22, 0.04));
    border-color: rgba(249, 115, 22, 0.35);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.12);
}

.gp-nav-item.active .gp-nav-icon {
    color: var(--gp-orange);
    transform: scale(1.1);
}

.gp-nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.gp-nav-badge {
    margin-right: auto;
    background: rgba(249, 115, 22, 0.18);
    color: var(--gp-orange);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.gp-sidebar-footer {
    padding: 16px 14px;
    border-top: 1px solid var(--gp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(13, 18, 30, 0.6);
}

.gp-user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.gp-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.gp-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.3;
}

.gp-user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.gp-user-role {
    font-size: 0.72rem;
    color: var(--gp-orange);
}

/* Main Content Area */
.gp-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
}

/* Top Header */
.gp-header {
    height: 70px;
    background: rgba(16, 22, 36, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--gp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.gp-header-left, .gp-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gp-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--gp-border);
    color: var(--gp-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.gp-icon-btn:hover {
    background: var(--gp-bg-surface-elevated);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Content Container */
.gp-content {
    padding: 28px;
    flex: 1;
    max-width: 1560px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Dashboard Cards (Stat Cards) */
.gp-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.gp-stat-card {
    background: var(--gp-bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--gp-border);
    border-radius: 20px;
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gp-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--gp-border-hover);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.5), 0 0 20px var(--gp-card-glow, transparent);
}

.gp-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gp-card-gradient, linear-gradient(90deg, var(--gp-orange), transparent));
    opacity: 0.8;
}

.gp-stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.gp-stat-title {
    font-size: 0.88rem;
    color: var(--gp-text-secondary);
    font-weight: 500;
}

.gp-stat-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gp-stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 8px;
    font-feature-settings: "tnum";
    letter-spacing: -0.5px;
}

.gp-stat-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--gp-text-muted);
}

.gp-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.74rem;
}

.gp-stat-badge.positive {
    background: rgba(16, 185, 129, 0.15);
    color: var(--gp-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.gp-stat-badge.neutral {
    background: rgba(6, 182, 212, 0.15);
    color: var(--gp-cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Modern Card Container */
.gp-card {
    background: var(--gp-bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--gp-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.gp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gp-border);
}

.gp-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gp-card-title-icon {
    color: var(--gp-orange);
}

.gp-card-subtitle {
    font-size: 0.8rem;
    color: var(--gp-text-muted);
    margin-top: 4px;
}

/* Dashboard Grid Layout */
.gp-grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

@media (max-width: 1080px) {
    .gp-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Quick Actions Section */
.gp-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}

.gp-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--gp-border);
    border-radius: 16px;
    color: var(--gp-text-main);
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.gp-quick-btn:hover {
    background: var(--gp-bg-surface-elevated);
    border-color: rgba(249, 115, 22, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -4px rgba(249, 115, 22, 0.2);
    color: #fff;
}

.gp-quick-btn .gp-quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.gp-quick-btn:hover .gp-quick-icon {
    transform: scale(1.1);
}

.gp-quick-title {
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
}

/* Welcome Banner */
.gp-welcome-banner {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(139, 92, 246, 0.08) 50%, rgba(6, 182, 212, 0.04) 100%),
                var(--gp-bg-card);
    border: 1px solid rgba(249, 115, 22, 0.25);
    border-radius: 24px;
    padding: 28px 32px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.4);
}

.gp-welcome-banner::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.gp-welcome-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.gp-welcome-subtitle {
    font-size: 0.92rem;
    color: var(--gp-text-secondary);
}

/* Page Containers, Headers & Titles */
.gp-page-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.gp-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.gp-page-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff !important;
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.gp-page-subtitle {
    font-size: 0.92rem;
    color: var(--gp-text-secondary, #94a3b8) !important;
    margin: 0;
    line-height: 1.6;
}

/* Page Toolbar & Action Bars */
.gp-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.gp-toolbar-right,
.gp-toolbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.gp-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--gp-emerald);
    font-size: 0.82rem;
    font-weight: 600;
}

.gp-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--gp-emerald);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: gpPulse 2s infinite;
}

@keyframes gpPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Modern Button */
.gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 1px solid transparent;
}

.gp-btn-primary {
    background: linear-gradient(135deg, var(--gp-orange), #ea580c);
    color: #fff;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

.gp-btn-primary:hover {
    background: linear-gradient(135deg, #fb923c, #f97316);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
    transform: translateY(-2px);
    color: #fff;
}

.gp-btn-outline {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--gp-border);
    color: var(--gp-text-main);
}

.gp-btn-outline:hover {
    background: var(--gp-bg-surface-elevated);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

.gp-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.gp-btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    transform: translateY(-2px);
    color: #fff;
}

/* Custom SVG Chart Styles */
.gp-chart-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.gp-chart-grid line {
    stroke: rgba(255, 255, 255, 0.06);
    stroke-dasharray: 4 4;
}

.gp-chart-axis-text {
    fill: #64748b;
    font-size: 11px;
    font-family: inherit;
}

.gp-chart-dot {
    fill: #f97316;
    stroke: #090d16;
    stroke-width: 3;
    transition: all 0.2s;
    cursor: pointer;
}

.gp-chart-dot:hover {
    r: 7;
    fill: #fff;
    stroke: #f97316;
}

/* Recent Activity List */
.gp-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gp-activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--gp-border);
    transition: all 0.2s;
}

.gp-activity-item:hover {
    background: var(--gp-bg-surface-elevated);
    border-color: rgba(255, 255, 255, 0.1);
}

.gp-activity-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gp-activity-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.gp-activity-text {
    display: flex;
    flex-direction: column;
}

.gp-activity-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
}

.gp-activity-time {
    font-size: 0.74rem;
    color: var(--gp-text-muted);
}

/* ============================================================
   Modern UI Component Extensions (Tables, Forms, Modals, Tabs)
   ============================================================ */

/* Modern Table */
.gp-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid var(--gp-border);
    background: var(--gp-bg-card);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    margin-top: 16px;
}

.gp-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    direction: rtl;
}

.gp-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--gp-text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gp-border);
    white-space: nowrap;
    user-select: none;
}

.gp-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--gp-text-main);
    font-size: 0.92rem;
    vertical-align: middle;
}

.gp-table tbody tr {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gp-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.gp-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Toolbar */
.gp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.gp-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.gp-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modern Inputs */
.gp-search-input-wrapper {
    position: relative;
    min-width: 260px;
    max-width: 380px;
    flex: 1;
}

.gp-search-input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gp-text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.gp-search-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--gp-border);
    border-radius: 14px;
    padding: 11px 42px 11px 16px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.gp-search-input:focus {
    border-color: var(--gp-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
    background: rgba(15, 23, 42, 0.9);
}

.gp-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    text-align: right;
}

.gp-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gp-text-secondary);
}

.gp-input, .gp-select, .gp-textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--gp-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    direction: rtl;
}

.gp-input:focus, .gp-select:focus, .gp-textarea:focus {
    border-color: var(--gp-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
    background: rgba(15, 23, 42, 0.9);
}

/* Modern Tab Filter */
.gp-tabs {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--gp-border);
    border-radius: 14px;
    padding: 4px;
    gap: 4px;
}

.gp-tab-btn {
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gp-text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.gp-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.gp-tab-btn.active {
    background: linear-gradient(135deg, var(--gp-orange), #ea580c);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}

/* Modern Pagination */
.gp-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--gp-border);
    background: rgba(255, 255, 255, 0.01);
    color: var(--gp-text-muted);
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 12px;
}

.gp-pagination-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gp-page-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--gp-border);
    color: var(--gp-text-main);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.86rem;
    transition: all 0.2s;
}

.gp-page-btn:hover:not(:disabled) {
    background: var(--gp-bg-surface-elevated);
    border-color: rgba(249, 115, 22, 0.4);
    color: #fff;
}

.gp-page-btn.active {
    background: var(--gp-orange);
    border-color: var(--gp-orange);
    color: #fff;
}

.gp-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Empty State */
.gp-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gp-text-muted);
}

.gp-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--gp-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--gp-text-secondary);
}

.gp-empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.gp-empty-desc {
    font-size: 0.88rem;
    max-width: 320px;
    margin: 0 auto;
}

/* User Avatar Initial */
.gp-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(139, 92, 246, 0.25));
    border: 1px solid rgba(249, 115, 22, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Modern Chat Interface */
.gp-chat-box {
    display: flex;
    flex-direction: column;
    height: 60vh;
    border-radius: 18px;
    background: var(--gp-bg-card);
    border: 1px solid var(--gp-border);
    overflow: hidden;
}

.gp-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gp-chat-bubble {
    max-width: 75%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.6;
    position: relative;
    word-break: break-word;
}

.gp-chat-bubble.mine {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.1));
    border: 1px solid rgba(249, 115, 22, 0.35);
    color: #fff;
    border-top-right-radius: 4px;
}

.gp-chat-bubble.theirs {
    align-self: flex-end;
    background: var(--gp-bg-surface-elevated);
    border: 1px solid var(--gp-border);
    color: var(--gp-text-main);
    border-top-left-radius: 4px;
}

.gp-chat-time {
    font-size: 0.72rem;
    color: var(--gp-text-muted);
    margin-top: 6px;
    text-align: left;
}

.gp-chat-input-bar {
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid var(--gp-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ============================================================
   GymPlanner Modern Dialog System (Dark Luxury)
   ============================================================ */
.mud-overlay {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    background-color: rgba(5, 8, 16, 0.78) !important;
}

.mud-dialog {
    background: #111827 !important;
    background: linear-gradient(145deg, #131b2e 0%, #0d1322 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    color: #f1f5f9 !important;
    overflow: hidden !important;
    direction: rtl !important;
}

.mud-dialog .mud-dialog-title {
    padding: 18px 24px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mud-dialog .mud-dialog-content {
    padding: 24px !important;
    color: #cbd5e1 !important;
}

.mud-dialog .mud-dialog-actions {
    padding: 16px 24px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(0, 0, 0, 0.25) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
}

.gp-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.gp-dialog-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.gp-dialog-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}

.gp-dialog-close:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ============================================================
   Mobile & Responsive Navigation & Layout Styles
   ============================================================ */

/* Mobile Backdrop: deep glass blur */
.gp-sidebar-backdrop {
    display: none;
}

@media (max-width: 900px) {
    .gp-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(3, 7, 18, 0.58);
        backdrop-filter: blur(12px) saturate(160%);
        -webkit-backdrop-filter: blur(12px) saturate(160%);
        z-index: 998;
        cursor: pointer;
        animation: gpFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Transparent Glassmorphism Sliding Sidebar Drawer */
    .gp-sidebar {
        position: fixed !important;
        top: 0 !important;
        right: -320px !important;
        width: 300px !important;
        max-width: 86vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 999 !important;
        box-shadow: -15px 0 45px rgba(0, 0, 0, 0.75), inset -1px 0 0 rgba(255, 255, 255, 0.05) !important;
        transition: right 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
        transform: none !important;
        border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-right: none !important;
        background: rgba(13, 19, 34, 0.78) !important;
        backdrop-filter: blur(28px) saturate(190%) !important;
        -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    }

    .gp-sidebar.mobile-open {
        right: 0 !important;
    }

    /* Force full width on mobile drawer even if collapsed class is toggled */
    .gp-sidebar.collapsed {
        width: 300px !important;
    }

    .gp-sidebar-brand {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 18px 18px !important;
        background: rgba(255, 255, 255, 0.02) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .gp-sidebar-close-btn {
        display: flex !important;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #94a3b8;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
        flex-shrink: 0;
    }

    .gp-sidebar-close-btn:hover {
        background: rgba(239, 68, 68, 0.2);
        border-color: rgba(239, 68, 68, 0.4);
        color: #ef4444;
    }

    .gp-sidebar-nav {
        padding: 16px 14px !important;
        gap: 6px !important;
    }

    .gp-nav-item {
        padding: 12px 16px !important;
        border-radius: 14px !important;
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        font-size: 0.94rem !important;
        backdrop-filter: blur(8px) !important;
    }

    .gp-nav-item:hover {
        background: rgba(255, 255, 255, 0.08) !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
        color: #fff !important;
        transform: translateX(-4px) !important;
    }

    .gp-nav-item.active {
        background: linear-gradient(90deg, rgba(249, 115, 22, 0.25), rgba(249, 115, 22, 0.08)) !important;
        border-color: rgba(249, 115, 22, 0.45) !important;
        box-shadow: 0 4px 18px rgba(249, 115, 22, 0.18) !important;
        color: #fff !important;
    }

    .gp-sidebar-footer {
        background: rgba(8, 12, 22, 0.7) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 16px 18px !important;
    }
}

/* Desktop collapsed rules (only on screens > 900px) */
@media (min-width: 901px) {
    .gp-sidebar-close-btn {
        display: none !important;
    }

    .gp-sidebar.collapsed {
        width: 80px;
    }

    .gp-sidebar.collapsed .gp-brand-text,
    .gp-sidebar.collapsed .gp-nav-label,
    .gp-sidebar.collapsed .gp-nav-item span:not(.gp-nav-icon),
    .gp-sidebar.collapsed .gp-user-info,
    .gp-sidebar.collapsed .gp-logout-btn {
        display: none !important;
    }

    .gp-sidebar.collapsed .gp-sidebar-brand {
        justify-content: center;
        padding: 22px 0;
    }

    .gp-sidebar.collapsed .gp-nav-item {
        justify-content: center;
        padding: 11px 0;
    }

    .gp-sidebar.collapsed .gp-user-pill {
        justify-content: center;
    }
}

    .gp-main {
        width: 100% !important;
        min-width: 0 !important;
    }

    .gp-header {
        padding: 0 16px;
        height: 64px;
    }

    .gp-content {
        padding: 20px 16px;
    }

    .gp-welcome-banner {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .gp-welcome-title {
        font-size: 1.35rem;
    }

    .gp-stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
        margin-bottom: 20px;
    }
}

/* Smartphone screens (<= 640px) */
@media (max-width: 640px) {
    .gp-header {
        padding: 0 12px;
        height: 58px;
    }

    .gp-header-title {
        font-size: 0.9rem !important;
        max-width: 170px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .gp-header-right {
        gap: 8px;
    }

    .gp-header-left {
        gap: 8px;
    }

    .gp-status-indicator {
        display: none; /* Hide 'Online' pill on small phones to conserve top bar space */
    }

    .gp-content {
        padding: 14px 10px;
    }

    .gp-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 18px;
    }

    .gp-page-title {
        font-size: 1.35rem;
    }

    .gp-page-subtitle {
        font-size: 0.84rem;
    }

    .gp-stat-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }

    .gp-stat-card {
        padding: 16px;
        border-radius: 16px;
    }

    .gp-stat-value {
        font-size: 1.5rem;
    }

    .gp-card {
        padding: 16px;
        border-radius: 16px;
    }

    .gp-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .gp-quick-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gp-quick-btn {
        padding: 14px 10px;
        border-radius: 14px;
    }

    .gp-quick-title {
        font-size: 0.8rem;
    }

    /* Toolbar & Search */
    .gp-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .gp-toolbar-right, .gp-toolbar-left {
        width: 100%;
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
    }

    .gp-search-input-wrapper {
        min-width: 100%;
        max-width: 100%;
    }

    /* Tabs */
    .gp-tabs {
        width: 100%;
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
    }

    .gp-tab-btn {
        flex: 1;
        padding: 8px 10px;
        font-size: 0.8rem;
        white-space: nowrap;
        text-align: center;
    }

    /* Tables */
    .gp-table-container {
        border-radius: 14px;
        margin-top: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .gp-table th, .gp-table td {
        padding: 12px 12px;
        font-size: 0.84rem;
        white-space: nowrap;
    }

    /* Chat */
    .gp-chat-box {
        height: 72vh;
        border-radius: 14px;
    }

    .gp-chat-bubble {
        max-width: 88%;
        padding: 10px 14px;
        font-size: 0.86rem;
    }

    .gp-chat-input-bar {
        padding: 12px 14px;
        gap: 8px;
    }

    /* Dialogs / Modals */
    .mud-dialog {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 10px auto !important;
        border-radius: 16px !important;
    }

    .mud-dialog .mud-dialog-title {
        padding: 14px 16px !important;
    }

    .mud-dialog .mud-dialog-content {
        padding: 16px 14px !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }

    .mud-dialog .mud-dialog-actions {
        padding: 12px 16px !important;
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .gp-dialog-title {
        font-size: 1rem;
    }

    /* Responsive video player containers */
    video {
        max-width: 100% !important;
        height: auto !important;
        border-radius: 10px;
    }
}

@keyframes gpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}