:root {
    --afikim-blue: #1273c4;
    --afikim-blue-dark: #0b3357;
    --afikim-accent: #5eb2ff;
    --hot: #e35d3f;
    --cold: #2e86de;
    --ok: #1faa59;
    --card-shadow: 0 2px 10px rgba(11, 51, 87, 0.08), 0 1px 3px rgba(11, 51, 87, 0.06);
}

html, body {
    font-family: 'Rubik', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #eef3f8;
}

a, .btn-link {
    color: var(--afikim-blue);
}

.btn-primary {
    color: #fff;
    background-color: var(--afikim-blue);
    border-color: #0f65ab;
}

.btn-primary:hover {
    background-color: #0f65ab;
    border-color: #0f65ab;
}

.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 var(--afikim-accent);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: 8px;
}

.blazor-error-boundary::after {
    content: "אירעה שגיאה.";
}

/*──────────────────────────────────────────────
  Page header
──────────────────────────────────────────────*/
.page-title {
    font-weight: 600;
    color: var(--afikim-blue-dark);
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: #6b7f92;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/*──────────────────────────────────────────────
  Stat tiles (dashboard KPIs)
──────────────────────────────────────────────*/
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 14px;
    padding: 1.15rem 1.3rem;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-inline-start: 4px solid var(--afikim-accent);
}

.stat-card .stat-icon {
    font-size: 1.9rem;
}

.stat-card .stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--afikim-blue-dark);
    line-height: 1.1;
}

.stat-card .stat-label {
    color: #6b7f92;
    font-size: 0.85rem;
}

/*──────────────────────────────────────────────
  Cards / panels
──────────────────────────────────────────────*/
.hub-card {
    background: white;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.25rem;
}

.hub-card > h5 {
    color: var(--afikim-blue-dark);
    font-weight: 600;
    border-bottom: 2px solid #e8eef5;
    padding-bottom: 0.6rem;
    margin-bottom: 0.9rem;
}

/*──────────────────────────────────────────────
  Tables
──────────────────────────────────────────────*/
.hub-table {
    width: 100%;
    font-size: 0.92rem;
}

.hub-table th {
    color: #6b7f92;
    font-weight: 500;
    border-bottom: 2px solid #e8eef5;
    padding: 0.45rem 0.6rem;
    white-space: nowrap;
}

.hub-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #f0f4f9;
    vertical-align: middle;
}

.hub-table tbody tr:hover {
    background: #f4f9ff;
}

/*──────────────────────────────────────────────
  Number / code values inside RTL text
──────────────────────────────────────────────*/
.ltr {
    direction: ltr;
    unicode-bidi: isolate;
}

.mono {
    direction: ltr;
    unicode-bidi: isolate;
    font-family: Consolas, 'Courier New', monospace;
}

/*──────────────────────────────────────────────
  Device report page
──────────────────────────────────────────────*/
.temp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}

.temp-tile {
    border-radius: 12px;
    padding: 1rem;
    color: white;
    text-align: center;
}

.temp-tile .temp-value {
    font-size: 2rem;
    font-weight: 700;
    direction: ltr;
    unicode-bidi: isolate;
}

.temp-tile .temp-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.temp-tile .temp-set {
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 0.2rem;
}

.temp-hot  { background: linear-gradient(135deg, #e35d3f, #c0392b); }
.temp-cold { background: linear-gradient(135deg, #56a8f5, #2e6fde); }
.temp-dev  { background: linear-gradient(135deg, #8395a7, #576574); }

.flag-badge {
    display: inline-block;
    background: #eaf4ff;
    color: #0f65ab;
    border-radius: 999px;
    padding: 0.25rem 0.8rem;
    margin: 0.15rem;
    font-size: 0.85rem;
}

.flag-badge.warn {
    background: #fdecea;
    color: #c0392b;
    font-weight: 600;
}

.error-row {
    background: #fdecea;
    border-radius: 8px;
    padding: 0.55rem 0.9rem;
    margin-bottom: 0.4rem;
    color: #a5281b;
}

.kv-table td:first-child {
    color: #6b7f92;
    white-space: nowrap;
    padding-inline-end: 1.2rem;
}

/*──────────────────────────────────────────────
  Log viewer
──────────────────────────────────────────────*/
.log-view {
    direction: ltr;
    text-align: left;
    background: #0d1b2a;
    color: #d7e3f0;
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    max-height: 60vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
