/**
 * Secyre auth pages (login, forgot password, reset password)
 * Works with html[data-theme="light|dark"] + public/js/theme.js
 */

:root,
html[data-theme="light"] {
    --auth-bg: #f4f6f9;
    --auth-card-bg: #ffffff;
    --auth-text: #182e49;
    --auth-text-muted: #6b7280;
    --auth-label: #182e49;
    --auth-input-bg: #ffffff;
    --auth-input-border: #ced4da;
    --auth-input-text: #192b43;
    --auth-nav-bg: #ffffff;
    --auth-nav-border: #e5e7eb;
    --auth-brand: #b91c1c;
    --auth-link: #b91c1c;
    
    /* Premium Redesign Tokens */
    --auth-premium-bg: #f8f9fa;
    --auth-premium-text: #182e49;
    --auth-premium-text-muted: #6b7280;
    --auth-premium-card-bg: #ffffff;
    --auth-premium-card-border: rgba(0, 0, 0, 0.08);
    --auth-premium-input-bg: #ffffff;
    --auth-premium-input-border: #ced4da;
    --auth-premium-input-text: #192b43;
    --auth-premium-input-placeholder: #a39999;
    --auth-premium-eye-toggle: #887a7a;
    --auth-premium-checkbox-border: rgba(0, 0, 0, 0.15);
    --auth-premium-btn-sec-bg: #f4f6f9;
    --auth-premium-btn-sec-border: #ced4da;
    --auth-premium-btn-sec-text: #182e49;
    --auth-premium-btn-sec-hover: #e9ecef;
    --auth-premium-glass-card-bg: #ffffff;
    --auth-premium-glass-card-border: rgba(0, 0, 0, 0.06);
    --auth-premium-req-color: #635757;
    --auth-premium-req-border: #635757;
    --auth-premium-req-bg: transparent;
    --auth-premium-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

html[data-theme="dark"] {
    --auth-bg: #1a1313;
    --auth-card-bg: #261c1c;
    --auth-text: #ffffff;
    --auth-text-muted: #b8b8b8;
    --auth-label: rgba(255, 255, 255, 0.92);
    --auth-input-bg: #1f1717;
    --auth-input-border: #3a2a2a;
    --auth-input-text: #ffffff;
    --auth-nav-bg: #261c1c;
    --auth-nav-border: #3a2a2a;
    --auth-brand: #f63c4c;
    --auth-link: #ff6b7a;
    --auth-show-icon: #182e49;

    /* Premium Redesign Tokens */
    --auth-premium-bg: radial-gradient(circle at center, #1a0d0d 0%, #120a0a 100%);
    --auth-premium-text: #ffffff;
    --auth-premium-text-muted: #a39999;
    --auth-premium-card-bg: transparent;
    --auth-premium-card-border: rgba(255, 255, 255, 0.05);
    --auth-premium-input-bg: rgba(255, 255, 255, 0.03);
    --auth-premium-input-border: rgba(255, 255, 255, 0.08);
    --auth-premium-input-text: #ffffff;
    --auth-premium-input-placeholder: #5a5050;
    --auth-premium-eye-toggle: #635757;
    --auth-premium-checkbox-border: rgba(255, 255, 255, 0.2);
    --auth-premium-btn-sec-bg: rgba(255, 255, 255, 0.04);
    --auth-premium-btn-sec-border: rgba(255, 255, 255, 0.08);
    --auth-premium-btn-sec-text: #ffffff;
    --auth-premium-btn-sec-hover: rgba(255, 255, 255, 0.08);
    --auth-premium-glass-card-bg: rgba(0, 0, 0, 0.15);
    --auth-premium-glass-card-border: rgba(255, 255, 255, 0.05);
    --auth-premium-req-color: #635757;
    --auth-premium-req-border: #635757;
    --auth-premium-req-bg: transparent;
    --auth-premium-shadow: none;
}

/* Page shell */
html[data-theme="light"] body,
html[data-theme="dark"] body {
    /* background: var(--auth-bg) !important; */
    color: var(--auth-text);
    min-height: 100vh;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Theme toggle – top right */
.auth-theme-toggle-wrap {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1050;
}

.auth-theme-toggle {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-input-border);
    color: var(--auth-text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.auth-theme-toggle:hover,
.auth-theme-toggle:focus {
    color: var(--auth-brand);
    border-color: var(--auth-brand);
    outline: none;
}

.auth-theme-toggle:hover .fa,
.auth-theme-toggle:focus .fa,
.auth-theme-toggle:hover .theme-icon-dark,
.auth-theme-toggle:focus .theme-icon-dark,
.auth-theme-toggle:hover .theme-icon-light,
.auth-theme-toggle:focus .theme-icon-light {
    color: var(--auth-brand);
}

.auth-theme-toggle .theme-icon-dark,
.auth-theme-toggle .theme-icon-light {
    display: none;
}

html[data-theme="light"] .auth-theme-toggle .theme-icon-dark {
    display: inline-block;
}

html[data-theme="dark"] .auth-theme-toggle .theme-icon-light {
    display: inline-block;
}

/* Navbar (customer login header) */
html[data-theme="dark"] .navbar.bg-white,
html[data-theme="dark"] nav.navbar-default.bg-white {
    background-color: var(--auth-nav-bg) !important;
    border-color: var(--auth-nav-border) !important;
}

html[data-theme="light"] nav.navbar-default {
    background-color: var(--auth-nav-bg) !important;
    border-color: var(--auth-nav-border) !important;
}

/* Form area */
.formbg h2 {
    color: var(--auth-brand) !important;
}

html[data-theme="light"] .formbg p {
    color: var(--auth-text-muted) !important;
}

html[data-theme="dark"] .formbg p {
    color: var(--auth-text-muted) !important;
}

.formbg .form-control {
    background-color: var(--auth-input-bg) !important;
    border-color: var(--auth-input-border) !important;
    color: var(--auth-input-text) !important;
}

.formbg .form-control::placeholder {
    color: var(--auth-text-muted);
    opacity: 0.8;
}

.formbg .btn-link.text-danger,
.formbg .forgot-text {
    color: var(--auth-link) !important;
}

.formbg .alert-success {
    background-color: rgba(0, 166, 90, 0.15);
    border-color: #00a65a;
    color: var(--auth-text);
}

html[data-theme="dark"] .formbg .alert-info {
    background-color: rgba(0, 166, 90, 0.2);
    border-color: #00a65a;
    color: #fff;
}

.formbg .text-danger,
.formbg .invalid-feedback,
.formbg .help-block strong {
    color: #ff6b7a !important;
}

/* Admin login – no top nav */
html[data-theme="dark"] .formbg.mt-100 {
    color: var(--auth-text);
}

html[data-theme="light"] .formbg.mt-100 h2 + p,
html[data-theme="light"] .formbg .panel-body {
    color: var(--auth-text);
}

/* Override public/assets/css/style.css fixed navy body + white labels */
/* html[data-theme="light"] body {
    background: var(--auth-bg) !important;
} */

html[data-theme="dark"] body {
    background: var(--auth-bg) !important;
}

/* html[data-theme="light"] .formbg label,
html[data-theme="light"] .formbg .control-label,
html[data-theme="light"] .formbg .checkbox label {
    color: var(--auth-label) !important;
} */

html[data-theme="dark"] .formbg .checkbox label,
html[data-theme="dark"] .formbg .forgot-text {
    color: var(--auth-label) !important;
}

html[data-theme="dark"] .toggle-password {
    color: var(--auth-premium-text-muted);
}

/* Admin login welcome text */
html[data-theme="dark"] .formbg.mt-100 > p {
    color: var(--auth-text-muted) !important;
}

html[data-theme="light"] .formbg.mt-100 > p {
    color: var(--auth-text-muted) !important;
}

html[data-theme="dark"] .formbg .text-center .navbar-brand img {
    filter: brightness(1.05);
}

html[data-theme="light"] .formbg .text-center .navbar-brand img {
    filter: none;
}

/* ==========================================
 * REDESIGN DESIGN SYSTEM - PREMIUM THEMED REDESIGN
 * ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@600;700;800&display=swap');

/* Apply font-family and modern rendering to the redesign pages */
.secyre-premium-body {
    background: var(--auth-premium-bg) !important;
    font-family: 'Inter', sans-serif !important;
    color: var(--auth-premium-text) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    transition: background 0.2s ease, color 0.2s ease;
}

/* Auth card wrapper */
.secyre-auth-card {
    width: 100%;
    max-width: 420px;
    background: transparent;
    padding: 0;
    margin: 0 auto;
}

/* Brand Text logo styling */
.secyre-brand-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 26px;
    font-weight: 800;
    color: #f63c4c;
    text-align: center;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.secyre-brand-subtitle {
    font-family: 'Inter', sans-serif !important;
    font-size: 32px;
    font-weight: 500;
    color: var(--auth-premium-text);
    text-align: center;
    margin-bottom: 30px;
    transition: color 0.2s ease;
}

/* Custom form styles */
.secyre-form-group {
    margin-bottom: 24px;
    position: relative;
}

.secyre-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-premium-text-muted);
    margin-bottom: 8px;
    text-align: left;
    transition: color 0.2s ease;
}

.secyre-input-container {
    position: relative;
}

.secyre-input {
    width: 100%;
    background: var(--auth-premium-input-bg) !important;
    border: 1px solid var(--auth-premium-input-border) !important;
    border-radius: 6px !important;
    color: var(--auth-premium-input-text) !important;
    padding: 14px 16px !important;
    padding-right: 48px !important; /* spacing for eye icon */
    font-size: 14px !important;
    font-family: 'Inter', sans-serif !important;
    transition: all 0.2s ease !important;
    height: auto !important;
    box-sizing: border-box;
}

.secyre-input::placeholder {
    color: var(--auth-premium-input-placeholder) !important;
}

.secyre-input:focus {
    background: var(--auth-premium-input-bg) !important;
    border-color: #f63c4c !important;
    box-shadow: 0 0 0 3px rgba(246, 60, 76, 0.15) !important;
    outline: none !important;
}

/* Eye toggle for password fields */
.secyre-eye-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--auth-premium-eye-toggle);
    font-size: 18px;
    transition: color 0.2s ease;
    z-index: 10;
}

