*,:before,:after{box-sizing:border-box;margin:0;padding:0}:root{--primary:#4f46e5;--primary-hover:#4338ca;--danger:#ef4444;--success:#22c55e;--bg:#f8f7ff;--surface:#fff;--border:#e5e7eb;--text:#1f2937;--text-muted:#6b7280;--radius:12px;--shadow:0 1px 3px #00000014, 0 1px 2px #0000000d}body{background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent;min-height:100dvh;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.loading{min-height:100dvh;color:var(--text-muted);justify-content:center;align-items:center;display:flex}.error{color:var(--danger);margin-top:.25rem;font-size:.875rem}.success-msg{color:var(--success);font-weight:500}.empty{color:var(--text-muted);font-style:italic}.status{color:var(--text-muted);font-size:.875rem}.login-page{background:linear-gradient(135deg,#ede9fe 0%,#e0e7ff 100%);justify-content:center;align-items:center;min-height:100dvh;padding:1rem;display:flex}.login-card{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);width:100%;max-width:380px;padding:2rem}.login-card h1{text-align:center;color:var(--primary);font-size:2.5rem}.login-subtitle{text-align:center;color:var(--text-muted);margin-bottom:1.5rem}.login-card form{flex-direction:column;gap:1rem;display:flex}.login-card label{flex-direction:column;gap:.375rem;font-size:.875rem;font-weight:500;display:flex}.login-card input{border:1px solid var(--border);border-radius:8px;outline:none;padding:.625rem .875rem;font-size:1rem;transition:border-color .15s}.login-card input:focus{border-color:var(--primary)}.login-card button[type=submit]{background:var(--primary);color:#fff;cursor:pointer;border:none;border-radius:8px;margin-top:.5rem;padding:.75rem;font-size:1rem;font-weight:600;transition:background .15s}.login-card button[type=submit]:hover{background:var(--primary-hover)}.login-card button[type=submit]:disabled{opacity:.6;cursor:not-allowed}.dashboard{flex-direction:column;min-height:100dvh;display:flex}.dashboard-header{background:var(--surface);border-bottom:1px solid var(--border);z-index:10;box-shadow:var(--shadow);justify-content:space-between;align-items:center;padding:.875rem 1.25rem;display:flex;position:sticky;top:0}.dashboard-header h1{color:var(--primary);align-items:center;gap:.5rem;font-size:1.5rem;display:flex}.role-badge{background:var(--primary);color:#fff;border-radius:999px;padding:.2rem .5rem;font-size:.75rem}.header-right{color:var(--text-muted);align-items:center;gap:.75rem;font-size:.875rem;display:flex}.btn-ghost{border:1px solid var(--border);cursor:pointer;color:var(--text);background:0 0;border-radius:6px;padding:.375rem .75rem;font-size:.875rem;transition:background .15s}.btn-ghost:hover{background:var(--bg)}.dashboard-main{flex-direction:column;flex:1;gap:1.5rem;width:100%;max-width:720px;margin:0 auto;padding:1.25rem;display:flex}.upload-section,.recordings-section,.family-section{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem}.upload-section h2,.recordings-section h2,.family-section h2,.family-name{margin-bottom:1rem;font-size:1.1rem;font-weight:600}.family-name{color:var(--primary);font-size:1rem}.upload-controls{flex-wrap:wrap;align-items:center;gap:.75rem;display:flex}.btn-record{background:var(--primary);color:#fff;cursor:pointer;border:none;border-radius:8px;padding:.625rem 1.25rem;font-size:.95rem;font-weight:600;transition:background .15s}.btn-record:hover{background:var(--primary-hover)}.btn-record.recording{background:var(--danger);animation:1s infinite pulse}.btn-record:disabled{opacity:.6;cursor:not-allowed}@keyframes pulse{0%,to{opacity:1}50%{opacity:.7}}.or{color:var(--text-muted);font-size:.875rem}.btn-file{background:var(--bg);border:1px solid var(--border);cursor:pointer;border-radius:8px;padding:.625rem 1.25rem;font-size:.95rem;font-weight:500;transition:background .15s;display:inline-block}.btn-file:hover{background:#ede9fe}.btn-file input{display:none}.recording-list{flex-direction:column;gap:.75rem;list-style:none;display:flex}.recording-item{border:1px solid var(--border);border-radius:10px;flex-direction:column;gap:.625rem;padding:.875rem 1rem;transition:border-color .15s;display:flex}.recording-item.active{border-color:var(--primary)}.recording-meta{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;display:flex}.recording-date{font-size:.9rem;font-weight:500}.audio-player{width:100%;height:40px}.btn-delete{border:1px solid var(--danger);color:var(--danger);cursor:pointer;background:0 0;border-radius:6px;align-self:flex-end;padding:.25rem .625rem;font-size:.8rem;transition:background .15s,color .15s}.btn-delete:hover{background:var(--danger);color:#fff}.recording-actions{gap:.5rem;display:flex}.btn-comments,.btn-toggle{border:1px solid var(--primary);color:var(--primary);cursor:pointer;background:0 0;border-radius:6px;padding:.25rem .625rem;font-size:.8rem;transition:background .15s,color .15s}.btn-comments:hover,.btn-toggle:hover{background:var(--primary);color:#fff}.comments-section h3{margin-bottom:.5rem;font-size:.95rem;font-weight:600}.comment-list{flex-direction:column;gap:.5rem;margin-bottom:.75rem;list-style:none;display:flex}.comment{background:var(--bg);border-radius:8px;padding:.625rem .875rem}.comment p{font-size:.9rem;line-height:1.4}.comment-date{color:var(--text-muted);margin-top:.25rem;font-size:.75rem;display:block}.comment-form{gap:.5rem;display:flex}.comment-form textarea{border:1px solid var(--border);resize:none;border-radius:8px;outline:none;flex:1;padding:.5rem .75rem;font-family:inherit;font-size:.875rem;transition:border-color .15s}.comment-form textarea:focus{border-color:var(--primary)}.comment-form button{background:var(--primary);color:#fff;cursor:pointer;border:none;border-radius:8px;align-self:flex-end;padding:.5rem .875rem;font-size:.875rem;font-weight:600;transition:background .15s}.comment-form button:hover{background:var(--primary-hover)}.comment-form button:disabled{opacity:.6;cursor:not-allowed}.filter-bar{align-items:center;gap:.75rem;display:flex}.filter-bar input{border:1px solid var(--border);border-radius:8px;outline:none;flex:1;padding:.5rem .875rem;font-size:.9rem;transition:border-color .15s}.filter-bar input:focus{border-color:var(--primary)}.count{color:var(--text-muted);white-space:nowrap;font-size:.8rem}.recording-detail{flex-direction:column;gap:.75rem;display:flex}.locale-switcher{gap:.25rem;display:flex}.locale-switcher button{border:1px solid var(--border);cursor:pointer;color:var(--text-muted);background:0 0;border-radius:6px;padding:.25rem .5rem;font-size:.8rem;transition:background .15s,color .15s}.locale-switcher button:hover{background:var(--bg);color:var(--text)}.locale-switcher button.active{background:var(--primary);border-color:var(--primary);color:#fff}.login-card .locale-switcher{justify-content:center;margin-top:1rem}@media (width<=480px){.dashboard-header{padding:.75rem 1rem}.dashboard-main{padding:1rem}.upload-controls{flex-direction:column;align-items:stretch}.btn-record,.btn-file{text-align:center}}
