/* Estilos do Portal do Cliente e Autenticação - iMoov Food */

.food-portal-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 10px 16px 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.food-portal-container * {
    box-sizing: border-box;
}

/* =========================================================
   1. TELA DE AUTENTICAÇÃO (LOGIN / CADASTRO / RECUPERAÇÃO)
   ========================================================= */

.food-auth-container {
    max-width: 480px !important;
    width: 100% !important;
    margin: 50px auto 40px auto !important;
    padding: 0 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    float: none !important;
    clear: both !important;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    .food-portal-container.food-auth-container {
        min-height: calc(75vh - 100px) !important;
        margin: 60px auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        float: none !important;
    }
}

.food-auth-card {
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #f1f5f9 !important;
    padding: 32px 28px !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    float: none !important;
    box-sizing: border-box !important;
}

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

.food-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #ffedd5;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.food-auth-badge i {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.food-auth-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.food-auth-header p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.food-auth-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 24px;
    gap: 4px;
}

.auth-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.auth-tab-btn i {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block !important;
}

.food-auth-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 18px;
}

.food-auth-alert.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.food-auth-alert.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.food-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field-group label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.auth-input-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

.auth-input-wrapper i.dashicons {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #94a3b8 !important;
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.auth-input-wrapper input {
    width: 100% !important;
    padding: 12px 42px 12px 42px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    color: #0f172a !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    height: 46px !important;
    line-height: normal !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.auth-input-wrapper input:focus,
.auth-input-standard:focus {
    outline: none !important;
    border-color: #EE7E01 !important;
    box-shadow: 0 0 0 3px rgba(238, 126, 1, 0.15) !important;
}

.auth-input-standard {
    width: 100% !important;
    padding: 12px 14px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    color: #0f172a !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    height: 46px !important;
}

.btn-toggle-pwd {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 5 !important;
    box-shadow: none !important;
}

.btn-toggle-pwd i.dashicons,
.btn-toggle-pwd .dashicons {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    color: #94a3b8 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.btn-toggle-pwd:hover,
.btn-toggle-pwd:hover i.dashicons {
    color: #475569 !important;
}

.auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .auth-grid-2 {
        grid-template-columns: 1fr;
    }
}

.auth-remember-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
}

.auth-link-subtle {
    font-size: 12px;
    color: #EE7E01;
    text-decoration: none;
    font-weight: 600;
}

.auth-link-subtle:hover {
    text-decoration: underline;
}

.auth-hint {
    font-size: 11px;
    color: #64748b;
}

.food-auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: #EE7E01;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(238, 126, 1, 0.25);
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.food-auth-submit-btn:hover {
    background: #d66f00;
}

.food-auth-submit-btn:active {
    transform: scale(0.99);
}

.food-auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    color: #94a3b8;
}

.auth-forgot-header {
    margin-bottom: 20px;
}

.auth-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0 0 12px;
}

.auth-btn-back:hover {
    color: #0f172a;
}

.auth-support-box {
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: left;
}

.auth-support-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
    margin-bottom: 6px;
}

.auth-support-box p {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 10px;
    line-height: 1.4;
}

.auth-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #25d366;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.auth-whatsapp-btn:hover {
    background: #1eb956;
    color: #ffffff;
}

/* =========================================================
   2. PAINEL DO CLIENTE LOGADO (DASHBOARD)
   ========================================================= */

.portal-role-switch-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: #1e293b;
    color: #f8fafc;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

.portal-switch-btn {
    background: #EE7E01;
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}

.portal-header-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.portal-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.portal-avatar {
    width: 56px;
    height: 56px;
    background: #EE7E01;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    flex-shrink: 0;
}

.portal-user-info h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.portal-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #64748b;
}

.portal-user-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.portal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.portal-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155 !important;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.portal-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.portal-btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #e11d48 !important;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.portal-btn-logout:hover {
    background: #ffe4e6;
}

/* NAVEGAÇÃO POR ABAS */
.portal-tabs-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.portal-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.portal-nav-btn:hover {
    color: #0f172a;
}

.portal-nav-btn.active {
    color: #ffffff !important;
    background-color: #005b54 !important;
    border-radius: 8px !important;
    border-bottom: none !important;
    font-weight: 700 !important;
}

