@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
@import url('./icons.css');

* {
    box-sizing: border-box;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    margin: 0;
}

body {
    background-image: url("/images/pages/background.png");
    background-color: #cccccc;
}

.main-content {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.block-content {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    height: auto;
    max-width: 100%;
    width: 31.25rem;
}

.form-card {
    background: #F0FAFA;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 10px 5px 5px silver;
    position: relative;
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
}

    .title.title-secondary {
        padding: 0.313rem 0 0;
        color: var(--dxds-color-content-secondary-default-rest);
    }

.title-header-text {
    font-size: var(--dxds-font-size-headline-lg);
    font-weight: var(--dxds-font-weight-headline-default);
    letter-spacing: var(--dxds-letter-spacing-headline-lg);
    line-height: var(--dxds-line-height-headline-lg);
}

.title-content-text {
    font-size: var(--dxds-font-size-base-lg);
    font-weight: var(--dxds-font-weight-base-default);
    letter-spacing: var(--dxds-letter-spacing-base-lg);
    line-height: var(--dxds-line-height-base-lg);
}

.title-content-text-secondary {
    font-size: var(--dxds-font-size-title-md);
    line-height: var(--dxds-line-height-title-md);
    border-bottom: 1px solid gray;
}

hr.fancy-line {
    border: 0;
    height: 2px;
    position: relative;
    margin: 0 0 4px;
    opacity: 0.95;
}

    hr.fancy-line:before {
        top: -0.5em;
        height: 1em;
    }

    hr.fancy-line:after {
        content: '';
        height: 0.5em;
        top: 1px;
    }

    hr.fancy-line:before, hr.fancy-line:after {
        content: '';
        position: absolute;
        width: 100%;
    }

    hr.fancy-line, hr.fancy-line:before {
        background: -moz-radial-gradient(center, ellipse cover, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 75%);
        background: -webkit-radial-gradient(center, ellipse cover, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 75%);
        background: radial-gradient(ellipse at center, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 75%);
    }

.menu-item-active {
    background-color: rgba(0, 0, 0.9, 0.9); /* Or your preferred highlight */
    border-left: 4px solid #007bff;
}

.highlighted-date {
    background-color: #F54927;
    color: #09073d;
    font-weight: bold;
}

.dxbl-grid-table thead {
    background-color: #B3BAD6 !important; /* Replace with your color */
    color: black !important; /* Optional: change text color */
}

/* Target the even rows within the DevExpress Grid table body */
.my-zebra-grid .dxbl-grid-table > tbody > tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.04); /* Very light gray */
}

/* Optional: Add a hover effect for better readability */
.my-zebra-grid .dxbl-grid-table > tbody > tr:hover {
    background-color: rgba(0, 120, 215, 0.08);
}

/* Base style for all tabs */
/* 1. Target the component using its class to set theme variables */
.custom-tabs {
    --dxbl-tabs-item-active-border-color: #007bff;
    --dxbl-tabs-item-active-border-width: 3px;
    --dxbl-tabs-item-active-color: #007bff;
    --dxbl-tabs-item-color: #6c757d;
    --dxbl-tabs-item-hover-bg: #f8f9fa;
    border-bottom: 1px solid #dee2e6 !important;
}

    /* 2. Target the specific "Part" inside the Shadow DOM */
    /* Modern DevExpress components expose parts for styling */
    .custom-tabs dxbl-tab-item::part(button) {
        padding: 12px 20px;
        transition: all 0.2s ease;
    }

    /* 3. Re-create the indicator bar using a selector that works with shadow elements */
    .custom-tabs .dxbl-active {
        position: relative;
    }

    /* We target the dxbl-tab-item directly since it's the custom element */
    .custom-tabs dxbl-tab-item.dxbl-active {
        border-bottom: 3px solid #007bff !important;
        margin-bottom: -1px; /* Overlaps the container border */
    }

    /* 4. Fix the icon alignment since it's "slotted" into the shadow DOM */
    .custom-tabs .d-flex {
        display: flex !important;
        align-items: center !important;
        height: 100%;
    }

    .custom-tabs dxbl-tab-item {
        transition: background-color 0.2s ease, color 0.2s ease;
        cursor: pointer;
        border: 1px solid #F5F5F5;
        margin-right: 0.4rem;
        margin-bottom: 0.6rem;
    }

        .custom-tabs dxbl-tab-item:hover:not(.dxbl-active) {
            background-color: #D5DBE1 !important;
            color: #343a40 !important;
        }

.required-label::after {
    content: " *";
    color: red;
    font-weight: bold;
}

