/* ============================================================
   CUSTOM LOGIN & PROFILE SYSTEM - Optimized & Responsive
   ============================================================ */

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

/* ============================================================
   LOGIN POPUP
   ============================================================ */
.lp-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.55) !important;
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-modal {
    background: #fff;
    width: 90%;
    max-width: 420px;
    padding: 40px 36px 36px;
    position: relative;
    border-radius: 2px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    animation: lpFadeIn 0.25s ease;
}

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

.lp-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.lp-close:hover { 
    color: #000; 
}

.lp-logo {
    text-align: center;
    margin-bottom: 20px;
}

.lp-logo img {
    max-height: 50px;
    width: auto;
}

.lp-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0 0 4px;
    letter-spacing: 0;
}

.lp-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px;
    line-height: 1.4;
}

.lp-status {
    font-size: 13px;
    min-height: 18px;
    margin-bottom: 8px;
    color: #d00;
    text-align: center;
    transition: color 0.2s;
}

.lp-status.success { 
    color: #008000; 
}

.lp-field {
    margin-bottom: 12px;
}

.lp-field input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #ddd;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    border-radius: 2px;
    background: #fff;
}

.lp-field input:focus {
    border-color: #111;
}

.lp-btn-primary {
    width: 100%;
    background: #111;
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 2px;
    margin-top: 4px;
}

.lp-btn-primary:hover { 
    background: #333; 
}

.lp-btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
}

.lp-divider {
    text-align: center;
    border-top: 1px solid #eaeaea;
    margin: 22px 0;
    line-height: 0;
}

.lp-divider span {
    background: #fff;
    padding: 0 14px;
    color: #aaa;
    font-size: 12px;
}

.lp-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    color: #333;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    border-radius: 2px;
    background: #fff;
}

.lp-btn-google:hover { 
    background: #f9f9f9; 
}

.lp-btn-google img { 
    width: 18px; 
}

.lp-link-underline {
    color: #333;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.lp-link-underline:hover {
    color: #000;
}

/* ============================================================
   ACCOUNT HEADER DROPDOWN
   ============================================================ */
.header-account-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.account-icon-toggle,
.account-icon-btn {
    color: #1B1B1B;
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}

.account-dropdown-menu {
    display: none !important;
    position: absolute !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18) !important;
    width: 260px !important;
    z-index: 999999 !important;
    padding: 20px !important;
    font-family: 'Jost', sans-serif;
    top: 45px;
    right: 0;
}

.account-dropdown-menu.show {
    display: block !important;
}

.account-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eaeaea;
}

.account-avatar {
    width: 42px;
    height: 42px;
    background: #fcf4ec;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #111;
    flex-shrink: 0;
}

