:root {
    /* Default Dark Theme */
    --primary: #84CC16;
    --primary-light: rgba(132, 204, 22, 0.2);
    --background: #000000;
    --surface: #09090B;
    --card: #18181B;
    --text: #F9FAFB;
    --text-secondary: #D1D5DB;
    --border: #27272A;
    --success: #34D399;
    --error: #F87171;
    --font-family: 'Outfit', sans-serif;
}

[data-theme="light"] {
    --primary: #65A30D;
    --primary-light: rgba(101, 163, 13, 0.2);
    --background: #F1F5F9;
    --surface: #FFFFFF;
    --card: #F8FAFC;
    --text: #111827;
    --text-secondary: #4B5563;
    --border: #D1D5DB;
}

[data-theme="sunset"] {
    --primary: #F97316;
    --primary-light: rgba(249, 115, 22, 0.2);
    --background: #1E1B4B;
    --surface: #312E81;
    --card: #3730A3;
    --text: #F8FAFC;
    --text-secondary: #C7D2FE;
    --border: #4338CA;
}

[data-theme="ocean"] {
    --primary: #06B6D4;
    --primary-light: rgba(6, 182, 212, 0.2);
    --background: #020617;
    --surface: #0F172A;
    --card: #1E293B;
    --text: #F1F5F9;
    --text-secondary: #94A3B8;
    --border: #334155;
}

[data-theme="neon"] {
    --primary: #F43F5E;
    --primary-light: rgba(244, 63, 94, 0.2);
    --background: #000000;
    --surface: #0F172A;
    --card: #1E293B;
    --text: #FFFFFF;
    --text-secondary: #94A3B8;
    --border: #334155;
}

[data-theme="luxury"] {
    --primary: #D4AF37;
    --primary-light: rgba(212, 175, 55, 0.2);
    --background: #050505;
    --surface: #121212;
    --card: #1C1C1C;
    --text: #FFFFFF;
    --text-secondary: #D4AF37;
    --border: #2A2A2A;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text);
    overflow-y: auto;
    transition: background-color 0.3s ease, color 0.3s ease;
}

i[data-lucide] {
    width: 20px;
    height: 20px;
    display: inline-block;
    stroke-width: 2;
}

.screen {
    min-height: 100vh;
    display: flex;
}

.hidden {
    display: none !important;
}

/* Auth Screen */
#auth-screen {
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top right, #331111, #000);
}

.auth-card {
    background: var(--surface);
    padding: 40px;
    border-radius: 32px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
    text-align: center;
}

.logo img {
    width: 80px;
    margin-bottom: 16px;
}

.logo h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-style: italic;
}

.logo span {
    color: var(--primary);
}

.auth-card p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
}

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

#login-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 10px;
}

#login-btn:active {
    transform: scale(0.98);
}

.auth-footer {
    margin-top: 20px;
}

#forgot-password-link {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

#forgot-password-link:hover {
    color: var(--primary);
}

#forgot-password-section h3 {
    margin-bottom: 12px;
}

#forgot-password-section p {
    font-size: 14px;
    margin-bottom: 24px;
}

.text-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    margin-top: 15px;
    text-decoration: underline;
}

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

.secondary-btn {
    padding: 10px 20px;
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 15px;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: var(--border);
}