.secyre-eye-toggle:hover {
    color: #f63c4c;
}

/* Checkbox and links alignment */
.secyre-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.secyre-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-premium-text-muted);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    margin: 0;
    transition: color 0.2s ease;
}

.secyre-checkbox {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--auth-premium-checkbox-border) !important;
    border-radius: 4px;
    background: var(--auth-premium-input-bg);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.secyre-checkbox:checked {
    background-color: #f63c4c;
    border-color: #f63c4c !important;
}

.secyre-checkbox:checked::after {
    content: "\f00c";
    font-family: 'FontAwesome';
    color: #ffffff;
    font-size: 10px;
}

.secyre-forgot-link {
    color: #f63c4c !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.secyre-forgot-link:hover {
    color: #ff6b7a !important;
    text-decoration: none;
}

/* Primary Button styling */
.secyre-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #f63c4c 0%, #d81c2f 100%) !important;
    box-shadow: 0 4px 20px rgba(246, 60, 76, 0.4) !important;
    border: none !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-top: 10px;
}

.secyre-btn-primary:hover {
    box-shadow: 0 6px 24px rgba(246, 60, 76, 0.6) !important;
    transform: translateY(-1px);
}

.secyre-btn-primary:active {
    transform: translateY(0);
}

/* Separator styling */
.secyre-separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--auth-premium-text-muted);
    font-size: 12px;
    margin: 24px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.secyre-separator::before,
