:root {
    --primary-pink: #d6006e;
    --primary-green: #d6006e; /* Changed green to pink as requested */
    --bg-neutral: #f4f4f7;
    --text-dark: #333333;
    --text-muted: #666666;
    --border-radius: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-neutral);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 80px 20px; /* Aumentado ainda mais para evitar cortes em telas menores */
    transition: background-color 0.4s ease;
}

body.tracking-mode {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0;
    background-color: #f8fafc;
    overflow: hidden;
}

.tracking-navbar {
    display: none;
    width: 100%;
    background: white;
    padding: 15px 5%; 
    justify-content: space-between;
    align-items: center;
    box-shadow: none; /* Removed shadow to match layout */
    flex-shrink: 0;
    z-index: 100;
    position: relative;
}

body.tracking-mode .tracking-navbar {
    display: flex;
}

.btn-back-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b; /* neutral grey */
    text-decoration: none;
}

.nav-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-logo img {
    height: 38px;
}

.nav-actions {
    display: flex;
    gap: 15px;
}

.btn-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #64748b; /* neutral grey */
    text-decoration: none;
    transition: all 0.2s;
}

.btn-nav-icon svg {
    width: 22px;
    height: 22px;
}

.tracking-content {
    display: none;
    width: 100%;
    max-width: 800px;
    flex: 1; /* Take all remaining height after navbar */
    padding: 10px 15px 70px 15px; /* Aumentado ainda mais para evitar cortes em telas menores */
    flex-direction: column;
    gap: 10px; /* Reduced gap */
    overflow: hidden;
}

body.tracking-mode .tracking-content {
    display: flex;
}

body.tracking-mode .main-card, 
body.tracking-mode .footer-text {
    display: none;
}

.order-summary-card {
    background: white;
    border-radius: 16px;
    padding: 20px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    flex-shrink: 0;
}

.order-summary-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-icon-bg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fce7f3; /* light pink */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d6006e; /* pink logo color */
}

.order-icon-bg svg {
    width: 22px;
    height: 22px;
}

.order-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.order-info h2 {
    font-size: 0.95rem; /* Reduced to fit on one line */
    font-weight: 700;
    color: var(--text-dark);
    margin: 2px 0 4px 0;
}

.status-badge {
    background: #fce7f3;
    color: #d6006e;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
}

.delivery-estimate {
    text-align: right;
}

.delivery-estimate span {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 2px;
    display: block;
}

.delivery-date {
    font-size: 0.95rem; /* Reduced to fit on one line */
    font-weight: 700;
    color: #d6006e !important;
    margin-bottom: 2px;
}

.delivery-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tracking-section-header {
    margin: 5px 0 10px 0;
    flex-shrink: 0;
}

.tracking-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.tracking-section-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline-container {
    background: white;
    border-radius: 16px;
    padding: 15px; /* Reduced padding */
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    flex: 1; /* Take remaining space */
    min-height: 0; /* Allow shrinking */
    display: flex;
    flex-direction: column;
}

.modern-timeline {
    position: relative;
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
}

/* Scrollbar para a timeline */
.modern-timeline::-webkit-scrollbar {
    width: 4px;
}
.modern-timeline::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
.modern-timeline::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

.modern-timeline::before {
    display: none;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 24px;
    bottom: -4px;
    width: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.timeline-step:last-child::before {
    display: none;
}

.timeline-step {
    position: relative;
    padding-left: 35px;
    padding-bottom: 25px;
}

.timeline-step:last-child {
    padding-bottom: 5px;
}

.step-icon {
    position: absolute;
    left: 0;
    top: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-step.completed .step-icon {
    background: #d6006e; /* pink */
    border-color: #d6006e;
}

.timeline-step.completed .step-icon svg {
    width: 12px;
    height: 12px;
    display: block;
}

.timeline-step.active .step-icon {
    background: white;
    border-color: #fce7f3; /* light pink border */
    border-width: 4px;
    box-shadow: none;
    left: -2px; /* adjust for thicker border */
    top: 2px;
    width: 24px;
    height: 24px;
}

.timeline-step.active .active-dot {
    width: 10px;
    height: 10px;
    background: #d6006e;
    border-radius: 50%;
}

.timeline-step.pending .step-icon {
    background: white;
    border-color: #e2e8f0;
}

.step-content h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
    text-transform: uppercase;
}

.timeline-step.active .step-content h3 {
    color: #d6006e;
}

.timeline-step.pending .step-content h3,
.timeline-step.pending .step-content p {
    color: #94a3b8; /* more opaque/grey for pending */
}

.step-content p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.step-time {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 2px;
}

.step-highlight {
    background: #f0fdf4;
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
    border: 1px solid #dcfce7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-location {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: var(--primary-green);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-location:hover {
    background: #f0fdf4;
}

.help-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    margin-top: 5px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.help-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.help-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fce7f3; /* light pink */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d6006e;
}

