﻿/* ==========================================================================
   1. GLOBAL STYLES & VARIABLES
   ========================================================================== */
:root {
    --primary-blue: #0056b3;
    --secondary-gray: #6c757d;
    --error-red: #dc3545;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
}
.hidden {
    display: none !important;
}
.logo-wrapper img {
    height: 45px; /* Set your explicit logo constraint */
    margin-bottom: 15px;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    margin: 0;
}

/* ==========================================================================
   2. LAYOUT WRAPPERS & CONTAINERS
   ========================================================================== */
/* Fullscreen Centralizer (Used for Login, Error, Reset pages) */
.fullscreen-center-wrapper {
    display: flex;
    align-items: center; /* Vertical centering */
    justify-content: center; /* Horizontal centering */
    min-height: 90vh; /* 100% of the screen height */
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
}

/* Common Card Base Layout Pattern */
.login-container,
.profile-container,
.reset-container,
.setup-container,
.recovery-container,
.dashboard-container,
.error-container,
.mfa-container {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    width: 100%;
}
/*.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;*/ /* Takes full screen layout without breaking bounds */
    /*box-sizing: border-box;
    padding: 20px;
}*/

/* 500px Sized Container Panels */
.profile-container,
.setup-container {
    max-width: 500px;
    margin: 10px auto;
    padding: 25px;
}

/* 450px Sized Container Panels */
.reset-container,
.recovery-container {
    max-width: 450px;
    margin: 40px auto;
    padding: 25px;
}

/* 420px Sized Compact Card Panels */
.login-container,
.mfa-container {
    max-width: 420px;
    padding: 30px 25px;
}

.mfa-container {
    margin: 50px auto;
}

/* Layout Variations & Scaling Overrides */
.login-container-large {
    max-width: 504px;
    margin: 60px auto;
    padding: 36px 30px;
    border-radius: 5px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.05);
}

.dashboard-container {
    padding: 20px;
    margin-top: 20px;
}
.dashboard-header {
    display: flex;
    justify-content: space-between; /* Pushes the title to the left and button to the right */
    align-items: center; /* Perfectly aligns them vertically */
    width: 100%;
}

.error-container {
    max-width: 500px;
    padding: 40px 30px;
    border-top: 4px solid var(--error-red);
    text-align: center;
}

/* ==========================================================================
   3. TYPOGRAPHY & HEADERS
   ========================================================================== */
