/* Diwalido Customer Authentication & Portal Styles */

:root {
    --auth-saffron: #ea580c;
    --auth-saffron-dark: #c2410c;
    --auth-saffron-light: #fff7ed;
    --auth-gold: #f59e0b;
    --auth-border: #fed7aa;
    --auth-text: #1c1917;
    --auth-muted: #78716c;
    --auth-card-bg: #ffffff;
    --auth-shadow: 0 16px 36px -8px rgba(234, 88, 12, 0.12), 0 6px 18px rgba(0, 0, 0, 0.04);
}

.auth-page-section {
    padding: 40px 16px 80px;
    background: linear-gradient(180deg, #fff9f2 0%, #fffbf7 100%);
    min-height: calc(100vh - 280px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.auth-card {
    background: var(--auth-card-bg);
    border-radius: 24px;
    border: 1px solid var(--auth-border);
    box-shadow: var(--auth-shadow);
    padding: 38px 32px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #ea580c, #f59e0b, #ef4444);
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-icon-badge {
    width: 64px;
    height: 64px;
    background: var(--auth-saffron-light);
    border: 2px solid var(--auth-border);
    color: var(--auth-saffron);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 16px;
    box-shadow: 0 6px 14px rgba(234, 88, 12, 0.15);
}

.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 8px;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--auth-muted);
    line-height: 1.5;
    margin: 0;
}

.auth-form-group {
    margin-bottom: 18px;
}

.auth-form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 6px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap i.auth-input-icon {
    position: absolute;
    left: 14px;
    color: var(--auth-muted);
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-input-wrap input {
    width: 100%;
    height: 48px;
    padding: 10px 14px 10px 42px;
    border: 1.5px solid #e7e5e4;
    border-radius: 12px;
    font-size: 0.96rem;
    font-family: inherit;
    color: var(--auth-text);
    background: #ffffff;
    transition: all 0.2s ease;
}

.auth-input-wrap input:focus {
    border-color: var(--auth-saffron);
    outline: none;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.auth-input-wrap input:focus + i.auth-input-icon {
    color: var(--auth-saffron);
}

/* OTP 6-Digit Input Box */
.otp-display-group {
    background: var(--auth-saffron-light);
    border: 1.5px dashed var(--auth-saffron);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    margin: 18px 0;
}

.otp-target-email {
    font-weight: 700;
    color: var(--auth-saffron-dark);
    word-break: break-all;
}

.otp-code-input {
    width: 100% !important;
    height: 56px !important;
    text-align: center !important;
    letter-spacing: 12px !important;
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    font-family: monospace !important;
    padding: 0 !important;
    color: var(--auth-saffron-dark) !important;
    background: #ffffff !important;
    border: 2px solid var(--auth-saffron) !important;
    border-radius: 12px !important;
}

.otp-timer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--auth-muted);
    margin-top: 10px;
}

.otp-resend-btn {
    background: none;
    border: none;
    color: var(--auth-saffron);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.otp-resend-btn:disabled {
    color: #a8a29e;
    cursor: not-allowed;
    text-decoration: none;
}

/* Buttons */
.auth-submit-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
    transition: all 0.2s ease;
}

.auth-submit-btn:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.45);
}

.auth-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.auth-alert-box {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

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

.auth-alert-box.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.auth-alert-box.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.auth-footer-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f5f5f4;
    font-size: 0.92rem;
    color: var(--auth-muted);
}

.auth-footer-links a {
    color: var(--auth-saffron);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.auth-footer-links a:hover {
    color: var(--auth-saffron-dark);
    text-decoration: underline;
}

/* Header User Navigation Pill & Dropdown */
.nav-icons .user-nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-icons button.user-nav-btn,
.nav-icons .user-nav-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
    height: 42px !important;
    min-height: 42px !important;
    background: #fff7ed !important;
    border: 1.5px solid #fed7aa !important;
    color: #c2410c !important;
    padding: 0 16px !important;
    border-radius: 9999px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.1) !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    line-height: normal !important;
}

.nav-icons button.user-nav-btn:hover,
.nav-icons .user-nav-btn:hover {
    background: #ffedd5 !important;
    border-color: #ea580c !important;
    color: #9a3412 !important;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.2) !important;
    transform: none !important;
}

.nav-icons a.user-login-nav-btn,
.nav-icons .user-login-nav-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: auto !important;
    height: 42px !important;
    min-height: 42px !important;
    background: #fff7ed !important;
    border: 1.5px solid #fed7aa !important;
    color: #ea580c !important;
    padding: 0 16px !important;
    border-radius: 9999px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.08) !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    line-height: normal !important;
}

