/* --- 1. DARK THEME LAYOUT --- */
html { background-color: #030D4A; overscroll-behavior: none; }
body { 
    margin: 0; padding: 0; background-color: #030D4A; height: 100dvh; width: 100vw;
    overflow: hidden; position: fixed; overscroll-behavior: none;
    -webkit-user-select: none; user-select: none; 
}
.pd-tracker-wrapper {
    width: 100%; height: 100%; font-family: 'Inter', sans-serif; color: #F0F4F8; 
    background-color: #030D4A; position: relative; display: flex; flex-direction: column;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
}

/* --- 2. HEADER --- */
.pd-header-banner {
    background-color: #0f1c5e; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1.5rem; display: flex; align-items: center; flex-wrap: wrap; gap: 1rem;
    flex-shrink: 0; z-index: 100;
}
.pd-logo-text {
    font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.4rem;
    text-transform: uppercase; letter-spacing: -0.02em; display: flex; align-items: center;
    gap: 6px; white-space: nowrap;
}
.brand-prefix { color: #4da6ff; } .brand-main { color: #FFFFFF; }    
.brand-suffix { color: #cbd5e1; font-weight: 300; font-size: 0.9em; border-left: 1px solid rgba(255,255,255,0.2); padding-left: 8px; margin-left: 2px; min-width: 80px; }

/* TABS */
.pd-tabs-container {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px; 
    background: rgba(0, 0, 0, 0.2); padding: 4px; border-radius: 50px;
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 320px; z-index: 10;
}
.pd-tab-btn {
    background: transparent; border: none; color: #cbd5e1; padding: 8px 0; width: 100%;
    border-radius: 40px; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 0.85rem; 
    cursor: pointer; transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.05em;
    text-align: center; display: flex; align-items: center; justify-content: center;
}
.pd-tab-btn:hover { color: white; }
.pd-tab-btn.active { background: #4da6ff; color: #030D4A; box-shadow: 0 2px 10px rgba(77, 166, 255, 0.3); }

.pd-actions-group { display: flex; gap: 8px; align-items: center; margin-left: auto; z-index: 50; }

/* DROPDOWNS */
.pd-menu-container { position: relative; z-index: 20; }
.pd-menu-btn {
    background: transparent; border: none; color: #cbd5e1; width: 36px; height: 36px;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.pd-menu-btn:hover { background: rgba(255, 255, 255, 0.1); color: white; }
.pd-menu-btn.active { background: rgba(255, 255, 255, 0.15); color: #4da6ff; }
.pd-dropdown {
    position: absolute; top: 45px; right: 0; background: #0f1c5e; border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); width: 200px; display: none; 
    flex-direction: column; z-index: 1000; overflow: hidden; align-items: center; text-align: center;
}
.pd-dropdown.active { display: flex; }
.pd-menu-item {
    padding: 14px 16px; color: #F0F4F8; background: transparent; border: none;
    text-align: center; cursor: pointer; font-size: 0.9rem; font-family: 'Inter', sans-serif;
    border-bottom: 1px solid rgba(255,255,255,0.05); width: 100%; display: block;
}
.pd-menu-item.header-item { cursor: default; opacity: 0.5; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.pd-menu-item:hover { background: rgba(255,255,255,0.05); }
.pd-menu-item:last-child { border-bottom: none; }
.pd-menu-danger { color: #ff6b6b; font-weight: 600; }
.pd-menu-item.selected { color: #4da6ff; font-weight: 700; background: rgba(77, 166, 255, 0.1); }

/* AUTH */
.pd-auth-btn {
    background-color: white; color: #333; border: none; border-radius: 20px;
    padding: 6px 14px; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; display: flex; align-items: center; gap: 8px; transition: transform 0.1s;
}
.pd-auth-btn:active { transform: scale(0.95); }
.pd-auth-btn.hidden { display: none; }
.pd-user-profile { display: flex; align-items: center; gap: 10px; position: relative; }
.pd-user-profile.hidden { display: none; }
.pd-profile-btn {
    background: transparent; border: none; padding: 0; cursor: pointer; 
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; overflow: hidden;
}
.pd-avatar-img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #4da6ff; object-fit: cover; }

/* --- 3. MAIN CONTENT --- */
.pd-content-body { 
    background-color: #030D4A; padding: 2rem; padding-bottom: 4rem; 
    flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; 
}
.pd-view { display: none; animation: fadeIn 0.3s ease; }
.pd-view.active { display: block; }

/* STATS */
.pd-stats-container { display: flex; justify-content: center; gap: 4rem; margin-bottom: 3rem; flex-wrap: wrap; margin-top: 1rem; }
.pd-circle-card { position: relative; width: 260px; height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pd-progress-ring { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pd-progress-ring__circle { transition: stroke-dashoffset 0.5s ease-in-out; transform-origin: 50% 50%; }
.pd-circle-content { z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 200px; height: 200px; }
.pd-stat-number { font-family: 'Montserrat', sans-serif; font-size: 4.5rem; font-weight: 800; line-height: 1; margin-bottom: 8px; }
.pd-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; color: #cbd5e1; }

.pd-trend-card { background: rgba(255,255,255,0.05); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; }
.pd-trend-card h4 { margin: 0 0 1rem 0; color: #cbd5e1; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.05em; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5rem; }
.pd-trend-stat { font-size: 2.5rem; font-weight: 800; color: #fff; margin-bottom: 0.5rem; }
.pd-trend-list { list-style: none; padding: 0; margin: 0; }
.pd-trend-list li { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); color: #F0F4F8; font-size: 0.9rem; }
.pd-trend-list li span:last-child { font-weight: 700; color: #4da6ff; }
.pd-trend-empty { color: #64748b; font-style: italic; font-size: 0.9rem; margin-top: 0.5rem; }
.pd-percent-bar { height: 12px; width: 100%; background: rgba(255,255,255,0.1); border-radius: 6px; overflow: hidden; margin-top: 12px; display: flex; }
.pd-fill-dental { background: #51cf66; height: 100%; transition: width 0.5s ease; } 
.pd-fill-non { background: #ff6b6b; height: 100%; transition: width 0.5s ease; } 

/* SPLIT STATS ROW */
.pd-split-stat-row { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 10px; align-items: center; }
.pd-split-col { text-align: center; }
.pd-split-col h4 { border-bottom: none; margin-bottom: 0.5rem; padding-bottom: 0; }
.pd-split-divider { width: 1px; height: 80%; background: rgba(255,255,255,0.1); }

/* STATS GRID & BOXES */
.pd-stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0; }
.pd-stat-box { background: rgba(0,0,0,0.2); border-radius: 8px; padding: 1rem; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.pd-stat-small-label { font-size: 0.65rem; color: #cbd5e1; text-transform: uppercase; margin-bottom: 5px; letter-spacing: 0.05em; }
.pd-stat-large-value { font-size: 1.4rem; font-weight: 800; color: #fff; }

/* HEATMAP */
.pd-heatmap-grid { display: flex; flex-wrap: wrap; gap: 3px; justify-content: flex-start; max-width: 100%; }
.pd-heatmap-cell { width: 12px; height: 12px; border-radius: 2px; background: rgba(255,255,255,0.05); }
.pd-heatmap-cell.active-1 { background: rgba(77, 166, 255, 0.4); }
.pd-heatmap-cell.active-2 { background: rgba(77, 166, 255, 0.7); }
.pd-heatmap-cell.active-3 { background: #4da6ff; box-shadow: 0 0 5px rgba(77,166,255,0.5); }

/* PIE CHART */
.pd-pie-layout { display: flex; align-items: center; justify-content: space-between; height: 160px; }
.pd-pie-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; padding-right: 10px; }
.pd-pie-canvas-container { width: 160px; height: 160px; position: relative; }
canvas#pie-canvas { width: 100% !important; height: 100% !important; }
.pd-legend-item { display: flex; align-items: center; font-size: 0.75rem; color: #cbd5e1; }
.pd-legend-dot { width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; flex-shrink: 0; }

/* CHART */
.pd-chart-wrapper { width: 100%; height: 250px; position: relative; padding-top: 10px; display: flex; flex-direction: column; align-items: center; }
canvas#activity-canvas { width: 100% !important; height: 100% !important; }
.pd-chart-legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; width: 100%; }

/* --- GOALS / BADGES --- */
.pd-goals-section-title { color: #cbd5e1; font-size: 0.85rem; font-weight: 700; margin: 1.5rem 0 1rem 0; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 5px; }
.pd-goals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; margin-bottom: 1rem; }
.pd-goal-card { background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 1.2rem 1rem; text-align: center; transition: all 0.3s ease; display: flex; flex-direction: column; align-items: center; justify-content: space-between; opacity: 1; min-height: 180px; }

/* DIFFICULTY BORDERS */
.pd-goal-card.easy { border-color: #51cf66; } 
.pd-goal-card.medium { border-color: #4da6ff; } 
.pd-goal-card.hard { border-color: #ff6b6b; } 
.pd-goal-card.extreme { border-color: #9333ea; } 
.pd-goal-card.impossible { border-color: #ffd700; } 
.pd-goal-card.special { border-color: #ec4899; } 

/* Completed State */
.pd-goal-card.completed { background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 15px rgba(255, 255, 255, 0.1); }
.pd-goal-card.completed.easy { box-shadow: 0 0 15px rgba(81, 207, 102, 0.3); }
.pd-goal-card.completed.medium { box-shadow: 0 0 15px rgba(77, 166, 255, 0.3); }
.pd-goal-card.completed.hard { box-shadow: 0 0 15px rgba(255, 107, 107, 0.3); }
.pd-goal-card.completed.extreme { box-shadow: 0 0 20px rgba(147, 51, 234, 0.5); }
.pd-goal-card.completed.special { box-shadow: 0 0 20px rgba(236, 72, 153, 0.5); }

/* IMPOSSIBLE STYLING */
.pd-goal-card.impossible { background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(0, 0, 0, 0.2)); }
.pd-goal-card.completed.impossible { background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(0, 0, 0, 0.4)); box-shadow: 0 0 25px rgba(255, 215, 0, 0.6); border-color: #ffd700; }

.pd-goal-icon { margin-bottom: 5px; width: 32px; height: 32px; color: #cbd5e1; }
.pd-goal-card.completed .pd-goal-icon { color: #fff; }
.pd-goal-card.type-shadow.completed .pd-goal-icon { color: #4da6ff; }
.pd-goal-card.type-vol.completed .pd-goal-icon { color: #ffd700; }
.pd-goal-card.completed.impossible .pd-goal-icon { color: #ffd700; filter: drop-shadow(0 0 5px #ffd700); }
.pd-goal-card.completed.special .pd-goal-icon { color: #ec4899; filter: drop-shadow(0 0 5px #ec4899); }

.pd-goal-title { font-size: 0.8rem; font-weight: 800; color: #fff; margin-bottom: 2px; text-transform: uppercase; }
.pd-goal-diff { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; opacity: 0.8; }
.pd-goal-card.easy .pd-goal-diff { color: #51cf66; }
.pd-goal-card.medium .pd-goal-diff { color: #4da6ff; }
.pd-goal-card.hard .pd-goal-diff { color: #ff6b6b; }
.pd-goal-card.extreme .pd-goal-diff { color: #9333ea; }
.pd-goal-card.impossible .pd-goal-diff { color: #ffd700; }
.pd-goal-card.special .pd-goal-diff { color: #ec4899; }

.pd-goal-req { font-size: 0.75rem; color: #cbd5e1; margin-bottom: 12px; line-height: 1.3; }

/* Stars */
.pd-goal-stars { font-size: 1rem; letter-spacing: 2px; color: #555; margin-bottom: 8px; }
.pd-goal-card.completed .pd-goal-stars { color: #ffd700; text-shadow: 0 0 8px rgba(255, 215, 0, 0.6); }
.pd-goal-card.completed.special .pd-goal-stars { color: #ec4899; text-shadow: 0 0 8px rgba(236, 72, 153, 0.6); }

/* Progress Bar */
.pd-goal-progress-container { width: 100%; height: 6px; background: rgba(0,0,0,0.3); border-radius: 3px; overflow: hidden; margin-bottom: 5px; }
.pd-goal-progress-bar { height: 100%; width: 0%; transition: width 0.5s ease; }
.pd-goal-card.easy .pd-goal-progress-bar { background: #51cf66; }
.pd-goal-card.medium .pd-goal-progress-bar { background: #4da6ff; }
.pd-goal-card.hard .pd-goal-progress-bar { background: #ff6b6b; }
.pd-goal-card.extreme .pd-goal-progress-bar { background: #9333ea; }
.pd-goal-card.impossible .pd-goal-progress-bar { background: #ffd700; }
.pd-goal-card.special .pd-goal-progress-bar { background: #ec4899; }
.pd-goal-status { font-size: 0.7rem; font-weight: 700; color: #94a3b8; }
.pd-goal-card.completed .pd-goal-status { color: #ffd700; font-weight: 800; letter-spacing: 0.05em; }

/* NOTIFICATION POPUP */
.pd-achievement-popup {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-200%);
    background: rgba(15, 28, 94, 0.95); 
    border: 1px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    padding: 10px 20px; border-radius: 50px;
    display: flex; align-items: center; gap: 12px;
    z-index: 10000;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    width: 90%; max-width: 320px;
}
.pd-achievement-popup.active { transform: translateX(-50%) translateY(0); }
.pd-popup-icon { font-size: 1.5rem; }
.pd-popup-text { display: flex; flex-direction: column; text-align: left; }
.pd-popup-header { color: #ffd700; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.pd-popup-name { color: #fff; font-size: 0.9rem; font-weight: 700; }

/* FORMS */
.pd-form-card { background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 1.5rem; margin-bottom: 2rem; position: relative; }
.pd-form-header { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; color: #cbd5e1; }
.pd-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.pd-input-wrapper { position: relative; width: 100%; }
.pd-error-asterisk { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #ff6b6b; font-size: 1.2rem; font-weight: bold; display: none; pointer-events: none; }
.pd-input-wrapper.error .pd-error-asterisk { display: block; }
.pd-input-wrapper.error .pd-input, .pd-input-wrapper.error .pd-select { border-color: #ff6b6b; }
.pd-input, .pd-select, .pd-textarea { width: 100%; height: 50px !important; min-height: 50px !important; padding: 0 0.8rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 0.95rem; background-color: rgba(0, 0, 0, 0.4); color: #FFFFFF; outline: none; transition: border-color 0.2s; box-sizing: border-box; color-scheme: dark; -webkit-appearance: none; appearance: none; text-align: left; }
input[type="date"] { display: block; text-align: left !important; -webkit-align-items: center; line-height: 50px; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.pd-select { background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234da6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 1.2em; padding-right: 2.5rem; cursor: pointer; }
.pd-select:focus { border-color: #4da6ff; background-color: rgba(0, 0, 0, 0.6); background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234da6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='18 15 12 9 6 15'%3e%3c/polyline%3e%3c/svg%3e"); }
.pd-select option { background-color: #030D4A; color: #FFFFFF; }
.pd-input:focus, .pd-select:focus, .pd-textarea:focus { border-color: #4da6ff; background-color: rgba(0, 0, 0, 0.6); }
.pd-input-group { position: relative; display: flex; align-items: center; width: 100%; }
.pd-input-group .pd-input { padding-right: 45px; }
.pd-verify-link { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #4da6ff; opacity: 0.7; transition: opacity 0.2s; display: flex; align-items: center; justify-content: center; background: transparent; border: none; cursor: pointer; text-decoration: none; z-index: 5; }
.pd-verify-link:hover { opacity: 1; }
#entry-date { background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234da6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3e%3c/rect%3e%3cline x1='16' y1='2' x2='16' y2='6'%3e%3c/line%3e%3cline x1='8' y1='2' x2='8' y2='6'%3e%3c/line%3e%3cline x1='3' y1='10' x2='21' y2='10'%3e%3c/line%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 1.2em; padding-right: 2.5rem; }
#entry-date::-webkit-calendar-picker-indicator { position: absolute; top: 0; right: 0; width: 3rem; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; display: block !important; }

/* List & Selection */
.pd-list { width: 100%; } .pd-list ul { list-style: none; padding: 0; margin: 0; }
.pd-entry-item { background: #0f1c5e; border: 1px solid rgba(255,255,255,0.1); border-left: 4px solid #cbd5e1; border-radius: 8px; padding: 1rem; display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; cursor: pointer; }
.pd-entry-item.type-shadow { border-left-color: #4da6ff; }
.pd-entry-item.type-volunteer { border-left-color: #ffd700; }
.pd-entry-content { flex: 1; overflow: hidden; margin-right: 10px; }
.pd-entry-title { font-size: 1rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.pd-entry-meta { font-size: 0.85rem; color: #cbd5e1; }
.pd-entry-actions { display: flex; gap: 8px; }
.pd-entry-btn { background: rgba(255,255,255,0.1); border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #cbd5e1; transition: background 0.2s; }
.pd-entry-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }
.pd-entry-btn.edit { color: #4da6ff; }
.pd-entry-btn.delete { color: #ff6b6b; }
.pd-filter-badge { background: #4da6ff; color: #030D4A; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; margin-left: 10px; display: none; }
.pd-filter-badge.volunteer { background: #ffd700; color: #030D4A; }
.pd-checkbox { width: 20px; height: 20px; margin-right: 15px; cursor: pointer; accent-color: #4da6ff; display: none; }
.pd-list.selection-mode .pd-checkbox { display: block; }
.pd-list-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 10px; }
#search-input { flex: 1; height: 40px !important; min-height: 40px !important; border-radius: 20px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding-left: 15px; font-size: 0.9rem; box-sizing: border-box; }
#btn-select-mode, #btn-delete-selected { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #cbd5e1; padding: 0 12px; height: 40px; border-radius: 20px; font-size: 0.8rem; cursor: pointer; font-weight: 600; white-space: nowrap; }
#btn-select-mode:hover { color: #fff; border-color: #fff; }
#btn-delete-selected { display: none; color: #555; border-color: #555; background: rgba(0,0,0,0.2); cursor: not-allowed; }
#btn-delete-selected.active { color: #ff6b6b; border-color: #ff6b6b; background: transparent; cursor: pointer; }

.pd-view-row { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 10px 0; }
.pd-view-label { color: #cbd5e1; font-size: 0.85rem; font-weight: 600; }
.pd-view-val { color: #fff; font-size: 0.9rem; text-align: right; font-weight: 500; }
.pd-view-notes { margin-top: 15px; background: rgba(255,255,255,0.05); padding: 10px; border-radius: 8px; font-size: 0.9rem; color: #F0F4F8; line-height: 1.5; text-align: left; }

.pd-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); z-index: 9999; display: none; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.pd-modal { background: #0f1c5e; border: 1px solid #4da6ff; padding: 2rem; border-radius: 16px; width: 90%; max-width: 400px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.pd-modal-danger { border-color: #ff6b6b; }
.pd-modal-volunteer { border-color: #ffd700; }
.pd-modal-volunteer h3 { color: #ffd700; }
.pd-modal h3 { color: #4da6ff; margin-top: 0; }
.pd-modal-danger h3 { color: #ff6b6b; }
.pd-modal p { color: #cbd5e1; font-size: 0.9rem; line-height: 1.5; }
.pd-btn { padding: 0.8rem 1.5rem; border-radius: 50px; font-weight: 700; font-size: 0.9rem; cursor: pointer; border: none; transition: all 0.2s; text-transform: uppercase; }
.pd-btn-primary { background: #004AAD; color: white; border: 1px solid rgba(255,255,255,0.1); width: 100%; }
.pd-btn-primary:hover { background: #4da6ff; color: #030D4A; }
.pd-btn-danger { background: #ff6b6b; color: white; border: none; }
.pd-btn-cancel { background: transparent; color: #cbd5e1; border: 1px solid #cbd5e1; margin-right: 10px; }
.pd-form-actions { display: flex; gap: 10px; }
.pd-footer { text-align: center; padding: 1rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.4); border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: auto; flex-shrink: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* --- MOBILE SPECIFIC FIXES --- */
@media (max-width: 700px) { 
    .pd-header-banner { flex-wrap: wrap; justify-content: space-between; padding: 0.5rem 0.8rem; gap: 0; }
    .pd-logo-text { font-size: 1rem; margin-right: auto; order: 1; }
    .pd-actions-group { gap: 4px; order: 2; }
    .pd-nav-rank { font-size: 0.65rem; padding: 2px 6px; height: 24px; }
    .pd-avatar-img, .pd-menu-btn { width: 30px; height: 30px; }
    .pd-tabs-container { position: static; transform: none; order: 3; width: 100%; justify-content: flex-start; margin-top: 0.5rem; padding-left: 0; max-width: 100%; }
    .pd-form-grid { grid-template-columns: 1fr; } 
    .pd-content-body { padding: 1rem; padding-bottom: 6rem; }
    .pd-stats-container { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 0; padding: 0 10px; margin-top: 0; margin-bottom: 1rem; }
    .pd-circle-card { width: 44vw; height: 44vw; max-width: 180px; max-height: 180px; }
    .pd-stat-number { font-size: 3rem; margin-bottom: 2px; }
    .pd-stat-label { font-size: 0.6rem; }
    .pd-list-controls { flex-wrap: wrap; }
    #search-input { width: 100%; min-width: 100%; order: 1; margin-bottom: 10px; }
    .pd-list-controls > div { order: 2; width: 100%; justify-content: flex-end; gap: 8px; }
}
