html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* ===========================
   HammerMatch UI Skin (v1)
   Modern SaaS + Deep Burgundy
   =========================== */

:root {
    --hm-accent: #7a1020; /* deep burgundy */
    --hm-accent-2: #b91c1c; /* brighter red for hover states */
    --hm-text: #111827;
    --hm-muted: #6b7280;
    --hm-bg: #f6f7f9;
    --hm-card: #ffffff;
    --hm-border: #e5e7eb;
    --hm-border-2: #d1d5db;
    --hm-shadow: 0 8px 20px rgba(0,0,0,.06);
    --hm-radius: 12px;
}

/* Base page */
body.hm {
    background: var(--hm-bg);
    color: var(--hm-text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.4;
}

.hm .page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 16px 48px;
}

.hm h1, .hm h2, .hm h3 {
    margin-top: 10px;
    letter-spacing: -0.01em;
}

.hm a {
    color: var(--hm-accent);
    text-decoration: none;
}

    .hm a:hover {
        text-decoration: underline;
    }

/* Top nav */
.hm .topbar {
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
    padding: 10px 14px;
    margin: 12px auto 18px;
    max-width: 1120px;
}

    .hm .topbar a {
        margin-right: 10px;
        font-weight: 600;
    }

    .hm .topbar .right {
        float: right;
        color: var(--hm-muted);
        font-size: 13px;
    }

    .hm .topbar:after {
        content: "";
        display: block;
        clear: both;
    }

/* Card blocks (optional wrapper if you add it later) */
.hm .card {
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
    padding: 14px 14px;
}

/* Buttons */
.hm button,
.hm input[type="submit"],
.hm .hm-btn {
    display: inline-block;
    background: var(--hm-accent);
    color: #fff !important;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    padding: 9px 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    line-height: 1;
}

    .hm button:hover,
    .hm input[type="submit"]:hover,
    .hm .hm-btn:hover {
        background: #650d1a;
    }

    .hm button:disabled {
        background: #9ca3af;
        cursor: not-allowed;
    }

.hm .hm-btn-secondary {
    background: #ffffff;
    color: var(--hm-accent) !important;
    border: 1px solid var(--hm-border-2);
}

    .hm .hm-btn-secondary:hover {
        background: #f9fafb;
    }

/* Inputs */
.hm input[type="text"],
.hm input[type="number"],
.hm input[type="email"],
.hm input[type="password"],
.hm select {
    border: 1px solid var(--hm-border-2);
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    outline: none;
}

    .hm input:focus, .hm select:focus {
        border-color: var(--hm-accent);
        box-shadow: 0 0 0 3px rgba(122,16,32,.12);
    }

/* Tables (global upgrade without rewriting views) */
.hm table {
    width: 100%;
    border-collapse: collapse !important;
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    overflow: hidden;
    box-shadow: var(--hm-shadow);
    margin-top: 12px;
}

.hm thead th {
    background: #fbfbfc;
    color: #111;
    text-transform: none;
    font-weight: 800;
    font-size: 13px;
    border-bottom: 1px solid var(--hm-border);
    padding: 10px 10px;
}

.hm tbody td {
    border-bottom: 1px solid var(--hm-border);
    padding: 10px 10px;
    vertical-align: top;
    font-size: 14px;
}

.hm tbody tr:hover {
    background: #fafafa;
}

.hm table ul {
    margin: 6px 0 6px 18px;
}

/* Small status pills */
.hm .pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid var(--hm-border);
    background: #fff;
    color: var(--hm-text);
}

.hm .pill-ok {
    background: rgba(16,185,129,.12);
    border-color: rgba(16,185,129,.25);
}

.hm .pill-warn {
    background: rgba(245,158,11,.14);
    border-color: rgba(245,158,11,.25);
}

.hm .pill-bad {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.25);
}

/* Make <hr> feel cleaner */
.hm hr {
    border: none;
    border-top: 1px solid var(--hm-border);
    margin: 18px 0;
}

/* ---------------------------
   HammerMatch Auth UI
--------------------------- */
.hm-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--hm-bg);
}

.hm-auth-card {
    width: 420px;
    max-width: 100%;
    border-radius: 16px;
    border: 1px solid var(--hm-border);
    box-shadow: var(--hm-shadow);
    overflow: hidden;
    background: var(--hm-card);
}

.hm-auth-header {
    padding: 18px 20px;
    background: var(--hm-accent);
    color: #fff;
}

.hm-auth-brand {
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 0.2px;
}

.hm-auth-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

.hm-auth-body {
    padding: 18px 20px 20px 20px;
}

.hm-field {
    margin-bottom: 12px;
}

    .hm-field label {
        display: block;
        font-size: 13px;
        margin-bottom: 6px;
        color: var(--hm-text);
        font-weight: 700;
    }

