*{box-sizing:border-box;margin:0;padding:0;font-family:system-ui,sans-serif;}
:root{--bg:#f4f6f8;--text:#111;--card:#fff;--border:#ddd;--red:#ff3b30;--green:#2ecc71;--archive-btn:#e2e8f0;}
body.dark{--bg:#0e0f13;--text:#f1f1f1;--card:#1c1f26;--border:#2a2d36;--archive-btn:#2a2d36;}

body{background:var(--bg);color:var(--text);min-height:100vh;display:flex;justify-content:center;padding:16px;transition:0.4s;}
.container{width:100%;max-width:420px;}
h1{text-align:center;margin-bottom:20px;}

/* LISTY BEZ KROPEK */
#alarms, #archive { list-style: none; padding: 0; }

/* IKONY NAWIGACJI */
.top-buttons { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 25px; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.nav-item span { font-size: 10px; font-weight: bold; text-transform: uppercase; opacity: 0.7; }

.top-buttons button, .top-buttons a {
    width: 60px; height: 60px; border: 1px solid var(--border); border-radius: 16px;
    background: var(--card); color: var(--text); font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    text-decoration: none; transition: 0.1s;
}

/* PRZYCISK USUWANIA X */
.delete-btn {
    float: right; background: none; border: none;
    color: var(--red); font-size: 1.4rem; font-weight: bold;
    cursor: pointer; line-height: 1;
}

/* ALARMY */
.alarm-box { background: var(--card); border: 2px solid var(--border); border-radius: 18px; padding: 15px; margin-bottom: 15px; position: relative; }
@keyframes flash { 50% { border-color: var(--red); background: rgba(255,59,48,0.1); } }
.alarm-active { border-width: 3px; animation: flash 1.5s infinite; }
.alarm-ended { opacity: 0.7; border-style: dashed; }

/* PRZEŁĄCZNIKI */
.setting-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
input[type="checkbox"] { appearance: none; width: 44px; height: 24px; background: #ccc; border-radius: 12px; position: relative; cursor: pointer; }
input[type="checkbox"]:checked { background: var(--green); }
input[type="checkbox"]::before { content: ""; width: 18px; height: 18px; background: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: 0.3s; }
input[type="checkbox"]:checked::before { transform: translateX(20px); }

/* REAKCJE */
.response-buttons { display: flex; gap: 10px; margin-top: 15px; }
.response-yes, .response-no { flex: 1; padding: 12px; border: none; border-radius: 12px; font-weight: bold; color: #fff; cursor: pointer; }
.response-yes { background: var(--green); }
.response-no { background: var(--red); }

/* ARCHIWUM */
#archiveBtn {
    width: 100%; padding: 15px; margin-top: 10px; border-radius: 14px;
    background: var(--archive-btn); color: var(--text); border: 1px solid var(--border);
    font-weight: bold; cursor: pointer;
}
.hidden { display: none !important; }

/*TEST ALARMOW */

.btn-test {
    background: #555;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-test:active {
    background: #777;
}

.hidden {
    display: none !important;
}

/* Dodatkowe wygładzenie kart w adminie */
#admin-alarms-list .user-card {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}