html, body.app-page, body.login-page {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.app-page, body.login-page {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f4f6f9;
    color: #33475b;
}

/* ---------- Top bar ---------- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    box-shadow: 0 1px 4px rgba(18, 41, 79, 0.12);
    padding: 14px 30px;
}

.app-header-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.app-header-brand:hover,
.app-header-brand:focus {
    text-decoration: none;
}

.app-header-mark {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 7px;
    background: linear-gradient(135deg, #6d1229 0%, #6f3d1c 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    margin-right: 10px;
}

.app-header-name {
    color: #12294f;
    font-size: 18px;
    font-weight: 700;
}

.app-header-user {
    display: flex;
    align-items: center;
}

.app-header-username {
    color: #33475b;
    font-weight: 600;
    margin-right: 18px;
}

.app-header-link,
.app-header-logout {
    color: #6f3d1c;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    margin-right: 18px;
}

.app-header-logout {
    margin-right: 0;
}

.app-header-link:hover,
.app-header-logout:hover {
    text-decoration: underline;
}

/* ---------- Layout ---------- */
.app-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.page-hero {
    padding: 20px 0 20px;
}

.page-hero h1 {
    font-size: 24px;
    font-weight: 700;
    color: #12294f;
    margin: 0 0 6px;
}

.page-hero p {
    color: #6b7280;
    margin: 0;
}

.page-hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------- Module cards (dashboard) ---------- */
.module-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 10px;
}

.module-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(18, 41, 79, 0.08);
    padding: 24px;
    flex: 1 1 260px;
    max-width: 320px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.module-card:hover {
    box-shadow: 0 4px 14px rgba(18, 41, 79, 0.16);
    text-decoration: none;
    color: inherit;
}

.module-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6d1229 0%, #6f3d1c 100%);
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 14px;
}

.module-card h2 {
    font-size: 16px;
    font-weight: 700;
    color: #12294f;
    margin: 0 0 6px;
}

.module-card p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* ---------- Results / grid ---------- */
.results-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(18, 41, 79, 0.08);
    margin-top: 20px;
    overflow-x: auto;
}

.results-card table {
    width: 100%;
    border-collapse: collapse;
}

.results-card thead th {
    background: linear-gradient(135deg, #12294f 0%, #1c6d6f 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    padding: 12px 18px;
    white-space: nowrap;
}

.results-card tbody td {
    padding: 12px 18px;
    border-top: 1px solid #eef1f5;
    font-size: 14px;
    vertical-align: middle;
}

.results-card tbody tr:hover {
    background-color: #f7fafc;
}

.empty-state {
    text-align: center;
    color: #9aa5b1;
    padding: 40px 20px;
    font-size: 14px;
}

.chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.chip-success {
    background-color: #e8f7ee;
    color: #1e8449;
}

.chip-muted {
    background-color: #f0f1f3;
    color: #6b7280;
}

.chip-admin {
    background-color: #fdeee3;
    color: #a8551a;
}

.link-action {
    color: #1c6d6f;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    margin-right: 12px;
}

.link-action:hover {
    text-decoration: underline;
}

.btn-link-action {
    background: none;
    border: none;
    padding: 0;
    color: #1c6d6f;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.btn-link-action:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: #1c6d6f;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* ---------- Form card ---------- */
.form-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(18, 41, 79, 0.08);
    padding: 30px;
    max-width: 560px;
    margin-top: 20px;
}

.form-card h2 {
    margin-top: 0;
}

.form-hint {
    font-size: 13px;
    color: #9aa5b1;
    margin-top: -8px;
    margin-bottom: 18px;
}

.form-check-row {
    display: flex;
    gap: 30px;
    margin-bottom: 18px;
}

/* ---------- Login (same look as main app) ---------- */
.login-wrapper {
    display: flex;
    flex-wrap: wrap;
    min-height: 100vh;
}

.login-info {
    flex: 1 1 50%;
    min-width: 320px;
    background: linear-gradient(135deg, #12294f 0%, #6d1229 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 60px 50px;
}

.login-info-content {
    max-width: 460px;
    margin: 0 auto;
}

.login-brand {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 40px;
}

.login-brand:hover,
.login-brand:focus {
    text-decoration: none;
}

.login-brand-mark {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-weight: 700;
    margin-right: 10px;
    vertical-align: middle;
}

.login-brand-name {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    vertical-align: middle;
}

.login-info h1 {
    font-size: 30px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 16px;
}

.login-lead {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.login-form-panel {
    flex: 1 1 50%;
    min-width: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
}

.login-card {
    width: 100%;
    max-width: 360px;
}

.login-card h2 {
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 6px;
}

.login-subtitle {
    color: #6b7280;
    margin-bottom: 25px;
}

.login-card .form-group label {
    font-weight: 600;
    color: #33475b;
}

.login-card .form-control {
    max-width: 100%;
    height: 42px;
    box-shadow: none;
}

.login-card .btn-primary {
    height: 44px;
    font-weight: 600;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #12294f 0%, #6d1229 100%);
    border: none;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #0e2140 0%, #591020 100%);
}

@media (max-width: 767px) {
    .login-info {
        padding: 40px 25px;
    }

    .login-form-panel {
        padding: 40px 25px;
    }
}

@media (max-width: 600px) {
    .app-header {
        padding: 12px 16px;
    }

    .form-card {
        padding: 20px;
    }
}