.grad-header {
    background: radial-gradient(circle at center, #FFD2B8 0%, #FFE6E6 75%, #FFB8B8 100%) !important;
}

.dark-red {
    color: #641e16 !important;
}

.dark-blue {
    color: #000080 !important;
}


/*  =====================================================================  */
/*  Login Form */
/*  =====================================================================  */
.login-container {
    width: 100%;
    max-width: 400px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.login-card {
    background: #22363B;
    border: 1px solid #2a2a35;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 10px 5px 5px silver;
    position: relative;
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .login-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, #00ff88, transparent);
        opacity: 0;
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .login-card:hover::before {
        opacity: 1;
    }

    .login-card:hover {
        box-shadow: 10px 5px 5px silver;
        transform: translateY(-2px);
    }

.login-header {
    text-align: center;
    margin-bottom: 4px;
}

.logo-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #00ff88, #0099ff);
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.3));
    animation: pulse 2s ease-in-out infinite alternate;
}

.login-header h2 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-header p {
    color: #a0a0b0;
    font-size: 16px;
    font-weight: 400;
}

/* Form Group & Input Styles */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.input-wrapper {
    position: relative;
    margin-bottom: 14px;
}

    .input-wrapper input {
        width: 100%;
        background: #1a1a25;
        border: 1px solid #2a2a35;
        border-radius: 6px;
        padding: 16px 16px;
        color: #ffffff;
        font-size: 16px;
        font-weight: 400;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        outline: none;
    }

        .input-wrapper input:focus {
            border-color: #00ff88;
            background: rgba(26, 26, 37, 0.8);
            box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1), 0 4px 20px rgba(0, 255, 136, 0.1);
        }

            .input-wrapper input:focus + label,
            .input-wrapper input:valid + label {
                transform: translateY(-32px) translateX(4px) scale(0.85);
                color: #00ff88;
                font-weight: 500;
            }

    .input-wrapper label {
        position: absolute;
        left: 16px;
        top: 28px;
        color: #a0a0b0;
        font-size: 16px;
        font-weight: 400;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
        transform-origin: left top;
    }

.input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ff88, #0099ff);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}

.input-wrapper input:focus ~ .input-line {
    width: 100%;
}

/* Password Toggle */
.password-wrapper input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #a0a0b0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
}

    .password-toggle:hover {
        color: #00ff88;
        background: rgba(0, 255, 136, 0.1);
    }

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.remember-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

    .remember-wrapper input[type="checkbox"] {
        display: none;
    }

.custom-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid #2a2a35;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

    .custom-checkbox::after {
        content: '';
        width: 8px;
        height: 8px;
        background: #00ff88;
        border-radius: 1px;
        transform: scale(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

.remember-wrapper input[type="checkbox"]:checked ~ .checkbox-label .custom-checkbox {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

    .remember-wrapper input[type="checkbox"]:checked ~ .checkbox-label .custom-checkbox::after {
        transform: scale(1);
    }

.checkbox-label {
    color: #a0a0b0;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.remember-wrapper:hover .checkbox-label {
    color: #ffffff;
}

.forgot-password {
    color: #a0a0b0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

    .forgot-password:hover {
        color: #00ff88;
    }

/* Neon Button */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #00ff88, #0099ff);
    border: none;
    border-radius: 6px;
    padding: 14px 32px;
    color: #0a0a0f;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3), 0 0 40px rgba(0, 255, 136, 0.2);
}

    .login-btn:hover .btn-glow {
        left: 100%;
    }

.login-btn:active {
    transform: translateY(0);
}

/* Loading State */
.login-btn.loading {
    pointer-events: none;
}

.btn-text {
    transition: opacity 0.3s ease;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #0a0a0f;
    border-radius: 50%;
    opacity: 0;
    animation: spin 1s linear infinite;
    transition: opacity 0.3s ease;
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-loader {
    opacity: 1;
}

/* Divider */
.divider {
    text-align: center;
    margin: 32px 0 24px;
    position: relative;
}

    .divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, #2a2a35, transparent);
        transform: translateY(-50%);
    }

    .divider span {
        background: #151520;
        color: #a0a0b0;
        padding: 0 24px;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        position: relative;
        z-index: 1;
    }

/* Signup Link */
.signup-link {
    text-align: center;
}

    .signup-link p {
        color: #a0a0b0;
        font-size: 14px;
    }

    .signup-link a {
        color: #00ff88;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

        .signup-link a:hover {
            color: #0099ff;
            text-shadow: 0 0 10px rgba(0, 153, 255, 0.5);
        }

/* Error States */
.is-invalid-border {
    border: 1px solid #dc3545 !important;
    border-radius: 4px;
}

.error-message {
    color: #ff0080;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    margin-left: 4px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 0, 128, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 0, 128, 0.2);
}

    .error-message.show {
        opacity: 1;
        transform: translateY(0);
    }

.form-group.error .input-wrapper input {
    border-color: #ff0080;
    background: rgba(255, 0, 128, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 0, 128, 0.1);
    animation: shake 0.5s ease-in-out;
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 40px 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

    .success-message.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

.success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00ff88, #0099ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #0a0a0f;
    margin: 0 auto 24px;
    animation: successPulse 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.success-message h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.success-message p {
    color: #a0a0b0;
    font-size: 16px;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.1), transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.glow-orb-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -10%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.08), transparent 70%);
    animation-delay: 0s;
}

.glow-orb-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: -5%;
    background: radial-gradient(circle, rgba(0, 153, 255, 0.06), transparent 70%);
    animation-delay: -2s;
}

.glow-orb-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 10%;
    background: radial-gradient(circle, rgba(255, 0, 128, 0.04), transparent 70%);
    animation-delay: -4s;
}