.secyre-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--auth-premium-input-border);
}

.secyre-separator:not(:empty)::before {
    margin-right: 15px;
}

.secyre-separator:not(:empty)::after {
    margin-left: 15px;
}

/* Secondary login button */
.secyre-btn-secondary {
    width: 100%;
    background: var(--auth-premium-btn-sec-bg) !important;
    border: 1px solid var(--auth-premium-btn-sec-border) !important;
    border-radius: 6px !important;
    color: var(--auth-premium-btn-sec-text) !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.secyre-btn-secondary:hover {
    background: var(--auth-premium-btn-sec-hover) !important;
    border-color: var(--auth-premium-btn-sec-border) !important;
    color: var(--auth-premium-btn-sec-text) !important;
}

.secyre-btn-secondary svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Dashboard Change Password Styles */
.secyre-dashboard-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-top: 10px;
}

.secyre-back-link {
    font-family: 'Inter', sans-serif;
    color: var(--auth-premium-text) !important;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s, color 0.2s;
}

.secyre-back-link:hover {
    opacity: 0.8;
}

.secyre-back-link i {
    font-size: 14px;
}

.secyre-dashboard-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 32px;
    font-weight: 700;
    color: var(--auth-premium-text) !important;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.secyre-dashboard-subtitle {
    font-family: 'Inter', sans-serif !important;
    font-size: 15px;
    color: var(--auth-premium-text-muted) !important;
    margin-bottom: 30px;
    transition: color 0.2s ease;
}

