:root { --primary: #1a73e8; --danger: #d93025; --bg: #f0f2f5; --surface: #ffffff; --radius: 20px; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { font-family: system-ui, sans-serif; background: var(--bg); color: #1c1e21; overflow-x: hidden; }

header { background: var(--surface); padding: 15px 20px; border-bottom: 1px solid #ddd; position: sticky; top: 0; z-index: 1000; }
.header-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; position: relative; z-index: 1001; }

/* Dashboard Grid */
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 10px; background: var(--surface); border-bottom: 1px solid #ddd; }
.stat-value { font-weight: 800; color: var(--primary); font-size: 0.85rem; display: block; text-align: center; }
.milestone-title { font-size: 0.55rem; color: #606770; text-transform: uppercase; display: block; text-align: center; }

/* MODAL OVERLAYS - CRITICAL FIX */
.modal-overlay, .overlay-full {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: none; /* Flex via JS */
    align-items: center; justify-content: center;
    z-index: 99999 !important;
    padding: 20px;
}

.modal-card, .ao-document {
    background: var(--surface);
    width: 100%; max-width: 400px;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    border: 1px solid #eee;
}

/* UI Elements */
.btn-icon-close { background: #f1f3f4; border: none; font-size: 24px; width: 36px; height: 36px; border-radius: 50%; color: #5f6368; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.btn-primary { width: 100%; padding: 16px; background: var(--primary); color: white; border: none; border-radius: 12px; font-weight: 700; cursor: pointer; }
.btn-secondary { background: #f1f3f4; color: #3c4043; border: none; width: 100%; padding: 12px; border-radius: 12px; font-weight: 600; margin-top: 10px; cursor: pointer; }
.mobile-input { width: 100%; padding: 14px; font-size: 16px; border: 2px solid #e4e6eb; border-radius: 12px; margin-bottom: 12px; background: #f7f8fa; outline: none; }
.stat-summary-box { background: #f8f9fa; padding: 12px; border-radius: 12px; font-size: 0.85rem; color: #5f6368; margin-top: 10px; border: 1px solid #eee; }
.animate-pop { animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes modalPop { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