/* Clean Left-Aligned Section Headers */
.profile-container h4,
.reset-container h4,
.recovery-container h4,
.setup-container h4 {
    margin-top: 0;
    margin-bottom: 0px;
    color: var(--primary-blue);
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* Centered Layout Component Headers */
.mfa-container h4 {
    margin-top: 0;
    margin-bottom: 0px;
    color: var(--primary-blue);
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.setup-container h3 {
    margin-top: 0;
    margin-bottom: 0px;
    color: var(--primary-blue);
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.login-container h3 {
    margin-top: 0;
    margin-bottom: 0px;
    color: var(--primary-blue);
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.6px;
}

/* Application Error Display Screen Typography */
.error-container h1 {
    margin-top: 0;
    margin-bottom: 0px;
    color: var(--error-red);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.error-container p {
    margin: 0 0 0px 0;
    color: var(--secondary-gray);
    font-size: 13px;
    line-height: 1.6;
}

/* ==========================================================================
   4. FORM ELEMENTS & INTERACTIVE CONTROLS
   ========================================================================== */
.form-group {
    margin-bottom: 10px;
    position: relative;
}

.form-group-large {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 6px;
}

.label-large {
    font-size: 14px;
    margin-bottom: 7px;
}

/* Generic Structural Rules for Form Input Nodes */
input[type="text"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    box-sizing: border-box;
    background-color: #ffffff;
}

.input-large {
    padding: 7px;
    font-size: 14px;
    border-radius: 5px;
}

/* Focus and Active States */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

input[readonly] {
    background-color: #e9ecef;
    color: var(--secondary-gray);
    cursor: not-allowed;
}

/* Security Totp / MFA Code Styling */
input[type="text"].totp-input {
    width: 100%;
    padding: 10px;
    text-align: center;
    font-size: 18px !important;
    letter-spacing: 6px;
    font-weight: bold;
}

/* Checkbox Blocks Layout */
.status-settings-box {
    background-color: #fafafa;
    border: 1px dashed var(--border-color);
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 0px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
}

    .checkbox-row:last-child {
        margin-bottom: 0;
    }

    .checkbox-row input[type="checkbox"] {
        margin: 0 8px 0 0;
        cursor: pointer;
    }

    .checkbox-row label {
        margin-bottom: 0;
        cursor: pointer;
        font-weight: normal;
    }

/* Password Toggle Visibility Framework */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.btn-toggle-pwd {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    color: var(--secondary-gray);
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
}

.btn-toggle-pwd-large {
    right: 10px;
    font-size: 13px;
    font-weight: 600;
    padding: 4px;
}

/* ==========================================================================
   5. BUTTONS & NAVIGATION LINKS
   ========================================================================== */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.mfa-container .button-group {
    margin-top: 0px;
}

/* Generic Layout Rules for Buttons */
button,
.btn-action {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-action {
    flex: 1;
}

/* Global Form Primary Submission Buttons */
button.btn-submit {
    width: 100%;
    padding: 10px; /* Increased from 8px */
    border: none;
    border-radius: 5px; /* Scaled upward slightly from 4px */
    font-weight: bold;
    font-size: 16px; /* Increased from 13px */
    background-color: var(--primary-blue);
    color: white;
    cursor: pointer;
}

button.btn-login {
    width: 100%;
    padding: 10px; /* Increased from 8px */
    border: none;
    border-radius: 5px; /* Scaled upward slightly from 4px */
    font-weight: bold;
    font-size: 16px; /* Increased from 13px */
    background-color: var(--primary-blue);
    color: white;
    cursor: pointer;
}

.recovery-container button.btn-submit {
    font-weight: 400;
}

/* Layout Color Variables & Hover Modifications */
button.btn-submit.btn-success {
    background-color: #28a745;
}

button.btn-login-large {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    background-color: var(--primary-blue);
    color: white;
}

.btn-group-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100%;
}

/* 2. Force the buttons to shrink to their content size */
.btn-create,
.btn-update,
.btn-generate {
    align-items: center;
    justify-content: center;
    width: auto !important;
    max-width: max-content !important;
    display: inline-block !important;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    background-color: var(--primary-blue, #007bff);
    color: white;
    box-sizing: border-box;
    text-decoration: none !important;
    white-space: nowrap; 
    transition: background-color 0.15s ease-in-out;
}
btn-generate {
    padding: 10px !important;
    font-size: 16px !important;
}
.btn-create:hover,
.btn-return:hover {
    background-color: #004085;
}
.btn-create1,
.btn-update1{
    align-items: center;
    justify-content: center;
    width: 100%;
    display: inline-block !important;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    background-color: var(--primary-blue, #007bff);
    color: white;
    box-sizing: border-box;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color 0.15s ease-in-out;
}
.btn-create1:hover {
    background-color: #004085;
}

.btn-validate {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important; /* Forces button to look small and compact */
    max-width: max-content !important;
    text-decoration: none !important;
    padding: 10px; /* Increased from 8px */
    border: none;
    border-radius: 5px; /* Scaled upward slightly from 4px */
    font-weight: bold;
    font-size: 16px; /* Increased from 13px */
    cursor: pointer;
    background-color: #28a745;
    color: white;
}

.btn-cancel {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important; /* Forces button to look small and compact */
    max-width: max-content !important;
    text-decoration: none !important;
    padding: 10px; /* Increased from 8px */
    border: none;
    border-radius: 5px; /* Scaled upward slightly from 4px */
    font-weight: bold;
    font-size: 16px; /* Increased from 13px */
    cursor: pointer;
    background-color: var(--secondary-gray);
    color: white;
}
.btn-cancel1 {
    align-items: center;
    justify-content: center;
    width: 100%;
    display: inline-block !important;
    max-width: max-content !important;
    text-decoration: none !important;
    cursor: pointer;
    background-color: var(--secondary-gray);
    color: white;
    box-sizing: border-box;
    white-space: nowrap;
    transition: background-color 0.15s ease-in-out;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
}
.btn-edit {
    display: inline-block;
    text-decoration: none;
    background-color: white;
    color: var(--secondary-gray);
    padding: 2px 8px;
    border: 1px solid var(--border-color);
    font-size: 11px;
    border-radius: 5px; /* Scaled upward slightly from 4px */
}

    .btn-edit:hover {
        color: var(--primary-blue);
        border-color: var(--primary-blue);
        background-color: #f8f9fa;
    }

.btn-return {
    display: inline-block;
    text-decoration: none;
    background-color: var(--primary-blue);
    color: white;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: bold;
    transition: background-color 0.15s;
    border-radius: 5px; /* Scaled upward slightly from 4px */
}

/* Universal Input Disabled States Overrides */
button:disabled,
button.btn-submit:disabled,
button.btn-login:disabled {
    background-color: #d6d6d6 !important;
    border-color: #d6d6d6 !important;
    color: #888 !important;
    cursor: not-allowed;
    opacity: 0.7;
    border-radius: 5px; /* Scaled upward slightly from 4px */
}

/* Contextual Anchor Block Hyperlinks Formatting */
.links-section {
    margin-top: 0px;
    text-align: center;
}

    .links-section a {
        font-size: 14px;
        color: var(--secondary-gray);
        text-decoration: none;
    }

        .links-section a:hover {
            color: var(--primary-blue);
            text-decoration: underline;
        }

/* ==========================================================================
   6. DATAGRIDS & REPORT VIEWER TABLES
   ========================================================================== */
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 0px !important;
}

    table th,
    table td {
        text-align: left !important;
        padding: 8px 6px !important;
        font-size: 12px !important;
        border-bottom: 1px solid var(--border-color) !important;
    }

    table th {
        background-color: #f2f2f2 !important;
        color: #333 !important;
        font-weight: bold;
    }

    table tbody tr:hover {
        background-color: #fcfcfc;
    }

.reportViewer {
    margin-top: 15px;
}

/* ==========================================================================
   7. CHIPS, ALERT BANNERS, & APP STATUS BADGES
   ========================================================================== */
/* Small Status Badges */
.status-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

    .status-tag.admin {
        background-color: #fce8e6;
        color: var(--error-red);
    }

    .status-tag.standard {
        background-color: #e9ecef;
        color: var(--secondary-gray);
    }

/* Contextual Alert callouts block formatting */
.info-section {
    background-color: #e7f3ff;
    border-left: 5px solid var(--primary-blue);
    padding: 10px 10px 1px 10px;
    margin-bottom: 0px;
    border-radius: 2px;
    font-size: 12px;
    color: #333;
}

.mfa-container .info-section {
    margin-bottom: 25px;
    padding: 10px;
    text-align: center;
}

.recovery-container .info-section {
    padding: 10px;
}

.info-section h6 {
    margin-top: 0;
    margin-bottom: 5px;
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 12px;
}

.info-section p {
    margin: 0 0 0px 0;
}

/* System Exception Display Units */
.error-section {
    margin-top: 10px;
}

    .error-section h6 {
        color: var(--primary-blue);
        margin-top: 0px;
    }

.error-text {
    color: var(--error-red) !important;
    font-size: 12px;
    margin-bottom: 15px;
}

/* Component Level Context-Aware Block error fields definitions */
.mfa-container .error-text {
    background-color: #fff5f5;
    border: 1px solid #fcbfbf;
    padding: 8px;
    border-radius: 4px;
}

.error-text-large {
    font-size: 14px;
    margin-bottom: 18px;
    background-color: #fff5f5;
    border: 1px solid #fcbfbf;
    padding: 10px;
    border-radius: 5px;
}

.alert {
    padding: 5px !important;
}

/* Text Level Colors & Flags */
.text-danger-label {
    color: var(--error-red);
    font-weight: bold !important;
}

.flag-active {
    color: #28a745;
    font-weight: bold;
}

.flag-pending {
    color: #fd7e14;
    font-weight: bold;
}

.flag-locked {
    color: var(--error-red);
    font-weight: bold;
}

/* Tag Token Cloud Component */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    min-height: 30px;
    padding: 5px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    background: #fafafa;
}

.tag {
    background: var(--primary-blue);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    font-size: 12px;
}

    .tag .remove-btn {
        margin-left: 8px;
        cursor: pointer;
        font-weight: bold;
        font-size: 14px;
        margin-top: -2px;
        color: lightcoral;
    }

/* Authenticator Setup QR Components Box */
.qr-zone {
    background: #ffffff;
    border: 1px dashed var(--border-color);
    padding: 10px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

#qrcode {
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.manual-key-text {
    font-size: 12px;
    color: var(--secondary-gray);
    text-align: center;
    margin-top: 10px;
}

    .manual-key-text code {
        background-color: #f1f3f5;
        color: var(--primary-blue);
        padding: 2px 6px;
        border-radius: 4px;
        font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 12px;
        font-weight: bold;
    }
