/* XpertWorker — light base styling for all standard pages.
   Styles bare HTML elements only, so every page is cleaned up with no markup changes.
   Brand: primary #1E40AF, accent #EA580C. */

:root {
    --primary: #1E40AF;
    --primary-dark: #1E3A8A;
    --accent: #EA580C;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f8fafc;
    --card: #ffffff;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    margin: 0;
    padding: 0 0 48px;
}

/* Page content gets a centered, comfortable column. */
body > h1, body > h2, body > h3, body > p, body > div,
body > form, body > table, body > ul, body > ol, body > fieldset, body > details {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

h1 { font-size: 1.7rem; margin: 1.2rem auto 0.6rem; }
h2 { font-size: 1.3rem; margin: 1.4rem auto 0.6rem; }
h3 { font-size: 1.1rem; margin: 1rem auto 0.4rem; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Branded top header */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 14px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    margin-bottom: 16px;
}
.site-header .brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}
.site-header .brand:hover { text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
nav a {
    display: inline-block;
    padding: 6px 10px;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 6px;
}
nav a:hover { background: var(--bg); text-decoration: none; }
nav a.nav-cta { background: var(--primary); color: #fff; }
nav a.nav-cta:hover { background: var(--primary-dark); }

/* Branded footer */
.site-footer {
    background: var(--primary-dark);
    color: #cbd5e1;
    text-align: center;
    padding: 28px 16px;
    margin-top: 40px;
    border: 0;
}
.site-footer .footer-brand { font-size: 1.15rem; font-weight: 800; color: #fff; }
.site-footer .footer-tag { font-size: 0.9rem; margin: 4px 0 12px; color: #94a3b8; }
.site-footer .footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.site-footer .footer-links a { color: #e2e8f0; padding: 4px 10px; }
.site-footer .footer-links a:hover { background: rgba(255,255,255,0.08); }
.site-footer small { color: #94a3b8; }

hr { border: 0; border-top: 1px solid var(--border); margin: 16px auto; max-width: 880px; }

/* Forms */
input, select, textarea {
    font: inherit;
    color: var(--text);
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card);
    margin: 3px 0;
    max-width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
    border-color: var(--primary);
}
label { display: inline-block; margin: 4px 0; }

/* Buttons */
button, input[type="submit"] {
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 9px 16px;
    margin: 3px 4px 3px 0;
    transition: background .15s ease, filter .15s ease;
}
button:hover, input[type="submit"]:hover { background: var(--primary-dark); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    max-width: 880px;
    margin: 10px auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
th, td { padding: 9px 12px; border: 1px solid var(--border); text-align: left; font-size: 0.95rem; }
th { background: var(--bg); font-weight: 600; }
tr:nth-child(even) td { background: #fcfcfd; }

/* Lists & misc */
ul, ol { padding-left: 28px; }
li { margin: 4px 0; }
details { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin: 8px auto; }
summary { cursor: pointer; font-weight: 600; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin: 12px auto; }
legend { font-weight: 600; padding: 0 6px; }

footer {
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 16px;
    margin-top: 24px;
    border-top: 1px solid var(--border);
}
footer a { color: var(--muted); }

/* Notifications — unread badge in nav */
.notif-badge {
    display: none;
    min-width: 18px;
    padding: 0 5px;
    height: 18px;
    line-height: 18px;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    color: #fff;
    background: var(--accent);
    border-radius: 9px;
    vertical-align: middle;
}

/* Notifications page */
.notif-tabs { display: flex; gap: 8px; max-width: 880px; margin: 0 auto 12px; padding: 0 16px; }
.notif-tab {
    cursor: pointer; padding: 6px 14px; border: 1px solid var(--border);
    border-radius: 999px; background: var(--card); font-weight: 600;
    font-size: 0.9rem; color: var(--muted);
}
.notif-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.notif-list { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.notif-item {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--card); border: 1px solid var(--border);
    border-left: 4px solid var(--muted);
    border-radius: 8px; padding: 12px 14px; margin: 8px 0;
}
.notif-item.unread { background: #f0f6ff; }
.notif-item.good { border-left-color: #16a34a; }
.notif-item.bad  { border-left-color: #dc2626; }
.notif-item.warn { border-left-color: #d97706; }
.notif-item.info { border-left-color: var(--primary); }
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; }
.notif-item.unread .notif-title::before {
    content: '●'; color: var(--accent); font-size: 0.7rem; margin-right: 6px; vertical-align: middle;
}
.notif-text { color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.notif-meta { font-size: 0.8rem; color: var(--muted); margin-top: 5px; display: flex; gap: 12px; align-items: center; }
.notif-actions { display: flex; gap: 4px; flex-shrink: 0; }
.notif-actions button { padding: 4px 9px; font-size: 0.8rem; background: var(--bg); color: var(--text); border: 1px solid var(--border); margin: 0; }
.notif-actions button:hover { background: var(--border); }
.notif-empty { text-align: center; color: var(--muted); padding: 40px 16px; }

@media (max-width: 600px) {
    h1 { font-size: 1.4rem; }
    input, select, textarea { width: 100%; }
}
