* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #f4f6f8;
    color: #222;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

.page-container {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 24px 48px 44px 48px;
}

@media (max-width: 900px) {
    .page-container {
        padding: 16px 18px 32px 18px;
    }
}

.card {
    background: #fff;
    border: 1px solid #dcdfe3;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

a {
    color: #0f5fb3;
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

h1 {
    margin: 0 0 14px 0;
    font-size: 28px;
}

h2 {
    margin-top: 24px;
    margin-bottom: 10px;
    font-size: 20px;
}

hr {
    border: 0;
    border-top: 1px solid #d9dee7;
    margin: 20px 0;
}

.page-links,
p.nav-links {
    margin: 10px 0 18px 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

button,
input[type="submit"] {
    display: inline-block;
    border: 1px solid #0f5fb3;
    background: #0f5fb3;
    color: #ffffff;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
    background: #0b4f99;
    border-color: #0b4f99;
}

button.danger {
    background: #b42318;
    border-color: #b42318;
}

button.secondary {
    background: #ffffff;
    border-color: #b9c5d6;
    color: #0f3d66;
}

form.inline,
.inline-form {
    display: inline;
}

input,
select,
textarea {
    border: 1px solid #b9c5d6;
    border-radius: 6px;
    padding: 7px 9px;
    margin: 4px 8px 4px 0;
    font-size: 14px;
    max-width: 100%;
}

textarea {
    width: 100%;
    max-width: 980px;
}

.table-wrap {
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #d9dee7;
    border-radius: 10px;
    margin-top: 12px;
    max-width: 100%;
}

table {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
    background: #ffffff;
}

table th,
table td,
th,
td {
    border: 1px solid #d9dde3;
    padding: 10px 12px;
    vertical-align: top;
    text-align: left;
}

table th,
th {
    background: #e9eef3;
    font-weight: bold;
    white-space: nowrap;
}

table tr:nth-child(odd) td {
    background: #ffffff;
}

table tr:nth-child(even) td {
    background: #f3f6fa;
}

table tr:hover td {
    background: #eaf4ff;
}

.bool-true,
.status-ok,
.text-ok {
    color: #087443;
    font-weight: bold;
    white-space: nowrap;
}

.bool-false,
.status-error,
.text-error {
    color: #b42318;
    font-weight: bold;
    white-space: nowrap;
}

.status-warn,
.text-warn {
    color: #b54708;
    font-weight: bold;
    white-space: nowrap;
}

.status-muted,
.text-muted {
    color: #667085;
}

.mgrs-cell {
    white-space: nowrap;
    font-family: Consolas, "Courier New", monospace;
    min-width: 190px;
}

.nowrap,
.actions {
    white-space: nowrap;
}

.actions form,
.actions a,
.actions button {
    display: inline-block;
    margin-right: 6px;
    margin-bottom: 4px;
}

.comment-cell {
    min-width: 240px;
    max-width: 380px;
    white-space: normal;
    word-break: break-word;
}

.alert-success {
    background: #ecfdf3;
    color: #05603a;
    border: 1px solid #abefc6;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 12px 0;
    font-weight: bold;
}

.alert-error {
    background: #fef3f2;
    color: #b42318;
    border: 1px solid #fecdca;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 12px 0;
    font-weight: bold;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #d9dee7;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 8px 26px rgba(16, 24, 40, 0.08);
}

.login-card input {
    width: 100%;
    margin: 6px 0 14px 0;
}

.login-card button {
    width: 100%;
    padding: 10px 12px;
}

.footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #d9dee7;
    font-size: 12px;
    color: #667085;
}

.top-right-links {
    position: fixed;
    top: 12px;
    right: 24px;
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #dcdfe3;
    border-radius: 6px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.top-right-links a {
    margin-left: 10px;
    font-weight: bold;
}

.top-right-links a:first-child {
    margin-left: 0;
}