.account-info { 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

.account-name { 
    font-weight: 700; 
    font-size: 14px; 
    color: #111; 
    margin-bottom: 2px; 
}

.account-email { 
    font-size: 13px; 
    color: #888; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.account-dropdown-links { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

.account-dropdown-links li { 
    margin-bottom: 14px; 
}

.account-dropdown-links li:last-child { 
    margin-bottom: 0; 
    margin-top: 20px; 
    padding-top: 14px;
    border-top: 1px solid #eaeaea;
}

.account-dropdown-links a {
    text-decoration: none;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.account-dropdown-links a:hover { 
    text-decoration: underline; 
    text-underline-offset: 3px; 
}

.account-dropdown-links .logout-link a {
    color: #e02b2b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-dropdown-links .logout-link a:hover { 
    text-decoration: none; 
    opacity: 0.75; 
}

/* ============================================================
   PROFILE PAGE WRAPPER
   ============================================================ */
.cp-wrapper {
    display: flex;
    gap: 0;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    align-items: flex-start;
    font-family: 'Jost', sans-serif;
}

.cp-tracker-box {
    background-color: #F5F6F8;
    padding: 16px;
    border-radius: 2px;
}

/* ---- Sidebar ---- */
.cp-sidebar {
    width: 200px;
    flex-shrink: 0;
    padding-right: 20px;
    border-right: 1px solid #e0e0e0;
}

.cp-sidebar-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #999;
    margin: 0 0 14px;
    text-transform: uppercase;
}

.cp-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cp-nav li { 
    margin-bottom: 2px; 
}

.cp-nav-link {
    display: block;
    padding: 8px 0;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.cp-nav-link:hover,
.cp-nav-link.active {
    color: #000;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---- Main Content ---- */
.cp-content {
    flex: 1;
    padding-left: 48px;
    min-width: 0;
}

.cp-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.cp-panel-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.cp-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: all 0.2s;
}

.cp-edit-btn:hover { 
    text-decoration: underline; 
    text-underline-offset: 3px; 
}

.cp-user-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.cp-avatar-lg {
    width: 48px;
    height: 48px;
    background: #fcf4ec;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #111;
    flex-shrink: 0;
}

.cp-user-name {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    margin-bottom: 8px;
}

.cp-user-meta { 
    font-size: 14px; 
    color: #555; 
    line-height: 1.5; 
}

.cp-meta-label { 
    font-size: 12px; 
    color: #999; 
}

.cp-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 24px 0;
}

/* Address section */
.cp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.cp-section-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.cp-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.cp-add-btn:hover { 
    text-decoration: underline; 
    text-underline-offset: 3px; 
}

.cp-empty-state {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 16px;
    background: #f9f9f9;
    border: 1px solid #eee;
    font-size: 14px;
    color: #666;
    border-radius: 2px;
}

.cp-address-card {
    padding: 16px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 12px;
    border-radius: 2px;
    transition: box-shadow 0.2s;
}

.cp-address-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cp-address-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
}

.cp-badge-default {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 2px;
}

/* ============================================================
   ORDER HISTORY
   ============================================================ */
.cp-order-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.cp-order-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    white-space: nowrap;
}

.cp-order-tab:hover { 
    color: #111; 
}

.cp-order-tab.active {
    color: #111;
    font-weight: 700;
    background: #f9f5f0;
    border-bottom-color: #111;
}

.cp-order-list { 
    display: flex; 
    flex-direction: column; 
    gap: 16px; 
}

.cp-order-card {
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.cp-order-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cp-order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9f9f9;
    font-size: 12px;
    color: #555;
    gap: 12px;
}

.cp-order-card-header strong { 
    color: #111; 
}

.cp-order-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 12px;
}

.cp-order-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cp-order-total-label {
    font-size: 12px;
    color: #555;
    text-align: right;
    line-height: 1.4;
}

.cp-order-total-label strong { 
    font-size: 14px; 
    color: #111; 
}

.cp-status-badge {
    font-size: 12px;
    font-weight: 700;
}

.cp-status-badge.complete { 
    color: #008000; 
}

.cp-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid #f0f0f0;
}

.cp-order-item:first-of-type { 
    border-top: none; 
}

.cp-order-item-img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    background: #f0f0f0;
    overflow: hidden;
    border-radius: 2px;
}

.cp-order-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-img-placeholder {
    width: 64px;
    height: 64px;
    background: #e8e8e8;
}

.cp-order-item-info {
    flex: 1;
    font-size: 12px;
    line-height: 1.5;
    color: #555;
    min-width: 0;
}

.cp-order-item-info strong { 
    color: #111; 
    font-size: 12px; 
    letter-spacing: 0.2px; 
}

.cp-order-variant { 
    color: #888; 
    font-size: 11px;
}

.cp-order-item-price {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    flex-shrink: 0;
}

.cp-order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #555;
    gap: 12px;
    flex-wrap: wrap;
}

.cp-order-card-footer strong { 
    font-size: 15px; 
    color: #111; 
}

.cp-order-footer-btns {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Buttons */
.cp-btn-dark {
    background: #111;
    color: #fff;
    border: none;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border-radius: 2px;
    transition: background 0.2s;
}

.cp-btn-dark:hover { 
    background: #333; 
}

.cp-btn-outline {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s;
    margin: 0;
}

.cp-btn-outline:hover { 
    border-color: #111; 
    color: #111; 
}

/* ============================================================
   ORDER TRACKER
   ============================================================ */
.cp-tracker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
}

.cp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}

.cp-back-link:hover {
    color: #666;
}

