/* BlueGrammar Head Office — one file, compact, blue house style. */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 14px;
    color: #1d2b3a;
    background: #eef3f9;
}

/* ---------- Top bar ---------- */
.hq-topbar {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    background: #1361C8;
    color: #fff;
    padding: 8px 16px;
}
.hq-brand {
    color: #fff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
}
.hq-brand span { font-weight: 400; opacity: .85; font-size: 14px; }
.hq-nav { display: flex; gap: 4px; }
.hq-nav a {
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13.5px;
}
.hq-nav a:hover { background: rgba(255,255,255,.18); }
.hq-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
}
.hq-user form { margin: 0; }
.hq-logout {
    background: #be434b;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 13px;
}

/* ---------- Layout ---------- */
.hq-main { max-width: 1180px; margin: 0 auto; padding: 14px 14px 26px; }
.hq-footer {
    text-align: center;
    color: #7a8a9c;
    font-size: 12px;
    padding: 10px 0 18px;
}
.hq-pagehead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 4px 0 12px;
}
.hq-pagehead h1 { margin: 0; font-size: 20px; color: #0E4FA8; }

/* ---------- Cards / tiles ---------- */
.hq-card {
    background: #fff;
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.hq-card-title { margin: 0 0 10px; font-size: 15px; color: #0E4FA8; }
.hq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.hq-tiles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.hq-tile {
    background: #fff;
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
}
.hq-tile-num { font-size: 24px; font-weight: 700; color: #1361C8; }
.hq-tile-label { font-size: 12px; color: #61758c; }
.hq-ok { color: #1d8a4e !important; }
.hq-warn { color: #c07f13 !important; }
.hq-bad { color: #be434b !important; }

/* ---------- Tables ---------- */
.hq-table-wrap { overflow-x: auto; }
.hq-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hq-table th {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 2px solid #d7e2ef;
    color: #0E4FA8;
    white-space: nowrap;
}
.hq-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e6edf5;
    vertical-align: top;
    white-space: nowrap;
}
.hq-holder { font-weight: 600; }
.hq-mono { font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.hq-row-actions { white-space: nowrap; }
.hq-inline-form { display: inline-block; margin: 0; }

/* ---------- Pills ---------- */
.hq-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.hq-pill-ok { background: #e2f4e9; color: #1d8a4e; }
.hq-pill-warn { background: #fdf0d5; color: #9a6a0d; }
.hq-pill-bad { background: #fbe3e5; color: #be434b; }

/* ---------- Forms ---------- */
.hq-form-card { max-width: 720px; }
.hq-field { margin-bottom: 12px; }
.hq-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    color: #33475e;
}
.hq-input {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid #b9c9dc;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}
.hq-input:focus { outline: 2px solid #1361C8; outline-offset: 0; border-color: #1361C8; }
.hq-form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}
.hq-hint { font-size: 12px; color: #7a8a9c; margin-top: 3px; }
.hq-validation { color: #be434b; font-size: 12.5px; }
.hq-quickdates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.hq-key-display {
    background: #eef3f9;
    border: 1px dashed #1361C8;
    border-radius: 7px;
    padding: 8px 10px;
    font-size: 15px;
}
.hq-search { display: flex; gap: 8px; margin-bottom: 12px; max-width: 560px; }

/* ---------- Buttons ---------- */
.hq-btn {
    display: inline-block;
    border: none;
    border-radius: 7px;
    padding: 8px 14px;
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.hq-btn-primary { background: #1361C8; color: #fff; }
.hq-btn-primary:hover { background: #0E4FA8; }
.hq-btn-secondary { background: #e3ecf6; color: #0E4FA8; }
.hq-btn-secondary:hover { background: #d2e0f0; }
.hq-btn-danger { background: #be434b; color: #fff; }
.hq-btn-danger:hover { background: #a53640; }
.hq-btn-small { padding: 4px 10px; font-size: 12.5px; }
.hq-btn-block { width: 100%; }

/* ---------- Alerts / misc ---------- */
.hq-alert { border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: 13.5px; }
.hq-alert-ok { background: #e2f4e9; color: #14653a; border: 1px solid #a9dcbc; }
.hq-alert-bad { background: #fbe3e5; color: #8f2d36; border: 1px solid #efb3ba; }
.hq-newkey {
    background: #fff8e1;
    border: 1px solid #e3c86b;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
}
.hq-newkey-label { font-size: 12.5px; color: #7a6210; margin-bottom: 3px; }
.hq-newkey-value {
    font-family: Consolas, "Courier New", monospace;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #1d2b3a;
}
.hq-muted { color: #61758c; font-size: 13px; }
.hq-login-wrap {
    display: flex;
    justify-content: center;
    padding-top: 40px;
}
.hq-login-card { width: 100%; max-width: 400px; }
.hq-login-title { margin: 0 0 4px; font-size: 19px; color: #0E4FA8; }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    .hq-grid { grid-template-columns: 1fr; }
    .hq-tiles { grid-template-columns: repeat(2, 1fr); }
    .hq-form-row { grid-template-columns: 1fr; }
    .hq-user { margin-left: 0; }
    .hq-main { padding: 10px 8px 20px; }
}
