/* ===================== Global ===================== */
html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #fafafa;
    color: #111;
    height: 100%;
    overflow: hidden;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
}

/* ===================== Left Panel ===================== */
.panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #ffffff;
}

.panel-inner {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.logo {
    width: 140px;
    margin-bottom: 28px;
}

h1 {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin: 0 0 10px 0;
}

.tm {
    font-size: 0.4em;
    vertical-align: super;
    margin-left: 2px;
    color: #777;
    font-weight: 400;
}

h2 {
    font-size: 28px;
    margin: 0 0 20px 0;
    text-align: center;
}

.subtext {
    font-size: 15px;
    color: #777;
    margin-bottom: 36px;
    text-align: center;
}

/* ===================== Forms ===================== */
.form-group, .input-group {
    margin-bottom: 18px;
}

textarea {
    resize: none;
}

label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #555;
}

input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #000;
}

.actions {
    margin-top: 28px;
}

button {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    opacity: 0.9;
}

.cancel, .extra-links a {
    margin-top: 14px;
    display: block;
    text-align: center;
    font-size: 13px;
    color: #777;
    text-decoration: none;
}

.flash, .error-message, .success-message {
    background: #fff4f4;
    border: 1px solid #ffd2d2;
    color: #900;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* ===================== Right Panel Image ===================== */
.image-panel {
    flex: 1;
    background: url("/static/images/login-card-2.jpg") center / cover no-repeat;
}

/* ===================== Scrollable Content ===================== */
.panel-inner form {
    max-height: 65vh; /* prevents page overflow */
    overflow-y: auto;
    padding-right: 6px; /* for scrollbar spacing */
}

.panel-inner form::-webkit-scrollbar {
    width: 6px;
}

.panel-inner form::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

/* ===================== Mobile ===================== */
@media (max-width: 900px) {
    .image-panel {
        display: none;
    }

    h1 {
        font-size: 34px;
    }

    h2 {
        font-size: 24px;
    }
}

.help-flag {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #f44336;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}
.metrics {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.metric-card {
    flex: 1;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}

.metric-number {
    font-size: 22px;
    font-weight: 700;
}

.metric-label {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

.cancel-btn {
    flex: 1;
    background: #ffe6e6;
    color: #b30000;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
}

.cancel-btn:hover {
    background: #ffd6d6;
}
