/* Dolyst - Mobile First CSS */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --accent: #ec4899;

    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    --nav-height: 60px;
    --header-height: 100px;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Landing Page */
.landing-page {
    background: #ffffff;
    
    xxmin-height: 100vh;
    xxmin-height: 100dvh;  Dynamic viewport height - accounts for mobile browser UI */
    
    display: block;
    padding: 2rem 1rem 4rem 1rem; /* Extra bottom padding for browser UI */
    position: relative;
}

.landing-container {
    text-align: center;
    color: var(--text-primary);
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

.landing-logo {
    width: 240px;
    height: auto;
    margin-bottom: 0.5rem;
}

@media (max-width: 400px), (max-height: 700px) {
    .landing-logo {
        width: 180px;
    }

    .landing-tagline {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .landing-features {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .feature {
        padding: 1rem;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
    }
}

.landing-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 500;
}

.landing-features {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    background: white;
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-goals .feature-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.feature-progress .feature-icon {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.feature-compete .feature-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.feature-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.feature-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.landing-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.landing-actions .btn-outline {
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.landing-actions .btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.landing-footer {
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Top Header */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    width: 150px;
    height: auto;
    border-radius: var(--radius-sm);
}

.header-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
}

.header-icon:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.badge-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.625rem;
    font-weight: 500;
    padding: 0.5rem;
    min-width: 60px;
}

.nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.nav-item.active {
    color: var(--primary);
}

.nav-add {
    background: var(--gradient-primary);
    color: white !important;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    margin-top: -1.5rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
    transition: all 0.3s ease;
}

.nav-add:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.nav-add:active {
    transform: scale(1.05);
}

.nav-add i {
    margin: 0;
    font-size: 1.75rem;
}

.nav-add-disabled {
    background: var(--bg-tertiary) !important;
    color: var(--text-muted) !important;
    box-shadow: none !important;
    cursor: default;
    pointer-events: none;
}

/* Hamburger Menu Button */
.hamburger-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.hamburger-btn:hover {
    color: var(--primary);
}

/* Hamburger Menu Overlay */
.hamburger-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.hamburger-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hamburger Slide-out Menu */
.hamburger-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 80%;
    height: 100%;
    background: var(--bg-secondary);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.hamburger-menu.active {
    transform: translateX(0);
}

.hamburger-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.hamburger-logo {
    height: 40px;
    width: auto;
}

.hamburger-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    padding: 0.5rem;
    cursor: pointer;
}

.hamburger-close:hover {
    color: var(--text-primary);
}

.hamburger-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.hamburger-nav-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.hamburger-nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.hamburger-nav-item.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.hamburger-nav-item i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 1rem;
    text-align: center;
}

/* Main Content */
.main-content {
    padding: 1rem;
    min-height: 100vh;
}

.main-content.logged-in {
    padding-top: calc(var(--header-height) + 1rem);
    padding-bottom: calc(var(--nav-height) + 1rem);
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease-out;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    background: #ffffff;
    color: #1f2937;
}

.form-select option {
    background: #ffffff;
    color: #1f2937;
}

.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-error {
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #cffafe;
    color: #155e75;
}

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.5;
}

/* Goal Card */
.goal-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease-out;
}

.goal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.goal-card:active {
    transform: translateY(-2px);
}

.goal-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.goal-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.goal-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.75rem;
}

.goal-status {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.goal-card:hover .goal-status {
    transform: scale(1.1);
}

.goal-progress {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.goal-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease-out;
    background: var(--gradient-primary);
    position: relative;
}

.goal-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
    background-size: 200% 100%;
}

.goal-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Group Card */
.group-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.group-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.group-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.group-info {
    flex: 1;
}

.group-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.group-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.group-status {
    text-align: right;
}

.group-progress-ring {
    width: 40px;
    height: 40px;
}

/* Progress Ring */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.3s;
    stroke-linecap: round;
}

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0.125rem;
    text-decoration: none;
}

.tag:hover {
    text-decoration: none;
}

.tag-primary {
    background: var(--primary-light);
    color: white;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

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

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-form {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* Dashboard */
.dashboard-header {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease-out;
}

.greeting {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.date-display {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
}

.section-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.quick-action {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.quick-action:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.quick-action:hover::before {
    transform: scaleX(1);
}

.quick-action i {
    font-size: 1.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: block;
}

.quick-action span {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Leaderboard */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-rank {
    width: 24px;
    font-weight: 700;
    color: var(--text-muted);
}

.leaderboard-rank.gold {
    color: #f59e0b;
}

.leaderboard-rank.silver {
    color: #64748b;
}

.leaderboard-rank.bronze {
    color: #b45309;
}

.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.leaderboard-score {
    font-weight: 600;
    color: var(--primary);
}

/* Messages */
.message-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
}

.message-item.unread {
    background: var(--bg-tertiary);
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.message-sender {
    font-weight: 500;
    font-size: 0.875rem;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.message-subject {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Profile */
.profile-header {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--primary);
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.profile-username {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

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

/* Menu List */
.menu-list {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item i {
    width: 20px;
    color: var(--text-secondary);
}

.menu-item span {
    flex: 1;
}

.menu-item .menu-arrow {
    color: var(--text-muted);
}

.menu-item.danger {
    color: var(--danger);
}

.menu-item.danger i {
    color: var(--danger);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* Chip Select */
.chip-select {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}

.chip:hover {
    text-decoration: none;
    border-color: var(--primary-light);
}

.chip.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-tertiary);
    border-radius: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Entry Log */
.entry-log {
    border-left: 2px solid var(--border-color);
    padding-left: 1rem;
    margin-left: 0.5rem;
}

.entry-item {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.entry-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.entry-item::before {
    content: '';
    position: absolute;
    left: -1.375rem;
    top: 0.25rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.entry-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.entry-value {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.entry-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Referral Card */
.referral-card {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.referral-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.referral-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.referral-code {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem;
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 0.75rem;
    letter-spacing: 0.1em;
}

.referral-copy {
    background: white;
    color: var(--primary);
    width: 100%;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

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

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

/* Responsive - Tablet and up */
@media (min-width: 768px) {
    .main-content {
        max-width: 600px;
        margin: 0 auto;
    }

    .modal {
        max-width: 500px;
        border-radius: var(--radius-xl);
        margin: auto;
    }

    .modal-overlay {
        align-items: center;
    }

    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }
}