/* Glassmorphic card container */
.secyre-glass-card {
    background: var(--auth-premium-glass-card-bg) !important;
    border: 1px solid var(--auth-premium-glass-card-border) !important;
    border-radius: 12px !important;
    padding: 36px !important;
    width: 100%;
    max-width: 540px;
    box-shadow: var(--auth-premium-shadow) !important;
    transition: background 0.2s, border 0.2s, box-shadow 0.2s;
}

/* Sub-labels in uppercase */
.secyre-label-uppercase {
    font-family: 'Inter', sans-serif;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    color: var(--auth-premium-text-muted) !important;
    text-transform: uppercase !important;
    margin-bottom: 10px !important;
    transition: color 0.2s ease;
}

/* Password requirement indicators */
.secyre-requirements-row {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.secyre-requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--auth-premium-req-color);
    font-weight: 500;
    transition: color 0.2s ease;
}

.secyre-requirement i {
    font-size: 11px;
    width: 14px;
    height: 14px;
    border: 1px solid var(--auth-premium-req-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.secyre-requirement i::before {
    content: '';
}

.secyre-requirement.valid {
    color: #4ade80;
}

.secyre-requirement.valid i {
    border-color: #4ade80;
    background: #4ade80;
    color: #130707;
}

.secyre-requirement.valid i::before {
    content: "\f00c";
    font-family: 'FontAwesome';
    font-size: 8px;
}

/* Form actions side-by-side */
.secyre-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 36px;
}

.secyre-btn-cancel {
    background: transparent !important;
    border: 1px solid var(--auth-premium-checkbox-border) !important;
    color: var(--auth-premium-text) !important;
    border-radius: 6px !important;
    padding: 12px 28px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.secyre-btn-cancel:hover {
    background: var(--auth-premium-btn-sec-hover) !important;
    border-color: var(--auth-premium-checkbox-border) !important;
    color: var(--auth-premium-text) !important;
    text-decoration: none !important;
}

.secyre-btn-submit {
    background: #f63c4c !important;
    box-shadow: 0 4px 15px rgba(246, 60, 76, 0.3) !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 12px 36px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.secyre-btn-submit:hover {
    box-shadow: 0 6px 20px rgba(246, 60, 76, 0.5) !important;
    transform: translateY(-1px);
}

.secyre-btn-submit:active {
    transform: translateY(0);
}

