/* style.css - simple design for all pages */
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #f1f4f9; color: #222; }

/* Layout: sidebar on the left, content on the right */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #4e342e; padding: 20px 14px; }
.sidebar a { display: block; color: #e7d7c9; text-decoration: none; padding: 11px 12px; border-radius: 8px; margin-bottom: 4px; }
.sidebar a:hover, .sidebar a.active { background: #6d4c41; color: #fff; }
.sidebar .brand span { color: #e2b17c; }
.brand { font-size: 22px; font-weight: bold; color: #fff; margin-bottom: 25px; }
.brand span { color: #e2b17c; }
.brand.dark { color: #3e2723; margin-bottom: 5px; }
.brand.dark span { color: #6d4c41; }
.main { flex: 1; padding: 28px; }
h1 { margin-top: 0; }

/* Cards and boxes */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.card { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 4px #0002; }
.card small { color: #667; }
.card b { display: block; font-size: 30px; margin-top: 8px; }
.box { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 4px #0002; margin-bottom: 20px; overflow-x: auto; }
.box.narrow { max-width: 560px; }

/* Table */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid #e1e6ef; font-size: 14px; }
th { background: #f6f8fc; }

/* Forms and buttons */
label { display: block; margin: 12px 0 4px; font-size: 14px; }
input, select { width: 100%; padding: 10px; border: 1px solid #b9c3d6; border-radius: 6px; font-size: 14px; }
button, .btn { display: inline-block; background: #6d4c41; color: #fff; border: 0; border-radius: 6px; padding: 10px 16px; font-size: 14px; text-decoration: none; cursor: pointer; margin-top: 14px; }
button:hover, .btn:hover { filter: brightness(0.92); }
.btn.green { background: #1e9d57; }
.btn.gray { background: #7a869a; }
button.red { background: #c0392b; }
.filters { display: flex; gap: 10px; margin-bottom: 15px; align-items: center; }
.filters input, .filters select { width: auto; flex: 1; }
.filters button, .filters .btn { margin-top: 0; white-space: nowrap; }
.actions { display: flex; gap: 6px; }
.actions form { margin: 0; }
.actions .btn, .actions button { margin-top: 0; padding: 6px 10px; }

/* Messages */
.alert { padding: 10px; border-radius: 6px; margin-bottom: 10px; }
.alert.error { background: #fde2e2; color: #9b1c1c; }
.alert.success { background: #d9f5e5; color: #17663a; }
.small { font-size: 13px; color: #667; }
.footer { font-size: 12px; color: #889; margin-top: 30px; }
.timeline-item { border-left: 3px solid #6d4c41; padding: 4px 0 16px 16px; margin-left: 6px; }

/* Login page */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #3e2723; }
.login-box { background: #fff; padding: 30px; border-radius: 12px; width: 360px; max-width: 92vw; }
.login-box button { width: 100%; }

@media (max-width: 800px) {
  .layout { display: block; }
  .sidebar { width: auto; }
  .cards { grid-template-columns: 1fr 1fr; }
  .filters { flex-wrap: wrap; }
}

/* Public live map page */
.pubbar { background: #3e2723; color: #fff; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; }
.pubbar .btn { margin-top: 0; }
.pubbar small { font-size: 12px; color: #e0cbb8; font-weight: normal; margin-left: 8px; }
.pubmain { max-width: 1200px; margin: 0 auto; padding: 20px; }
#map { height: 65vh; min-height: 380px; border-radius: 10px; }
#picker { height: 260px; border-radius: 8px; margin-bottom: 6px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.legend i.ring { background: #fff; border: 3px solid #4e342e; width: 8px; height: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pubright { display: flex; align-items: center; gap: 14px; }
@media (max-width: 600px) { .pubbar { flex-wrap: wrap; gap: 8px; } .pubbar small { display: none; } }

/* Live bar on the admin dashboard */
.livebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #2a9d8f; display: inline-block; animation: pulse 1.5s infinite; }
.dot.off { background: #d62828; animation: none; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: .3; } 100% { opacity: 1; } }


/* ==============================
   QUAKETRACK SETTINGS PAGE
============================== */

.settings-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.settings-layout .settings-card {
    width: auto;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}

/* Account Information */

.account-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eeeeee;
    gap: 10px;
    font-size: 13px;
}

.account-info:last-child {
    border-bottom: none;
}

.account-info span {
    color: #777777;
}

.account-info strong {
    color: #26384d;
}

.account-info .active-status {
    color: #249b58;
}

/* System Preferences */

.system-preferences {
    grid-column: 1 / -1;
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eeeeee;
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-item strong {
    font-size: 13px;
    color: #26384d;
}

.preference-item p {
    font-size: 12px;
    color: #8995a5;
    margin: 5px 0 0;
}

.preference-item span {
    font-size: 19px;
}

/* Mobile Responsive */

@media (max-width: 700px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .system-preferences {
        grid-column: auto;
    }
}