.secondary-btn.small {
    padding: 6px 12px;
    font-size: 12px;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge.workout {
    background: rgba(255, 59, 48, 0.2);
    color: #FF3B30;
}

.badge.cardio {
    background: rgba(52, 199, 89, 0.2);
    color: #34C759;
}

.error-text {
    color: var(--error);
    font-size: 14px;
    margin-top: 16px;
    min-height: 20px;
}

/* Dashboard Sidebar */
.sidebar {
    width: 280px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 32px 20px;
    position: fixed;
    height: 100vh;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
    padding-left: 12px;
}

.sidebar-logo img {
    width: 40px;
}

.sidebar-logo h2 {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    font-style: italic;
}

.sidebar-logo h2 span {
    color: var(--primary);
}

nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

nav a {
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

nav a:hover, nav a.active {
    background: var(--card);
    color: var(--text);
}

nav a.active {
    border-left: 4px solid var(--primary);
}

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.theme-selector {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.theme-selector label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.theme-selector select {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.theme-selector select:hover {
    border-color: var(--primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.user-info img {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    border: 2px solid var(--primary);
}

.user-details p {
    font-weight: 600;
    font-size: 14px;
}

.badge {
    font-size: 10px;
    background: var(--primary);
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 800;
}

#logout-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
}

/* Content Area */
.content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    max-width: 1200px;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.main-header h1 {
    font-size: 32px;
    font-weight: 800;
}

.header-actions span {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--surface);
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--border);
}

.stat-card h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.stat-card p {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.trend {
    font-size: 12px;
    color: var(--text-secondary);
}

.trend.pos {
    color: var(--success);
}

/* Charts */
.cardio-header {
    background: var(--surface);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

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

.cardio-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

#draw-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.small-input {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 14px;
}

.success-btn {
    background: #10B981;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 800;
    cursor: pointer;
}

.success-btn:hover { background: #059669; }

.cardio-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: auto;
    min-height: calc(100vh - 200px);
}

.map-container {
    height: 600px; /* Mapa mucho más grande */
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.route-list-container {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.route-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-box {
    background: var(--surface);
    padding: 32px;
    border-radius: 32px;
    border: 1px solid var(--border);
}

/* Reminder Cards Improvements */
.reminder-card-web {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.reminder-card-web:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.reminder-card-web.priority-high {
    border-left: 4px solid #EF4444;
}

.reminder-card-web.priority-medium {
    border-left: 4px solid #F59E0B;
}

.reminder-card-web.priority-low {
    border-left: 4px solid #10B981;
}

.reminder-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.reminder-info h4 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

.reminder-category-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}

.reminder-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reminder-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.reminder-notes-text {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
}

.reminder-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    color: var(--text);
    border-color: var(--primary);
}

.icon-btn.delete-btn:hover {
    color: #EF4444;
    border-color: #EF4444;
}

canvas {
    width: 100% !important;
}

/* History Table */
.table-container {
    background: var(--surface);
    border-radius: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background: var(--card);
    padding: 16px 24px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

td {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

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

#activity-filter {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
}

/* Cardio & GPS Layout */
.route-list-container {
    background: var(--surface);
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.route-list {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.route-item {
    margin-bottom: 0; /* Ya manejado por el gap del grid */
}

.route-list {
    margin-top: 16px;
    overflow-y: auto;
    flex: 1;
}

.route-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.route-info {
    flex: 1;
}

.delete-route-btn {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: #EF4444 !important;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    min-height: 40px;
}

.delete-route-btn i, .delete-route-btn svg {
    color: #EF4444 !important;
    stroke: #EF4444 !important;
    width: 18px !important;
    height: 18px !important;
}

.delete-route-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
    opacity: 1;
}

.route-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(132, 204, 22, 0.1);
}

.route-item h4 {
    margin-bottom: 4px;
    color: var(--text);
}

.route-item p {
    font-size: 13px;
    color: var(--text-secondary);
}

.map-container {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Diet Styles */
.diet-container {
    max-width: 800px;
    margin: 0 auto;
}

.day-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.day-card h4 {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.meal-box {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.meal-box:last-child {
    border-bottom: none;
}

.header-main-diet {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.diet-header {
    margin-bottom: 30px;
}

.meal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.meal-type {
    font-weight: 800;
    font-size: 12px;
    color: var(--primary);
    text-transform: uppercase;
}

.meal-cals {
    font-size: 12px;
    color: var(--text-secondary);
}

.food-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.macro-chips {
    display: flex;
    gap: 8px;
}

.macro-chip {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--card);
    border: 1px solid var(--border);
}

/* Lock Overlay */
.lock-overlay {
    position: absolute;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.lock-content {
    text-align: center;
    max-width: 400px;
}

.lock-content i {
    color: var(--primary);
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
}

.lock-content h2 {
    font-size: 28px;
    margin-bottom: 16px;
}

.lock-content p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.primary-btn {
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

/* Achievements */
.achievements-header-box {
    background: var(--surface);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.achievements-summary {
    display: flex;
    gap: 40px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.overview-secondary-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Goals */
.goals-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
}

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

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.goal-item {
    margin-bottom: 16px;
}

.goal-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.goal-name {
    font-weight: 600;
}

.goal-progress {
    color: var(--text-secondary);
}

.progress-bar-bg {
    height: 8px;
    background: var(--card);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* Consistency Calendar */
.consistency-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
}

.consistency-calendar {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 12px);
    grid-auto-columns: 12px;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 16px;
}

.day-box {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: var(--card);
}

.day-box[data-level="1"] { background: #16301d; }
.day-box[data-level="2"] { background: #196127; }
.day-box[data-level="3"] { background: #239a3b; }
.day-box[data-level="4"] { background: #7ee281; }

[data-theme="light"] .day-box[data-level="1"] { background: #c6e48b; }
[data-theme="light"] .day-box[data-level="2"] { background: #7bc96f; }
[data-theme="light"] .day-box[data-level="3"] { background: #239a3b; }
[data-theme="light"] .day-box[data-level="4"] { background: #196127; }

.calendar-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    justify-content: flex-end;
}

.legend-box {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.level-0 { background: var(--card); }
.level-1 { background: #16301d; }
.level-2 { background: #196127; }
.level-3 { background: #239a3b; }
.level-4 { background: #7ee281; }

[data-theme="light"] .level-1 { background: #c6e48b; }
[data-theme="light"] .level-2 { background: #7bc96f; }
[data-theme="light"] .level-3 { background: #239a3b; }
[data-theme="light"] .level-4 { background: #196127; }

.achievement-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-card.unlocked {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(132, 204, 22, 0.1);
}

.achievement-card.locked {
    opacity: 0.6;
    filter: grayscale(1);
}

.achievement-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.achievement-info h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text);
}

.achievement-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.rarity-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.rarity-common { background: #8E8E93; color: white; }
.rarity-rare { background: #34D399; color: white; }
.rarity-epic { background: #8B5CF6; color: white; }
.rarity-legendary { background: #F59E0B; color: white; }

/* Geocoder Dark Mode */
.leaflet-control-geocoder {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
}

.leaflet-control-geocoder-icon {
    filter: invert(1);
}

.leaflet-control-geocoder-form input {
    color: #FFFFFF !important;
    background: transparent !important;
    border: none !important;
}

.leaflet-control-geocoder-form input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.leaflet-control-geocoder-alternatives {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    color: #FFFFFF !important;
}

.leaflet-control-geocoder-alternatives li a {
    color: #FFFFFF !important;
}

.leaflet-control-geocoder-alternatives li:hover {
    background: var(--primary-light) !important;
}
/* Modales */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--surface);
    width: 400px;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 800;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 16px;
    outline: none;
}

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

.modal-footer {
    margin-top: 32px;
}

.modal-footer .primary-btn {
    width: 100%;
    padding: 14px;
}

/* Profile Modal */
.profile-card {
    text-align: center;
}

.profile-header-main {
    margin-bottom: 32px;
}

.profile-header-main img {
    width: 100px;
    height: 100px;
    border-radius: 50px;
    border: 3px solid var(--primary);
    margin-bottom: 16px;
    object-fit: cover;
}

.profile-header-main h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 32px;
    background: var(--card);
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.p-stat label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.p-stat p {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.profile-info-list {
    text-align: left;
}

.p-info-item {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

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

.p-info-item label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.p-info-item p {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.profile-security {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
    text-align: left;
}

.profile-security h4 {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 16px;
}

.status-text {
    font-size: 12px;
    margin-top: 8px;
    font-weight: 600;
}

.profile-security.status-text.error { color: #FF3B30; }

/* Horizontal Profile Modal */
.modal-wide {
    width: 800px;
    max-width: 95vw;
}

.profile-card.horizontal {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.profile-main-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-side-column {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 0px; /* Security handles its own margin */
}

.profile-header-main {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 10px;
}

@media (max-width: 850px) {
    .modal-wide {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .profile-card.horizontal {
        flex-direction: column;
        gap: 20px;
    }
    
    .profile-side-column {
        width: 100%;
    }
}
/* Geocoder Icon Fix */
.leaflet-control-geocoder-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2384CC16' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
    width: 36px !important;
    height: 36px !important;
    background-color: var(--card) !important;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.leaflet-control-geocoder-expanded .leaflet-control-geocoder-form {
    background-color: var(--card) !important;
    color: var(--text) !important;
}

.leaflet-control-geocoder-form input {
    color: var(--text) !important;
    background: transparent !important;
}

/* Reminders Styles */
.reminders-header {
    background: var(--surface);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

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

.header-btns {
    display: flex;
    gap: 12px;
}

.spinning i, .spinning svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.reminder-card-web {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.reminder-card-web:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.reminder-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.reminder-info h4 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}

.badge.active { background: var(--primary); color: white; }
.badge.inactive { background: var(--border); color: var(--text-secondary); }

.reminder-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.delete-btn:hover { background: var(--error); color: white; border-color: var(--error); }

.reminder-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reminder-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.reminder-detail i {
    color: var(--primary);
    width: 16px;
    height: 16px;
}

.reminder-notes-text {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    font-style: italic;
    color: var(--text-secondary);
}

.loading-msg, .error-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.error-msg {
    color: #EF4444;
}
