@import url('https://fonts.googleapis.com/css2?family=Bitter:wght@700&family=Noto+Sans:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

body {
    background-color: #f4f7f9;
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
}

.npi-header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.npi-logo-svg {
    height: 65px;
    display: block;
}

.language-switch {
    font-weight: bold;
}

.lang-link {
    color: #3566FC;
    text-decoration: none;
    padding: 5px 12px;
    font-size: 16px;
    border: 1px solid #3566FC;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.lang-link:hover {
    background-color: #3566FC;
    color: #fff;
}

.test-environment-label {
    background-color: #fca311;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
}

#cas-container {
    max-width: 450px;
    margin: 150px auto 50px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 200px;
}

#cas-container.wide {
    max-width: 95%;
}

.npi-header {
    text-align: center;
    margin-bottom: 30px;
}

.npi-logo {
    max-width: 200px;
    margin-bottom: 20px;
}

h1 {
    font-family: 'Bitter', serif;
    color: #3566FC;
    font-size: 24px;
    margin-bottom: 20px;
    margin-top: 0;
}

.cas-field label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.cas-field input[type="text"],
.cas-field input[type="password"],
.cas-field input[type="number"],
.cas-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 20px;
    font-size: medium;
}

.password-field {
    position: relative;
    margin-bottom: 20px;
}

.password-field input[type="password"] {
    margin-bottom: 5px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
    flex: 1;
    padding-right: 45px;
    margin-bottom: 0;
}

.reveal-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    line-height: 0;
}

.reveal-password:hover {
    color: #3566FC;
}

.reveal-password svg {
    width: 20px;
    height: 20px;
}

.caps-warn {
    display: none;
    color: #dc3545;
    font-size: 13px;
    margin-bottom: 15px;
}

.mfa-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-resend {
    background-color: #6c757d;
}

.btn-resend:hover {
    background-color: #545b62;
}

.forgot-password-link {
    display: block;
    text-align: right;
    font-size: 13px;
    color: #3566FC;
    text-decoration: none;
    margin-bottom: 15px;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.cas-field input:focus,
.cas-field select:focus {
    border-color: #3566FC;
    outline: none;
    box-shadow: 0 0 5px rgba(53, 102, 252, 0.3);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: #3566FC;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
}

.btn-submit:hover {
    background-color: #003cc2;
}

.delegated-providers {
    margin-top: 20px;
}

.my-4 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.text-center {
    text-align: center;
}

.login-with-text {
    color: #999;
}

.btn-delegated {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    margin-bottom: 10px;
    transition: background-color 0.3s, border-color 0.3s;
}

.btn-delegated:hover {
    background-color: #f8f9fa;
    border-color: #3566FC;
    color: #3566FC;
}

/* Microsoft/Entra ID Branding - Light Design */
.btn-entra {
    background-color: #fff;
    color: #5e5e5e;
    border: 1px solid #8c8c8c;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    height: 41px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Segoe UI', 'Helvetica Neue', 'Arial', sans-serif;
    margin-bottom: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.btn-entra:hover {
    background-color: #f8f9fa;
    border-color: #5e5e5e;
    color: #5e5e5e;
}

.btn-entra img {
    height: 21px;
    width: 21px;
    margin-right: 12px;
}

.delegated-logo {
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

.npi-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.npi-footer a:hover {
    text-decoration: underline;
}

/* Tabs */
.npi-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
    margin-top: 30px;
}

.npi-tab-link {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: none;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.npi-tab-link:hover {
    color: #3566FC;
}

.npi-tab-link.active {
    color: #3566FC;
    border-bottom-color: #3566FC;
}

.npi-tab-content {
    display: none;
    padding: 20px 0;
    text-align: left;
}

.npi-tab-content.active {
    display: block;
}

.npi-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.npi-table th, .npi-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.npi-table th:first-child, .npi-table td:first-child {
    white-space: nowrap;
    width: 20%;
}

.npi-table td {
    word-break: break-all;
}

.npi-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.npi-table tr:hover {
    background-color: #fafafa;
}

.d-flex {
    display: flex !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    padding: 5px 10px;
    margin-right: 10px;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 4px;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary {
    color: #fff;
    background-color: #3566FC;
    border-color: #3566FC;
}

.btn-primary:hover {
    background-color: #003cc2;
    border-color: #003cc2;
    color: #fff;
}

@media (max-width: 750px) {
    .header-content {
        flex-wrap: wrap;
    }
    .header-left {
        order: 1;
    }
    .header-right {
        order: 2;
    }
    .test-environment-label {
        position: static;
        transform: none;
        order: 3;
        width: 100%;
        text-align: center;
        margin-top: 8px;
    }
}

.npi-table code {
    background-color: #f0f0f0;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 14px;
    word-break: break-all;
    white-space: pre-wrap;
}

/* GAuth dialogs */
.mdc-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.mdc-dialog--open {
    display: flex;
}

.mdc-dialog__scrim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.mdc-dialog__container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 100%;
    padding: 1rem;
    pointer-events: none;
}

.mdc-dialog__surface {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    pointer-events: auto;
}

.mdc-dialog__content {
    margin-bottom: 1rem;
}

.mdc-dialog__actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

/* GAuth views */
#cas-container.gauth-wide {
    max-width: 700px;
}

.mdc-dialog__title {
    font-family: 'Open Sans', sans-serif;
    color: inherit;
    font-size: 20px;
}

.gauth-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.gauth-col-qr {
    flex: 0 0 200px;
    text-align: center;
}

.gauth-col-qr img {
    max-width: 100%;
    height: auto;
}

.gauth-col-details {
    flex: 1;
    min-width: 200px;
}

.npi-scratch-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.npi-scratch-code {
    background-color: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

.npi-device-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.npi-device-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
}

.npi-device-item:last-child {
    border-bottom: none;
}

.npi-device-detail {
    display: flex;
    margin-bottom: 4px;
    font-size: 14px;
}

.npi-device-detail-label {
    font-weight: 600;
    color: #333;
    min-width: 120px;
}

.npi-device-detail-value {
    color: #555;
    word-break: break-all;
}

.npi-device-actions {
    margin-top: 8px;
    display: flex;
    gap: 0.5rem;
}

.btn-outline-secondary {
    color: #6c757d;
    background-color: transparent;
    border-color: #6c757d;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.alert {
    color: #dc3545;
}