.nav-icons a.user-login-nav-btn:hover,
.nav-icons .user-login-nav-btn:hover {
    background: #ffedd5 !important;
    border-color: #ea580c !important;
    color: #9a3412 !important;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.18) !important;
    transform: none !important;
}

.nav-icons .user-dropdown-menu {
    position: absolute !important;
    right: 0 !important;
    top: calc(100% + 10px) !important;
    width: 250px !important;
    min-width: 250px !important;
    max-width: 280px !important;
    background: #ffffff !important;
    border: 1px solid #fed7aa !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15) !important;
    padding: 8px 0 !important;
    display: none;
    z-index: 99999 !important;
    text-align: left !important;
    animation: fadeInDown 0.18s ease;
}

.nav-icons .user-dropdown-menu.show {
    display: block !important;
}

.nav-icons .user-dropdown-header {
    padding: 12px 18px !important;
    border-bottom: 1px solid #f5f5f4 !important;
    background: #fffaf5 !important;
    text-align: left !important;
}

.nav-icons .user-dropdown-header strong {
    display: block !important;
    color: #1c1917 !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.nav-icons .user-dropdown-email {
    font-size: 0.82rem !important;
    color: #78716c !important;
    display: block !important;
    margin-top: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Explicitly override and reset `.nav-icons a` for all dropdown items */
.nav-icons .user-dropdown-menu a,
.nav-icons .user-dropdown-menu a.user-dropdown-item,
.nav-icons .user-dropdown-menu .user-dropdown-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 42px !important;
    padding: 10px 18px !important;
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
    color: #292524 !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transform: none !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    line-height: 1.4 !important;
}

.nav-icons .user-dropdown-menu a i,
.nav-icons .user-dropdown-menu a.user-dropdown-item i,
.nav-icons .user-dropdown-menu .user-dropdown-item i {
    font-size: 16px !important;
    width: 20px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    color: #ea580c !important;
    margin: 0 !important;
}

.nav-icons .user-dropdown-menu a:hover,
.nav-icons .user-dropdown-menu a.user-dropdown-item:hover,
.nav-icons .user-dropdown-menu .user-dropdown-item:hover {
    background: #fff7ed !important;
    color: #ea580c !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.nav-icons .user-dropdown-menu a.text-danger i {
    color: #dc2626 !important;
}

.nav-icons .user-dropdown-menu a.text-danger:hover,
.nav-icons .user-dropdown-menu a.user-dropdown-item.text-danger:hover,
.nav-icons .user-dropdown-menu .user-dropdown-item.text-danger:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

.nav-icons .user-dropdown-menu hr {
    margin: 6px 0 !important;
    border-color: #f5f5f4 !important;
    opacity: 1 !important;
    border-top: 1px solid #f5f5f4 !important;
    background: transparent !important;
}
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-login-nav-btn:hover {
    color: #ea580c;
    background: #fff7ed;
}

/* Cart auth warning card */
.cart-auth-banner {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1.5px dashed #ea580c;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.cart-auth-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-auth-banner-left i {
    font-size: 24px;
    color: #ea580c;
}

.cart-auth-banner-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #9a3412;
    margin: 0;
}

.cart-auth-banner-sub {
    font-size: 0.83rem;
    color: #7c2d12;
    margin: 0;
}

.cart-auth-btn-pill {
    background: #ea580c;
    color: #ffffff !important;
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25);
    transition: background 0.15s ease;
}

.cart-auth-btn-pill:hover {
    background: #c2410c;
}

.checkout-user-identity {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Orders Page Styles */
.orders-page-section {
    padding: 40px 16px 80px;
    background: #fafaf9;
    min-height: calc(100vh - 280px);
}

.order-history-card {
    background: #ffffff;
    border: 1px solid #e7e5e4;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.order-history-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.order-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid #f5f5f4;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.order-id-badge {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1c1917;
}

.order-status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.order-status-pill.received { background: #eff6ff; color: #1d4ed8; }
.order-status-pill.confirmed { background: #fef3c7; color: #b45309; }
.order-status-pill.dispatched { background: #f0fdf4; color: #15803d; }
.order-status-pill.delivered { background: #ecfdf5; color: #047857; }
.order-status-pill.cancelled { background: #fef2f2; color: #b91c1c; }

.order-item-mini {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #fafaf9;
}

.order-item-img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    background: #f5f5f4;
    border: 1px solid #e7e5e4;
}

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

