/* Shared page layout for HiSky EFB web pages */

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.header,
.logo-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    padding: 8px 10px;
    box-sizing: border-box;
    background: #fff;
}

.header-brand {
    grid-column: 2;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.header-logo-link {
    display: inline-block;
    line-height: 0;
}

/* ℹ️ + small italic dark blue — reuse .hint elsewhere */
.hint {
    font-size: 0.75rem;
    font-style: italic;
    color: #0a2f5c;
    margin: 0;
    line-height: 1.35;
    text-align: left;
}

.hint-icon {
    margin-right: 0.25em;
}

.header-logo-hint {
    margin-top: 6px;
    max-width: 220px;
    text-align: left;
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
}

/* Stack of .hint lines (e.g. battery_show, audit tables) */
.hint-group {
    text-align: left;
    margin: 0 0 12px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.stat .hint-group {
    margin-top: 8px;
}

/* Single full-width .hint before a form or section (e.g. issue.php) */
.hint-block {
    margin: 0 0 12px 0;
    width: 100%;
    box-sizing: border-box;
}

.header img,
.logo-header img {
    width: 100px;
    height: auto;
}

/* Icon stays fixed at the right; role label is absolutely placed to its left */
.header-auth {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-right: 8px;
    min-width: 1.25em;
    min-height: 1.25em;
}

.auth-role-label {
    position: absolute;
    right: 100%;
    margin-right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0a2f5c;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}

.auth-status {
    font-size: 20px;
    text-decoration: none;
    line-height: 1;
}

.site-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 16px 10px;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    font-size: 13px;
    color: #555;
}

.site-footer a,
.site-footer a:hover,
.site-footer a:focus,
.site-footer a:visited {
    color: #333;
    text-decoration: none;
}

.site-footer-telegram {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.site-footer a.site-footer-telegram,
.site-footer a.site-footer-telegram:visited {
    color: #229ed9;
}

.site-footer a.site-footer-telegram:hover,
.site-footer a.site-footer-telegram:focus {
    color: #1877b3;
    text-decoration: none;
}

.container {
    width: min(95%, 980px);
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

h1, h2 {
    color: #333;
}

.container h1,
.container h2,
.container h3 {
    text-align: center;
}

form {
    margin-top: 10px;
}

label {
    font-weight: bold;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea,
select {
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 20px 0;
}

.summary-table th {
    background: #007BFF;
    color: #fff;
}

.stat {
    font-size: 18px;
    margin: 10px 0;
    text-align: center;
}

.grayhint {
    font-size: small;
    color: lightgray;
    font-style: italic;
}

.btn-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

@media (max-width: 900px) {
    .container {
        width: calc(100% - 20px);
        margin: 12px auto;
        padding: 14px;
    }

    .btn-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-row > * {
        width: 100% !important;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