.cp-tracker-order-num {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.cp-tracker-card {
    border: 1px solid #e0e0e0;
    padding: 24px;
    border-radius: 2px;
}

.cp-tracker-info {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 32px;
    margin-bottom: 16px;
    border-bottom: 1px solid #DEDEDE;
    padding-bottom: 16px;
}

.cp-tracker-info > div { 
    font-size: 13px; 
    line-height: 1.6; 
}

/* Tracker steps */
.cp-tracker-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    text-align: center;
    padding-top: 20px;
}

.cp-tracker-line {
    position: absolute;
    top: 35px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.cp-tracker-line-fill {
    height: 100%;
    background: #111;
    transition: width 0.5s ease;
}

.cp-tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
}

.cp-tracker-step.done { 
    color: #111; 
    font-weight: 700; 
}

.cp-tracker-dot {
    width: 24px;
    height: 24px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.cp-tracker-step.done .cp-tracker-dot {
    border-color: #111;
    background: #111;
    color: #fff;
}

.cp-tracker-step.current .cp-tracker-dot {
    border-color: #111;
    background: #fff;
}

.cp-tracker-step-icon {
    opacity: 0.25;
    transition: opacity 0.3s ease;
}

.cp-tracker-step.done .cp-tracker-step-icon,
.cp-tracker-step.current .cp-tracker-step-icon {
    opacity: 1;
}

/* ============================================================
   MODALS
   ============================================================ */
.cp-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.45) !important;
    z-index: 999998 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cp-modal {
    background: #fff;
    width: 90%;
    max-width: 1050px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 2px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    animation: lpFadeIn 0.25s ease;
}

.cp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 18px;
    border-bottom: 1px solid #eee;
    gap: 12px;
}

.cp-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.cp-modal-close {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.4px;
    padding: 0;
    transition: color 0.2s;
    flex-shrink: 0;
}

.cp-modal-close:hover { 
    color: #000; 
}

.cp-modal-body {
    padding: 24px;
}

.cp-modal-footer {
    display: flex;
    gap: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.cp-btn-cancel {
    padding: 16px;
    background: #fff;
    border: 1px solid #000000;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #000000;
    cursor: pointer;
    transition: background 0.2s;
    justify-content: center;
    width: 300px;
}

.cp-btn-cancel:hover { 
    background: #f5f5f5; 
}

.cp-btn-save {
    padding: 16px;
    background: #111;
    border: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    width: 300px;
}

.cp-btn-save:hover { 
    background: #333; 
}

/* Form elements in modal */
.cp-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cp-field {
    margin-bottom: 12px;
}

.cp-field input,
.cp-select {
    width: 100% !important;
    padding: 11px 12px !important;
    border: 1px solid #ddd !important;
    font-size: 13px !important;
    outline: none !important;
    border-radius: 2px !important;
    transition: border-color 0.2s !important;
    background: #fff !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    height: auto !important;
    box-sizing: border-box !important;
}

.cp-field input:focus,
.cp-select:focus { 
    border-color: #111; 
}

.cp-field input:disabled { 
    background: #f9f9f9 !important; 
    color: #999; 
}

.cp-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 38px !important;
    cursor: pointer;
}

.cp-field-note {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #999;
    margin: 5px 0 0;
}

.cp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    margin-bottom: 0;
}

.cp-checkbox-label input { 
    width: auto !important; 
    margin: 0; 
}

.cp-avatar-edit-wrap {
    text-align: center;
    margin-bottom: 24px;
}

.cp-avatar-edit {
    position: relative;
    width: 72px;
    height: 72px;
    font-size: 28px;
    margin: 0 auto;
    cursor: pointer;
}

.cp-avatar-cam {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 12px;
}

.cp-form-msg {
    font-size: 12px;
    min-height: 16px;
    color: #d00;
    text-align: center;
}

.cp-form-msg.ok { 
    color: #008000; 
}

/* ============================================================
   PANEL HEADER for order tab
   ============================================================ */
.cp-panel h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 24px;
}

/* ════════════════════════════════════════
   RESPONSIVE DESIGN
   ════════════════════════════════════════ */