/* Animations */
@keyframes pulse {
    from {
        filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.3));
    }

    to {
        filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.6));
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }

    33% {
        transform: translateY(-20px) translateX(10px);
    }

    66% {
        transform: translateY(10px) translateX(-10px);
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes successPulse {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}


/*  =====================================================================  */
/*  MainLayout */
/*  =====================================================================  */
.logo {
    display: block;
    width: 100%;
    max-width: 180px;
    height: auto !important;
    max-height: 60px;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 2px;
}

.navigation-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px; /* Adjust as needed */
    min-height: 80px; /* Ensures the header doesn't collapse */
}

.drawer-content {
    padding: 2px !important;
}

.page-content-container {
    width: 100% !important;
    height: auto !important;
    min-height: unset !important;
    overflow: visible;
    margin-top: 2px;
    padding: 6px 0 6px 6px;
}

.page-container {
    display: flex;
    flex-direction: column;
    background-color: #F2F2EB;
    border-radius: 4px;
    /* FIX: Force the background to cover the entire length of the content */
    min-height: 100vh;
    height: 100%;
    width: 100%;
}

.page-container-plant {
    background-image: radial-gradient(circle, #5C0067 0%, #001EFF 100%);
}

/* Add this to your site.css or a <style> block */
.flex-constrained {
    min-width: 0 !important;
    display: flex !important; /* Ensure it stays a flex item */
}

.custom-group-caption {
    color: #12003B;
    font-size: 1.5rem;
    font-weight: bold;
}

.company-name {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(90deg, #416589, #b77d34); /* Branded gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Subtle shadow */
    transition: all 0.3s ease;
}

    .company-name:hover {
        opacity: 0.8; /* Subtle hover effect */
    }

.blink {
    color: #F52727;
    /* Apply the animation */
    animation: blink-animation 2s steps(1, start) infinite;
}

@keyframes blink-animation {
    50% {
        opacity: 0;
    }
}

.shadow-inset {
    background: #eef7ff;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.card-adp-3d {
    max-width: 635px;
    background: linear-gradient(135deg, #D7FCF7, #E8F4FF);
    align-items: center;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1), 0 6px 6px rgba(0,0,0,0.05);
}


/*
    =====================================================================
*/
/* Mobile Portrait, Mobile Landscape, Tablet Portrait */
@media (max-width: 768px) {
    .display-desktop {
        display: none;
    }

    .display-mobile {
        display: block;
    }

    .card-adp-3d {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Mobile Tablet Landscape */
@media (min-width: 769px) and (max-width: 1199px) {
    .display-desktop {
        display: none;
    }

    .display-mobile {
        display: block;
    }

    .card-adp-3d {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Desktop Monitors */
@media (min-width: 1200px) {
    .display-desktop {
        display: block;
    }

    .display-mobile {
        display: none;
    }

    .page-container {
        height: calc(100vh - 56px);
        overflow-y: auto;
    }

    .page-container-alarms {
        height: calc(100vh - 280px);
        overflow-y: auto;
    }

    /* Prevents the Flexbox container from growing wider than the screen */
    .main-wrapper {
        overflow-x: hidden;
        max-width: 100%;
    }

    /* Forces DxGrid to stay inside its parent bounds */
    .dxbs-grid {
        max-width: 100% !important;
    }

    .custom-wide-popup {
        min-width: 800px !important;
        max-width: 1200px !important;
        width: 90vw; /* Takes up 90% of screen width on smaller desktops */
    }

        /* Ensure the content inside doesn't cause a scrollbar on the white popup area */
        .custom-wide-popup .dxbl-popup-content {
            padding: 1rem;
            overflow-x: hidden;
        }

    /* Force the internal form to be tall enough to hold the dropdown */
    .custom-wide-editform {
        overflow: visible !important;
        width: 100%;
        min-width: 800px;
        min-height: 250px; /* Add enough height to accommodate the 300px dropdown */
        padding-bottom: 50px !important; /* Creates a buffer at the bottom */
    }

    .custom-standard-popup {
        min-width: 200px !important;
    }

        /* Ensure the content inside doesn't cause a scrollbar on the white popup area */
        .custom-standard-popup .dxbl-popup-content {
            padding: 1rem;
            overflow-x: hidden;
        }

    .custom-standard-editform {
        overflow: visible !important;
        width: 100%;
        min-width: 200px;
        min-height: 250px; /* Add enough height to accommodate the 300px dropdown */
        padding-bottom: 20px !important; /* Creates a buffer at the bottom */
    }
}