.portal-tab-count {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
}

.portal-nav-btn.active .portal-tab-count {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

.portal-tab-pane {
    display: none;
}

.portal-tab-pane.active {
    display: block;
}

/* FEEDBACK ALERT */
.food-portal-alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.4;
}

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

.food-portal-alert.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================================================
   3. LISTAGEM DE PEDIDOS (CARDS)
   ========================================================= */

.portal-orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.portal-empty-state {
    text-align: center;
    background: #ffffff;
    border-radius: 16px;
    padding: 48px 24px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.portal-empty-state .empty-icon {
    width: 64px;
    height: 64px;
    background: #f8fafc;
    color: #94a3b8;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.portal-empty-state .empty-icon i {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.portal-empty-state h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #0f172a;
}

.portal-empty-state p {
    margin: 0 0 24px;
    color: #64748b;
    font-size: 14px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.portal-btn-primary {
    display: inline-block;
    background: #EE7E01;
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(238, 126, 1, 0.25);
}

.portal-order-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.portal-order-card:hover {
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.08);
}

.order-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.order-store-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-store-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.order-store-logo-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fed7aa;
    color: #ea580c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-store-title {
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.order-meta-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    flex-wrap: wrap;
}

.order-type-chip {
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* BADGES DE STATUS */
.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
}

.order-status-badge i {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.status-badge-new {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.status-badge-preparing {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.status-badge-delivering {
    background: #fdf4ff;
    color: #86198f;
    border: 1px solid #f5d0fe;
}

.status-badge-completed {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-badge-cancelled {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.order-card-items {
    padding: 18px 20px;
}

.order-items-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.order-item-row {
    display: flex;
    align-items: baseline;
    font-size: 14px;
    color: #334155;
    gap: 8px;
}

.item-qty {
    font-weight: 700;
    color: #EE7E01;
}

.item-name {
    font-weight: 600;
}

.item-options {
    font-size: 12px;
    color: #64748b;
}

.item-price {
    margin-left: auto;
    font-weight: 700;
    color: #0f172a;
}

.order-notes-box {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 14px;
}

.order-card-meta-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}

@media (max-width: 640px) {
    .order-card-meta-grid {
        grid-template-columns: 1fr;
    }
}

.order-card-meta-grid small {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.order-card-meta-grid p {
    margin: 0;
    font-size: 13px;
    color: #1e293b;
    font-weight: 500;
}

.order-total-highlight {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #EE7E01 !important;
}

.order-card-footer {
    background: #f8fafc;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.order-footer-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.order-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-track-order {
    background: #EE7E01;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(238, 126, 1, 0.2);
}

.btn-track-order:hover {
    background: #d66f00;
}

.btn-details-order {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155 !important;
}

.btn-details-order:hover {
    background: #f1f5f9;
}

.btn-reorder {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a !important;
}

.btn-reorder:hover {
    border-color: #EE7E01;
    color: #EE7E01 !important;
}

/* =========================================================
   4. FORMULÁRIO DE PERFIL E SEGURANÇA
   ========================================================= */

.portal-form-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    padding: 28px;
}

.portal-form-header {
    margin-bottom: 24px;
}

.portal-form-header h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.portal-form-header p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.portal-form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 16px;
}

.portal-btn-lookup {
    background: #1e293b;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.portal-btn-lookup:hover {
    background: #0f172a;
}

.portal-profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* FAQ E SUPORTE */
.portal-faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.faq-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.faq-item h4 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.faq-item p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.portal-support-cta {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.support-cta-content h4 {
    margin: 0 0 4px;
    font-size: 16px;
    color: #14532d;
    font-weight: 800;
}

.support-cta-content p {
    margin: 0;
    font-size: 13px;
    color: #166534;
}

.portal-btn-whatsapp-large {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: #ffffff !important;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.25);
}

/* CHECKOUT INTEGRATION BANNERS */
.checkout-logged-user-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.checkout-guest-login-banner {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #9a3412;
}

.btn-checkout-open-login {
    background: #ea580c;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.btn-checkout-open-login:hover {
    background: #c2410c;
}

/* Spinner helper */
@keyframes portalSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: portalSpin 1s linear infinite;
    display: inline-block;
}
