* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --primary: #00643b; --primary-dark: #004d2e; --text: #1a1a1a; --bg: #ffffff; --muted: #6b7280; --border: #d1d5db; --error: #dc2626; --radius: 8px; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-text-size-adjust: 100%; }
.container { max-width: 640px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; color: var(--primary); }
h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
.btn { display: inline-block; padding: 12px 24px; font-size: 1rem; font-weight: 600; text-align: center; border-radius: var(--radius); border: none; cursor: pointer; text-decoration: none; background: var(--primary); color: white; min-height: 44px; }
.btn:active { background: var(--primary-dark); }
.btn-block { display: block; width: 100%; }
.btn-secondary { background: var(--border); color: var(--text); }
.form-group { margin-bottom: 1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.25rem; font-size: 0.875rem; }
input, select, textarea { width: 100%; padding: 12px; font-size: 1rem; border: 2px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); -webkit-appearance: none; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; }
input[type="checkbox"] { -webkit-appearance: checkbox; appearance: checkbox; width: auto; height: auto; min-height: 0; padding: 0; border: none; margin: 0; }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 1rem; }
.text-muted { color: var(--muted); font-size: 0.875rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-2 { margin-top: 1rem; }
.flash { padding: 12px; border-radius: var(--radius); margin-bottom: 1rem; font-weight: 600; }
.flash-success { background: #d1fae5; color: #065f46; }
.flash-error { background: #fee2e2; color: #991b1b; }
.header { background: var(--primary); }
.header-bar { display: flex; align-items: center; padding: 4px 12px; min-height: 44px; }
.header-logo { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.header-logo:active { opacity: 0.8; }
.header-nav { display: flex; align-items: center; gap: 0; margin-left: 8px; flex: 1; overflow: hidden; }
.header-nav a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.75rem; font-weight: 600; padding: 6px 8px; border-radius: var(--radius); white-space: nowrap; }
.header-nav a:active { background: rgba(255,255,255,0.15); color: white; }
.header-user { color: rgba(255,255,255,0.9); text-decoration: none; font-size: 0.75rem; font-weight: 600; padding: 6px 8px; border-radius: var(--radius); white-space: nowrap; flex-shrink: 0; margin-left: auto; }
.header-user:active { background: rgba(255,255,255,0.15); }
.loading-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; }
.loading-overlay.show { display: flex; }
.loading-box { background: white; padding: 32px 40px; border-radius: var(--radius); text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.loading-box p { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top: 3px solid var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.licence-footer { position: fixed; right: 18px; bottom: 14px; left: 18px; z-index: 20; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; pointer-events: none; }
.licence-footer[hidden] { display: none; }
.licence-footer p { margin: 0; padding: 8px 10px; background: rgba(248, 250, 252, 0.92); border: 1px solid rgba(221, 229, 236, 0.9); border-radius: 6px; color: var(--muted); font-size: 0.86rem; line-height: 1.3; }
.licence-footer strong { color: var(--text); }
.hexela-mark { display: inline-flex; align-items: center; width: 118px; padding: 8px 10px; background: rgba(248, 250, 252, 0.92); border: 1px solid rgba(221, 229, 236, 0.9); border-radius: 6px; pointer-events: auto; }
.hexela-mark img { display: block; width: 100%; height: auto; }
.settings-list { display: grid; gap: 8px; margin-bottom: 1rem; }
.settings-list div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: baseline; }
.settings-list dt { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.settings-list dd { overflow-wrap: anywhere; }
