/* Tracking Page */
.tracking-page {
    background-color: var(--bg-light);
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.tracking-container {
    background: white;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.tracking-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.tracking-header {
    margin-bottom: 30px;
}

.tracking-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.tracking-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.tracking-form {
    text-align: left;
}

.tracking-form .form-group {
    margin-bottom: 20px;
}

.tracking-form .form-group label {
    color: var(--text-muted);
    font-size: 13px;
}

.tracking-form .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 14px;
}

.tracking-form .form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #f9f9f9;
}

.tracking-form .form-input:focus {
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 180, 144, 0.1);
    outline: none;
}

.btn-track {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-track:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 180, 144, 0.3);
}

.tracking-result {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
    display: none;
    text-align: left;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    background: #f0fdf9;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.status-label {
    font-weight: 600;
    color: var(--secondary-color);
}

.status-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.result-details .detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 12px;
}

.result-details .detail-row:last-child {
    border-bottom: none;
}

.result-label {
    color: var(--text-muted);
}

.result-value {
    font-weight: 600;
    color: var(--secondary-color);
}

.error-message {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff5f5;
    color: #e53e3e;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    text-align: center;
    border: 1px solid #fed7d7;
}

.empty-state {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
}

.empty-state i {
    display: block;
    font-size: 40px;
    margin-bottom: 15px;
    color: #ddd;
}

/* Timeline */
.timeline {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.timeline-item {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.timeline-dot {
    width: 30px;
    height: 30px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    transition: all 0.3s;
}

.timeline-item.active .timeline-dot,
.timeline-item.completed .timeline-dot {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.timeline-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.timeline-item.active .timeline-label {
    color: var(--secondary-color);
    font-weight: 700;
}

/* Order Items */
.order-items-list {
    margin-top: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.order-item-row:last-child {
    border-bottom: none;
}

.item-info h4 {
    margin: 0 0 5px;
    font-size: 14px;
    color: var(--secondary-color);
}

.item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.item-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Tracking History Page */
.th-page {
    background-color: var(--bg-light);
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.th-container {
    background: white;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.th-header { margin-bottom: 30px; }

.th-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.th-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.th-form { text-align: left; }
.th-form .form-group { margin-bottom: 20px; }

.th-form .form-group label {
    color: var(--text-muted);
    font-size: 13px;
}

.th-form .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 14px;
}

.th-form .form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #f9f9f9;
}

.th-form .form-input:focus {
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 180, 144, 0.1);
    outline: none;
}

.btn-th {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-th:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 180, 144, 0.3);
}

.btn-th:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-th-outline {
    width: 100%;
    padding: 14px;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-th-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.th-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.th-message.success {
    background-color: #f0fdf9;
    color: #00B490;
    border: 1px solid #bbf7d0;
    display: block;
}

.th-message.error {
    background-color: #fff5f5;
    color: #e53e3e;
    border: 1px solid #fed7d7;
    display: block;
}

/* Verification Code Input */
.code-section { display: none; margin-top: 20px; }
.code-section.show { display: block; }

.code-input-wrapper {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
}

.code-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #ddd;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s;
}

.code-digit:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 180, 144, 0.1);
}

.resend-row {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 10px;
}

.resend-link {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
}

.resend-link.disabled {
    color: var(--text-muted);
    cursor: default;
    text-decoration: none;
}

/* Order History List */
.th-orders { display: none; text-align: left; }
.th-orders.show { display: block; }

.th-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.th-orders-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
}

.th-email-badge {
    font-size: 12px;
    color: var(--text-muted);
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 12px;
}

.order-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #eee;
    transition: all 0.2s;
}

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

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-card-id {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary-color);
    word-break: break-all;
}

.status-badge.completed { background-color: #00B490; }
.status-badge.processing { background-color: #f59e0b; }

.order-card-details .detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.order-card-details .detail-label { color: var(--text-muted); }
.order-card-details .detail-value { font-weight: 600; color: var(--secondary-color); }

.order-items-toggle {
    font-size: 12px;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    margin-top: 8px;
    display: inline-block;
}

.th-orders .order-items-list {
    margin-top: 10px;
    display: none;
}

.th-orders .order-items-list.show { display: block; }

.th-orders .order-item-row {
    font-size: 13px;
    padding: 8px 0;
}

/* Tracking History Link */
.tracking-history-link {
    margin-top: 20px;
    text-align: center;
}

.tracking-history-link a {
    color: var(--primary-color);
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}

.tracking-history-link a:hover {
    text-decoration: underline;
}

.tracking-history-link i {
    margin-right: 4px;
}

/* Tracking Footer Message */
.tracking-footer-msg {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tracking-footer-msg p {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 480px) {
    .th-container { padding: 40px 20px; }
    .code-digit { width: 40px; height: 48px; font-size: 20px; }
}
