/* ==========================================================================
   DigiBenefit - Corporate Login Stylesheet (Apple Minimalist Edition)
   No Gradients • Refined Typography • Clean Solid Accents
   ========================================================================== */

/* Clean Browser Scrollbar Suppression */
html,
body,
:root {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
:root::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

:root {
    --ut-primary: #f97316;
    --ut-primary-hover: #ea580c;
    --ut-primary-active: #c2410c;
    --ut-primary-light: #fff7ed;
    --ut-primary-focus: rgba(249, 115, 22, 0.16);

    --bg-dark: #0f172a;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;

    --border-color: #e2e8f0;
    --border-focus: #f97316;
    --ut-shadow: 0 2px 8px rgba(249, 115, 22, 0.25);
    --ut-shadow-hover: 0 4px 14px rgba(249, 115, 22, 0.35);
    --ut-shadow-active: 0 1px 4px rgba(249, 115, 22, 0.2);
    --card-bg: #ffffff;
    --input-bg: #f8fafc;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --login-overlay-opacity: 0.65;
    --login-overlay-blur: 8px;
}

[data-theme="blue"] {
    --ut-primary: #2563eb;
    --ut-primary-hover: #1d4ed8;
    --ut-primary-active: #1e40af;
    --ut-primary-light: #eff6ff;
    --ut-primary-focus: rgba(37, 99, 235, 0.16);
    --border-focus: #2563eb;
    --ut-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    --ut-shadow-hover: 0 4px 14px rgba(37, 99, 235, 0.35);
    --ut-shadow-active: 0 1px 4px rgba(37, 99, 235, 0.2);
}

[data-theme="purple"] {
    --ut-primary: #7c3aed;
    --ut-primary-hover: #6d28d9;
    --ut-primary-active: #5b21b6;
    --ut-primary-light: #f5f3ff;
    --ut-primary-focus: rgba(124, 58, 237, 0.16);
    --border-focus: #7c3aed;
    --ut-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
    --ut-shadow-hover: 0 4px 14px rgba(124, 58, 237, 0.35);
    --ut-shadow-active: 0 1px 4px rgba(124, 58, 237, 0.2);
}

[data-theme="bw"] {
    --ut-primary: #0f172a;
    --ut-primary-hover: #1e293b;
    --ut-primary-active: #020617;
    --ut-primary-light: #f1f5f9;
    --ut-primary-focus: rgba(15, 23, 42, 0.14);
    --border-focus: #0f172a;
    --ut-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
    --ut-shadow-hover: 0 4px 14px rgba(15, 23, 42, 0.3);
    --ut-shadow-active: 0 1px 4px rgba(15, 23, 42, 0.18);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-dark);
}

/* Page Layout Wrapper with Mining Background */
.page-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-image: url('../images/bg/ut_bg.jpg'), url('../images/ut_bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-x: hidden;
}

/* Elegant Dark Blur Overlay (Solid Alpha, No Harsh Gradient) */
.page-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, var(--login-overlay-opacity, 0.65));
    backdrop-filter: blur(var(--login-overlay-blur, 8px));
    -webkit-backdrop-filter: blur(var(--login-overlay-blur, 8px));
    z-index: 1;
}

/* Top Navbar */
.top-navbar {
    position: relative;
    z-index: 10;
    padding: 24px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.corp-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    transition: all 0.2s ease;
}

.corp-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.ut-logo {
    height: 30px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
}

/* Main Container */
.main-container {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    flex: 1;
}

/* Clean White Card (Minimalist Apple Aesthetic) */
.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border-radius: var(--radius-xl, 24px);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.15);
    overflow: hidden;
    animation: cardFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Card Header: Clean, Solid, No Gradient */
.card-header-ut {
    background: #ffffff;
    padding: 28px 32px 16px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.login-brand-icon-wrap {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.09);
    background: #ffffff;
}

.login-brand-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
    display: block;
}

.card-header-ut h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text-main);
    line-height: 1.25;
}

.card-header-ut p {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0;
}

/* Card Body */
.card-body-ut {
    padding: 28px 32px 34px;
}

/* Login Alerts */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.45;
    animation: alertSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes alertSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-alert .alert-icon {
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-alert .alert-content {
    flex: 1;
}

.login-alert .alert-content strong {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.login-alert .alert-content p {
    margin: 0;
    font-weight: 400;
}

.login-alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.login-alert-danger .alert-icon {
    color: #dc2626;
}

.timer-badge {
    display: inline-block;
    background: #dc2626;
    color: #ffffff;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.5px;
    margin: 0 2px;
}

.login-alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.login-alert-warning .alert-icon {
    color: #d97706;
}

/* Form Groups & Inputs */
.input-group-custom {
    margin-bottom: 18px;
}

.input-group-custom label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 7px;
}

.field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.field-icon-left {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.field-input {
    width: 100%;
    height: 46px;
    padding: 10px 44px 10px 42px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.2s ease;
}

.field-input::placeholder {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 400;
}

.field-input:focus {
    background: #ffffff;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--ut-primary-focus);
}

.field-wrapper:focus-within .field-icon-left {
    color: var(--ut-primary);
}

.field-toggle-eye {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    outline: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    border-radius: 6px;
}

.field-toggle-eye:hover {
    color: #475569;
}

/* Utility Row (Remember Me) */
.utility-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -2px;
    margin-bottom: 24px;
    font-size: 13px;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #64748b;
    font-weight: 400;
    user-select: none;
}

.remember-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ut-primary);
    cursor: pointer;
    border-radius: 4px;
    margin: 0;
}

/* Call To Action Button (Clean Solid, No Caps, No Bold, No Gradient) */
.btn-ut-primary {
    width: 100%;
    height: 46px;
    background: var(--ut-primary);
    border: none;
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--ut-shadow);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

.btn-ut-primary:hover {
    background: var(--ut-primary-hover);
    box-shadow: var(--ut-shadow-hover);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-ut-primary:active {
    background: var(--ut-primary-active);
    transform: translateY(0);
    box-shadow: var(--ut-shadow-active);
}

.btn-ut-primary:disabled,
.btn-ut-primary.btn-disabled {
    background: #cbd5e1 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.field-input:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

.field-toggle-eye:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.remember-checkbox.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Footer */
.page-footer {
    position: relative;
    z-index: 10;
    padding: 20px 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* Responsive Breakpoints */
@media (max-width: 480px) {
    .top-navbar {
        padding: 18px 20px;
    }
    .login-card {
        max-width: 100%;
        border-radius: var(--radius-lg);
    }
    .card-header-ut {
        padding: 28px 22px 16px;
    }
    .card-header-ut h2 {
        font-size: 21px;
    }
    .card-body-ut {
        padding: 22px 22px 28px;
    }
}
