:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e67e22;
    --success: #2ecc71;
    --light: #ecf0f1;
    --dark: #34495e;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f8f9fa;
}

/* Header */
header {
    background: #fff;
    color: var(--primary);
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.site-logo {
    max-height: 50px;
    width: auto;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary);
}

header h1 i {
    color: var(--secondary);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
}

.btn-admin {
    background: var(--light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-admin:hover {
    background: #e2e6ea;
    color: var(--secondary);
}

/* Hero & General Layout */
.tracking-container, .admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 80vh;
}

.search-section {
    text-align: center;
    margin-bottom: 3rem;
}

.search-section h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.search-section h2 span {
    color: #bfa15f; /* Gold-ish color from image */
}

/* Search Box Card */
.search-box {
    background: #fff;
    border-radius: 20px;
    padding: 3rem;
    margin-top: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.icon-box {
    background: #1e3a5f; /* Dark Blue */
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 10px rgba(30, 58, 95, 0.2);
}

.icon-box i {
    color: #fff;
    font-size: 1.8rem;
}

.search-box h3 {
    color: #1e3a5f;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.search-box .subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-container {
    position: relative;
    width: 100%;
}

.search-form input {
    width: 100%;
    padding: 16px 45px 16px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    color: #333;
    background: #fcfcfc;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

.search-form input:focus {
    border-color: #1e3a5f;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.input-container i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
    font-size: 1.1rem;
    pointer-events: none;
}

.search-form button {
    width: 100%;
    padding: 16px;
    background: #1e3a5f;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(30, 58, 95, 0.2);
}

.search-form button:hover {
    background: #162c46;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(30, 58, 95, 0.25);
}

.error-msg {
    color: #e74c3c;
    margin-top: 1rem;
    font-weight: 500;
}

/* Result Section */
.result-section {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.order-header {
    background: #1f3a52; /* Dark blue header */
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-info .label {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.order-info .code {
    margin: 5px 0 0;
    font-size: 1.8rem;
}

.order-status-badge {
    background: #d1fae5;
    color: #065f46;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Timeline */
.timeline-container {
    background: #fff;
    padding: 3rem 1rem;
    border-radius: 0 0 15px 15px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    min-width: 700px; /* Ensure scrolling on small screens */
}

.step {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    transition: all 0.3s;
}

.step.active .step-icon {
    border-color: #bfa15f;
    color: #bfa15f;
    background: #fff8e1;
    transform: scale(1.2);
}

.step.completed .step-icon {
    background: #bfa15f;
    border-color: #bfa15f;
    color: white;
}

.step-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--primary);
}

.step-desc {
    font-size: 0.7rem;
    color: #95a5a6;
}

.line {
    position: absolute;
    top: 20px;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
    display: none; 
}

/* Better Timeline Lines using ::after */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: -1;
}

.step.completed:not(:last-child)::after {
    background: #bfa15f;
}

/* Detail Cards */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.detail-card {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.detail-card h3 {
    margin-top: 0;
    color: var(--primary);
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.detail-row {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

.detail-row span {
    color: #7f8c8d;
}

.detail-row strong {
    color: var(--primary);
}

.detail-row.price {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed #eee;
    font-size: 1.2rem;
}

/* Admin Styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--primary);
}

.action-btn {
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 5px;
}

.btn-edit { background: #e3f2fd; color: #2196f3; }
.btn-delete { background: #ffebee; color: #f44336; }

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active { display: flex; }

.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-secondary {
    background: #bfa15f;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 10px;
}

/* Modal Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.section-title {
    color: var(--primary);
    font-size: 1.1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin: 1.5rem 0 1rem;
}

.disabled-input {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #e9ecef;
}

/* Gallery Styles */
.order-gallery {
    margin-top: 2rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.order-gallery h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.gallery-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    height: 150px;
}

.gallery-item:hover {
    transform: translateY(-3px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: #34495e;
    color: #fff;
    margin-top: auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .site-logo {
        max-height: 40px; /* Smaller logo on mobile */
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    nav ul li {
        margin-left: 10px;
        margin-right: 10px;
    }

    .search-box {
        padding: 1.5rem;
        margin: 1rem;
    }

    .timeline-container {
        padding: 1rem;
    }
    
    .timeline {
        min-width: 100%; /* Allow shrink if possible or scroll */
    }
}

.fb-floating {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 1200;
}

.fb-floating-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: none;
    background: #1877f2;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.fb-floating-toggle i {
    font-size: 18px;
}

.fb-floating-body {
    height: 460px;
    background: #fff;
}

.fb-floating-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    overflow: hidden;
}

.fb-floating.fb-collapsed .fb-floating-body {
    display: none;
}

@media (max-width: 480px) {
    .fb-floating {
        left: 12px;
        right: 12px;
        width: auto;
        bottom: 12px;
    }

    .fb-floating-body {
        height: 360px;
    }
}