.help-text h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.help-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-contact {
    background: #63308a; /* solid purple color */
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-contact:hover {
    filter: brightness(1.1);
}

.btn-back-footer {
    margin-top: 10px;
    background: white;
    color: #64748b; /* neutral grey */
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

@media (max-width: 600px) {
    .order-summary-card {
        flex-direction: row; /* keep it row */
        align-items: center;
        gap: 10px;
        padding: 15px 12px;
    }
    .delivery-estimate {
        text-align: right;
    }
}

.main-card {
    background: white;
    width: 100%;
    max-width: 550px; /* Reduced width for single column */
    min-height: 400px;
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    animation: fadeIn 0.8s ease-out;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-column {
    padding: 30px 40px 20px 40px; /* Increased top padding */
    display: flex;
    flex-direction: column;
}

.logo-container {
    padding-top: 35px;
    margin-bottom: 10px;
    text-align: center;
}

.logo-container img {
    max-width: 140px;
    height: auto;
}

.welcome-text {
    color: var(--primary-pink);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
    line-height: 1.4;
    text-align: center;
}

.input-group {
    margin-bottom: 12px;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #fafafa;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-green);
    background: white;
    box-shadow: 0 0 0 4px rgba(18, 180, 136, 0.1);
}

.disclaimer {
    font-size: 0.75rem;
    color: #999;
    line-height: 1.4;
    margin-bottom: 25px;
    text-align: center;
}

.btn-access {
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-bottom: 20px;
}

.btn-access:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(18, 180, 136, 0.2);
}

/* Carousel Section */
.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-top: auto;
    line-height: 0; /* Remove potential bottom gap */
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
}

.carousel-item img {
    width: 100%;
    height: 140px; /* Fixed height for better consistency */
    display: block;
    object-fit: cover;
}

/* Timeline and Order List Views */
.timeline-view, .order-list-view {
    display: none;
    width: 100%;
    padding: 30px 40px 20px 40px; /* Increased top padding */
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.timeline-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}

.timeline-header h2 {
    color: var(--primary-pink);
    font-size: 1.3rem;
}

.timeline {
    position: relative;
    padding-left: 25px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar para a timeline */
.timeline::-webkit-scrollbar {
    width: 6px;
}
.timeline::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 10px;
}
.timeline::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 10px;
}
.timeline::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #eee;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: -25px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    border: 2px solid white;
    z-index: 1;
}

.timeline-item.completed .timeline-dot {
    background: var(--primary-green);
}

.timeline-item.active .timeline-dot {
    background: var(--primary-pink);
    box-shadow: 0 0 8px var(--primary-pink);
}

.timeline-content h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.timeline-content p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-date {
    font-size: 0.65rem;
    color: var(--primary-green);
    font-weight: 600;
}

.footer-text {
    margin-top: 20px;
    text-align: center;
    font-size: 0.7rem;
    color: #bbb;
}

.error-message {
    color: #ff4d4d;
    font-size: 0.75rem;
    margin-top: 5px;
    display: none;
}

.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s infinite linear;
    margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Order List specific styles */
.order-list-title {
    color: var(--primary-pink);
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 20px;
}

.order-items-container {
    max-height: 260px; /* Reduced to ensure scrollbar appears earlier */
    overflow-y: auto;
    padding-right: 10px;
}

.order-items-container::-webkit-scrollbar {
    width: 6px;
}
.order-items-container::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 10px;
}
.order-items-container::-webkit-scrollbar-thumb {
    background: #bbb; /* Slightly darker for better visibility */
    border-radius: 10px;
}

.order-items-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-pink);
}

.order-item {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-item:hover {
    border-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.order-item-details h4 {
    color: var(--text-dark);
    margin-bottom: 5px;
}

.order-item-details p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.order-item-arrow {
    color: var(--primary-green);
    font-weight: bold;
}

/* Modal Overlay & Content */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 480px;
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-title {
    color: var(--primary-pink);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.modal-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-modal-cancel {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--text-dark);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-cancel:hover {
    background: #f4f4f4;
}

.btn-modal-confirm {
    background: var(--primary-pink);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-modal-confirm:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(214, 0, 110, 0.2);
}