.hm-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--hm-border-2);
    outline: none;
    font-size: 14px;
}

    .hm-input:focus {
        border-color: var(--hm-accent);
        box-shadow: 0 0 0 3px rgba(122,16,32,.12);
    }

.hm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 14px 0;
    gap: 10px;
}

.hm-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--hm-muted);
}

.hm-link {
    font-size: 13px;
    color: var(--hm-accent);
    text-decoration: none;
    font-weight: 700;
}

    .hm-link:hover {
        text-decoration: underline;
    }

.hm-btn-block {
    width: 100%;
}

.hm-auth-footnote {
    margin-top: 12px;
    font-size: 12px;
    color: var(--hm-muted);
}

.hm-validation {
    display: block;
    font-size: 12px;
    color: #b91c1c;
    margin-top: 4px;
}

.hm-alert {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.hm-alert-danger {
    background: rgba(185, 28, 28, 0.08);
    border: 1px solid rgba(185, 28, 28, 0.25);
    color: #7f1d1d;
}

/* ===========================
   Identity / Account pages
   =========================== */

.hm-auth-wrap {
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.hm-auth-card {
    width: 100%;
    max-width: 860px;
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
    overflow: hidden;
}

.hm-auth-header {
    background: var(--hm-accent);
    color: #fff;
    padding: 16px 18px;
}

.hm-auth-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.hm-auth-sub {
    margin-top: 2px;
    font-size: 13px;
    opacity: 0.9;
}

.hm-auth-body {
    padding: 18px;
}

.hm-manage-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
}

.hm-manage-nav {
    border: 1px solid var(--hm-border);
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}

.hm-manage-content {
    border: 1px solid var(--hm-border);
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}

/* Make the Identity nav look consistent even if it uses bootstrap classes */
.hm .hm-manage-nav a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    font-weight: 700;
    color: var(--hm-text);
    text-decoration: none;
}

    .hm .hm-manage-nav a:hover {
        background: #f9fafb;
        color: var(--hm-accent);
    }

@media (max-width: 820px) {
    .hm-manage-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Identity pages (Login etc)
   =========================== */

.hm-auth-wrap {
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.hm-auth-card {
    width: 100%;
    max-width: 520px;
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
    overflow: hidden;
}

.hm-auth-header {
    background: var(--hm-accent);
    color: #fff;
    padding: 16px 18px;
}

.hm-auth-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.hm-auth-sub {
    margin-top: 2px;
    font-size: 13px;
    opacity: 0.9;
}

.hm-auth-body {
    padding: 18px;
}

.hm-field {
    margin-bottom: 12px;
}

    .hm-field label {
        display: block;
        font-weight: 800;
        font-size: 13px;
        margin-bottom: 6px;
        color: var(--hm-text);
    }

.hm-input {
    width: 100%;
    border: 1px solid var(--hm-border-2);
    border-radius: 10px;
    padding: 10px 10px;
    background: #fff;
    outline: none;
}

    .hm-input:focus {
        border-color: var(--hm-accent);
        box-shadow: 0 0 0 3px rgba(122,16,32,.12);
    }

.hm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 14px;
    gap: 12px;
}

.hm-checkbox {
    font-size: 13px;
    color: var(--hm-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hm-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--hm-accent);
    text-decoration: none;
}

    .hm-link:hover {
        text-decoration: underline;
    }

.hm-btn-block {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
}

.hm-auth-footnote {
    margin-top: 12px;
    font-size: 12px;
    color: var(--hm-muted);
}

/* Alerts + validation */
.hm-alert {
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 12px;
}

.hm-alert-danger {
    background: rgba(239,68,68,.10);
    border: 1px solid rgba(239,68,68,.25);
    color: #991b1b;
}

.hm-validation {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #991b1b;
}

/* Identity auth pages */
body.hm.hm-auth {
    margin: 0;
    background: var(--hm-bg);
}

.hm-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.hm-auth-card {
    width: 520px;
    max-width: 100%;
    background: var(--hm-card);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
    overflow: hidden;
}

.hm-auth-head {
    background: var(--hm-accent);
    color: #fff;
    padding: 18px 22px;
}

.hm-brand {
    font-size: 18px;
    font-weight: 900;
}

.hm-sub {
    font-size: 13px;
    opacity: .9;
    margin-top: 2px;
}

.hm-auth-body {
    padding: 18px 22px 20px;
}

.hm-field {
    margin-bottom: 12px;
}

.hm-input {
    width: 100%;
    margin-top: 6px;
}

.hm-btn-block {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
}

.hm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 14px;
}

.hm-auth-footnote {
    margin-top: 12px;
    color: var(--hm-muted);
    font-size: 12px;
}