/* Tablet & Small Desktop (max-width: 1024px) */
@media (max-width: 1024px) {
    .cp-wrapper {
        padding: 0 16px;
        margin: 32px auto;
    }
    
    .cp-content {
        padding-left: 32px;
    }
    
    .cp-tracker-info {
        gap: 24px;
        grid-template-columns: auto auto;
    }
    
    .cp-tracker-info > div:nth-child(3) {
        grid-column: 1 / -1;
    }
}

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .cp-wrapper {
        flex-direction: column;
        padding: 0 14px;
        margin: 24px auto;
    }
    
    .cp-sidebar {
        width: 100%;
        padding-right: 0;
        padding-bottom: 16px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 20px;
    }
    
    .cp-nav { 
        display: flex; 
        flex-wrap: wrap; 
        gap: 8px; 
    }
    
    .cp-nav li { 
        margin: 0; 
    }
    
    .cp-nav-link {
        padding: 8px 12px;
        background: #f5f5f5;
        border-radius: 2px;
        font-size: 13px;
    }
    
    .cp-content { 
        padding-left: 0; 
    }
    
    .cp-panel-header {
        gap: 8px;
    }
    
    .cp-panel-header h2 {
        font-size: 20px;
    }
    
    .cp-tracker-steps { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 16px; 
    }
    
    .cp-tracker-line { 
        display: none; 
    }
    
    .cp-tracker-info { 
        grid-template-columns: 1fr 1fr; 
        gap: 16px; 
    }
    
    .cp-tracker-info > div:nth-child(3) {
        grid-column: 1 / -1;
    }
    
    .cp-form-row-2 { 
        grid-template-columns: 1fr; 
    }
    
    .cp-order-tab { 
        padding: 8px 12px; 
        font-size: 12px; 
    }
    
    .cp-order-card-footer { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 12px; 
    }
    
    .lp-modal { 
        padding: 24px 18px; 
    }
    
    .cp-order-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cp-order-card-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cp-btn-cancel,
    .cp-btn-save {
        width: 100%;
    }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .cp-wrapper {
        padding: 0 12px;
        margin: 16px auto;
    }
    
    .lp-modal {
        padding: 24px 16px 20px;
        width: 95%;
        max-width: 100%;
    }
    
    .lp-close {
        font-size: 22px;
    }
    
    .lp-title {
        font-size: 16px;
    }
    
    .lp-subtitle {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .lp-field input {
        font-size: 16px;
        padding: 12px 12px;
    }
    
    .lp-btn-primary,
    .lp-btn-google {
        font-size: 12px;
        padding: 12px;
    }
    
    .cp-sidebar {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    
    .cp-sidebar-label {
        font-size: 10px;
        margin-bottom: 10px;
    }
    
    .cp-nav {
        gap: 6px;
    }
    
    .cp-nav-link {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .cp-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .cp-panel-header h2 {
        font-size: 18px;
    }
    
    .cp-section-header {
        gap: 8px;
    }
    
    .cp-section-header h3 {
        font-size: 16px;
    }
    
    .cp-user-card {
        gap: 12px;
    }
    
    .cp-user-name {
        font-size: 14px;
    }
    
    .cp-user-meta {
        font-size: 12px;
    }
    
    .cp-tracker-steps {
        grid-template-columns: 1fr;
        gap: 12px;
        padding-top: 12px;
    }
    
    .cp-tracker-step {
        font-size: 11px;
    }
    
    .cp-tracker-dot {
        width: 20px;
        height: 20px;
        border-width: 1.5px;
    }
    
    .cp-tracker-card {
        padding: 16px;
    }
    
    .cp-tracker-info {
        grid-template-columns: 1fr;
        gap: 12px;
        padding-bottom: 12px;
    }
    
    .cp-form-row-2 {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .cp-field {
        margin-bottom: 10px;
    }
    
    .cp-field input,
    .cp-select {
        font-size: 16px !important;
        padding: 11px 10px !important;
    }
    
    .cp-order-item {
        gap: 10px;
        padding: 12px;
    }
    
    .cp-order-item-img {
        width: 56px;
        height: 56px;
    }
    
    .cp-order-item-info {
        font-size: 11px;
    }
    
    .cp-order-item-price {
        font-size: 12px;
    }
    
    .cp-order-card {
        margin-bottom: 12px;
    }
    
    .cp-btn-dark,
    .cp-btn-outline {
        font-size: 11px;
        padding: 8px 12px;
    }
    
    .cp-btn-cancel,
    .cp-btn-save {
        width: 100%;
    }
    
    .cp-modal-footer {
        flex-direction: column;
    }
    
    .cp-edit-btn {
        font-size: 12px;
    }
}

/* ============================================================
   LOGIN POPUP
   ============================================================ */
.lp-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,0.55) !important;
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-modal {
    background: #fff;
    width: 90%;
    max-width: 420px;
    padding: 40px 36px 36px;
    position: relative;
    border-radius: 2px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    animation: lpFadeIn 0.25s ease;
}

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

.lp-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    font-size: 26px; color: #999;
    cursor: pointer; line-height: 1;
    padding: 0;
}
.lp-close:hover { color: #000; }

.lp-logo {
    text-align: center;
    margin-bottom: 20px;
}
.lp-logo img {
    max-height: 50px;
    width: auto;
}

.lp-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0 0 4px;
    letter-spacing: 0;
}

.lp-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.lp-status {
    font-size: 13px;
    min-height: 18px;
    margin-bottom: 8px;
    color: #d00;
    text-align: center;
}
.lp-status.success { color: #008000; }

.lp-field {
    margin-bottom: 12px;
}
.lp-field input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #ddd;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    border-radius: 2px;
}
.lp-field input:focus {
    border-color: #111;
}

.lp-btn-primary {
    width: 100%;
    background: #111;
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 2px;
    margin-top: 4px;
}
.lp-btn-primary:hover { background: #333; }
.lp-btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
}

.lp-divider {
    text-align: center;
    border-top: 1px solid #eaeaea;
    margin: 22px 0;
    line-height: 0;
}
.lp-divider span {
    background: #fff;
    padding: 0 14px;
    color: #aaa;
    font-size: 12px;
}

.lp-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    color: #333;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: background 0.2s;
    border-radius: 2px;
}
.lp-btn-google:hover { background: #f9f9f9; }
.lp-btn-google img { width: 18px; }

.lp-link-underline {
    color: #333;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================================
   ACCOUNT HEADER DROPDOWN
   ============================================================ */
.header-account-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.account-icon-toggle,
.account-icon-btn {
    color: #1B1B1B;
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}
.account-dropdown-menu {
    display: none !important;
    position: absolute !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18) !important;
    width: 260px !important;
    z-index: 999999 !important;
    padding: 20px !important;
    font-family: 'Jost';
    top: 45px;
    right: 0px;
}
.account-dropdown-menu.show {
    display: block !important;
}

.account-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eaeaea;
}
.account-avatar {
    width: 42px; height: 42px;
    background: #fcf4ec;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 600; color: #111;
    flex-shrink: 0;
}
.account-info { display: flex; flex-direction: column; overflow: hidden; }
.account-name { font-weight: 700; font-size: 14px; color: #111; margin-bottom: 2px; }
.account-email { font-size: 14px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-dropdown-links { list-style: none; padding: 0; margin: 0; }
.account-dropdown-links li { margin-bottom: 14px; }
.account-dropdown-links li:last-child { margin-bottom: 0; margin-top: 20px; }
.account-dropdown-links a {
    text-decoration: none; color: #333; font-size: 14px; font-weight: 500;
    transition: opacity 0.2s;
}
.account-dropdown-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.account-dropdown-links .logout-link a {
    color: #e02b2b;
    display: flex; align-items: center; gap: 8px;
}
.account-dropdown-links .logout-link a:hover { text-decoration: none; opacity: 0.75; }

/* ============================================================
   PROFILE PAGE WRAPPER
   ============================================================ */
.cp-wrapper {
    display: flex;
    gap: 0;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    align-items: flex-start;
    font-family: 'Jost';
}
.cp-tracker-box {
    background-color: #F5F6F8;
    padding: 16px;
}

/* ---- Sidebar ---- */
.cp-sidebar {
    width: 200px;
    flex-shrink: 0;
    padding-right: 20px;
    border-right: 1px solid #e0e0e0;
}
.cp-sidebar-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #999;
    margin: 0 0 14px;
    text-transform: uppercase;
}
.cp-nav {
    list-style: none;
    padding: 0; margin: 0;
}
.cp-nav li { margin-bottom: 2px; }
.cp-nav-link {
    display: block;
    padding: 8px 0;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.cp-nav-link:hover,
.cp-nav-link.active {
    color: #000;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---- Main Content ---- */
.cp-content {
    flex: 1;
    padding-left: 48px;
    min-width: 0;
}

.cp-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.cp-panel-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.cp-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.cp-edit-btn:hover { text-decoration: underline; text-underline-offset: 4px; }

.cp-user-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}
.cp-avatar-lg {
    width: 48px; height: 48px;
    background: #fcf4ec;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; color: #111;
    flex-shrink: 0;
}
.cp-user-name {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    margin-bottom: 8px;
}
.cp-user-meta { font-size: 14px; color: #555; line-height: 1.5; }
.cp-meta-label { font-size: 12px; color: #999; }

.cp-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 24px 0;
}

/* Address section */
.cp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.cp-section-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}
.cp-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
}
.cp-add-btn:hover { text-decoration: underline; text-underline-offset: 4px; }

.cp-empty-state {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 16px;
    background: #f9f9f9;
    border: 1px solid #eee;
    font-size: 14px;
    color: #666;
    border-radius: 2px;
}

.cp-address-card {
    padding: 16px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 12px;
    border-radius: 2px;
}
.cp-address-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.cp-badge-default {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 2px;
}

/* ============================================================
   ORDER HISTORY
   ============================================================ */
.cp-order-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.cp-order-tab {
    padding: 4px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    white-space: nowrap;
}
.cp-order-tab:hover { color: #111; }
.cp-order-tab.active {
    color: #111;
    font-weight: 700;
    background: #f9f5f0;
}

.cp-order-list { display: flex; flex-direction: column; gap: 16px; }

.cp-order-card {
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.cp-order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f9f9f9;
    font-size: 13px;
    color: #555;
}
.cp-order-card-header strong { color: #111; }

.cp-order-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.cp-order-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cp-order-total-label {
    font-size: 13px;
    color: #555;
    text-align: right;
    line-height: 1.4;
}
.cp-order-total-label strong { font-size: 15px; color: #111; }

.cp-status-badge {
    font-size: 13px;
    font-weight: 700;
}
.cp-status-badge.complete { color: #008000; }

.cp-order-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
}
.cp-order-item:first-of-type { border-top: none; }

.cp-order-item-img {
    width: 64px; height: 64px;
    flex-shrink: 0;
    background: #f0f0f0;
    overflow: hidden;
}
.cp-order-item-img img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.cp-img-placeholder {
    width: 64px; height: 64px;
    background: #e8e8e8;
}
.cp-order-item-info {
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}
.cp-order-item-info strong { color: #111; font-size: 13px; letter-spacing: 0.3px; }
.cp-order-variant { color: #888; }

.cp-order-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
}

.cp-order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
    color: #555;
}
.cp-order-card-footer strong { font-size: 16px; color: #111; }
.cp-order-footer-btns {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Buttons */
.cp-btn-dark {
    background: #111;
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border-radius: 2px;
    transition: background 0.2s;
}
.cp-btn-dark:hover { background: #333; color: #fff; }

.cp-btn-outline {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    padding: 5px 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s;
    margin: 0;
}
.cp-btn-outline:hover { border-color: #111; color: #111; }

/* ============================================================
   ORDER TRACKER
   ============================================================ */
.cp-tracker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.cp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    text-decoration: none;
}
.cp-tracker-order-num {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.cp-tracker-card {
    border: 1px solid #e0e0e0;
    padding: 24px;
    border-radius: 2px;
}
.cp-tracker-info {
    display: grid;
    grid-template-columns: auto auto 500px;
    gap: 32px;
    margin-bottom: 16px;
    border-bottom: 1px solid #DEDEDE;
    padding-bottom: 16px;
}
.cp-tracker-info > div { font-size: 14px; line-height: 1.6; }

/* Tracker steps */
.cp-tracker-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    text-align: center;
    padding-top: 20px;
}
.cp-tracker-line {
    position: absolute;
    top: 35px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}
.cp-tracker-line-fill {
    height: 100%;
    background: #111;
    transition: width 0.5s ease;
}

.cp-tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: #aaa;
    font-weight: 500;
}
.cp-tracker-step.done { color: #111; font-weight: 700; }

.cp-tracker-dot {
    width: 24px; height: 24px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
}
.cp-tracker-step.done .cp-tracker-dot {
    border-color: #111;
    background: #111;
    color: #fff;
}
.cp-tracker-step.current .cp-tracker-dot {
    border-color: #111;
    background: #fff;
}

/* Icon: chưa tới → mờ, đã tới/đang ở → rõ */
.cp-tracker-step-icon {
    opacity: 0.25;
    transition: opacity 0.3s ease;
}
.cp-tracker-step.done .cp-tracker-step-icon,
.cp-tracker-step.current .cp-tracker-step-icon {
    opacity: 1;
}

/* ============================================================
   MODALS
   ============================================================ */
.cp-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,0.45) !important;
    z-index: 999998 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-modal {
    background: #fff;
    width: 90%;
    max-width: 1050px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 2px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    animation: lpFadeIn 0.25s ease;
}

.cp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 18px;
    border-bottom: 1px solid #eee;
}
.cp-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}
.cp-modal-close {
    background: none; border: none;
    font-size: 13px; font-weight: 700;
    color: #555; cursor: pointer;
    display: flex; align-items: center; gap: 4px;
    letter-spacing: 0.5px;
    padding: 0;
}
.cp-modal-close:hover { color: #000; }

.cp-modal-body {
    padding: 24px;
}

.cp-modal-footer {
    display: flex;
    gap: 0;
    justify-content: center;
}
.cp-btn-cancel {
    padding: 16px;
    background: #fff;
    border: 1px solid #000000;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #000000;
    cursor: pointer;
    transition: background 0.2s;
    justify-content: center;
    width: 300px;
}
.cp-btn-cancel:hover { background: #f5f5f5; }
.cp-btn-save {
    padding: 16px;
    background: #111;
    border: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    width: 300px;
}
.cp-btn-save:hover { background: #333; }

/* Form elements in modal */
.cp-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.cp-field {
    margin-bottom: 12px;
}
.cp-field input,
.cp-select {
    width: 100% !important;
    padding: 13px 14px !important;
    border: 1px solid #ddd !important;
    font-size: 14px !important;
    outline: none !important;
    border-radius: 2px !important;
    transition: border-color 0.2s !important;
    background: #fff !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    height: auto !important;
}
.cp-field input:focus,
.cp-select:focus { border-color: #111; }
.cp-field input:disabled { background: #f9f9f9 !important; color: #999; }

.cp-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 40px !important;
    cursor: pointer;
}

.cp-field-note {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #888;
    margin: 5px 0 0;
}

.cp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    margin-bottom: 0;
}
.cp-checkbox-label input { width: auto !important; margin: 0; }

.cp-avatar-edit-wrap {
    text-align: center;
    margin-bottom: 24px;
}
.cp-avatar-edit {
    position: relative;
    width: 72px; height: 72px;
    font-size: 28px;
    margin: 0 auto;
    cursor: pointer;
}
.cp-avatar-cam {
    position: absolute;
    bottom: -4px; right: -4px;
    width: 24px; height: 24px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #555;
}

.cp-form-msg {
    font-size: 13px;
    min-height: 16px;
    color: #d00;
    text-align: center;
}
.cp-form-msg.ok { color: #008000; }

/* ============================================================
   PANEL HEADER for order tab
   ============================================================ */
.cp-panel h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 24px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .cp-wrapper {
        flex-direction: column;
        padding: 0 16px;
        margin: 20px auto;
    }
    .cp-sidebar {
        width: 100%;
        padding-right: 0;
        padding-bottom: 16px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 20px;
    }
    .cp-nav { display: flex; flex-wrap: wrap; gap: 8px; }
    .cp-nav li { margin: 0; }
    .cp-nav-link {
        padding: 8px 14px;
        background: #f5f5f5;
        border-radius: 2px;
    }
    .cp-content { padding-left: 0; }

    .cp-tracker-steps { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .cp-tracker-line { display: none; }
    .cp-tracker-info { grid-template-columns: 1fr 1fr; gap: 16px; }
    .cp-tracker-info > div:last-child { grid-column: span 2; }

    .cp-form-row-2 { grid-template-columns: 1fr; }

    .cp-order-tab { padding: 10px 12px; font-size: 13px; }
    .cp-order-card-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
    .lp-modal { padding: 32px 20px 24px; }
}