/* ============================================
   Haulivance Shipping - Main Stylesheet
   ============================================ */

/* ---------- Global Styles ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* ---------- Navigation Bar ---------- */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-2px);
    color: #0d6efd !important;
}

.dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ---------- Hero Section ---------- */
.hero-section {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-section .btn {
    margin: 0.5rem;
    padding: 12px 30px;
    font-size: 1.1rem;
    animation: fadeInUp 1s ease 0.4s both;
}

/* ---------- Cards ---------- */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0d6efd;
    border: none;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13,110,253,0.3);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

.btn-danger, .btn-success, .btn-info, .btn-warning {
    border-radius: 5px;
}

/* ---------- Forms ---------- */
.form-control {
    border-radius: 10px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.25);
    border-color: #0d6efd;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ---------- Tables ---------- */
.table-responsive {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #343a40;
    color: white;
    border: none;
    padding: 15px;
    font-weight: 500;
}

.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(13,110,253,0.05);
}

/* ---------- Badges ---------- */
.badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 500;
}

/* ---------- Footer ---------- */
footer {
    margin-top: auto;
}

footer h5 {
    margin-bottom: 1.25rem;
    font-weight: 600;
}

footer a {
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
    text-decoration: underline !important;
}

footer .social-icons a {
    display: inline-block;
    margin-right: 15px;
    transition: transform 0.3s ease;
}

footer .social-icons a:hover {
    transform: translateY(-3px);
}

/* ---------- Chat Styles ---------- */
.chat-container {
    height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    background: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

.message-user {
    background: #0d6efd;
    color: white;
    text-align: right;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message-admin {
    background: #e9ecef;
    color: #333;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

/* ---------- Tracking Progress Steps ---------- */
.track-progress {
    padding: 30px 0;
}

.step {
    text-align: center;
    position: relative;
    cursor: pointer;
}

.step-circle {
    width: 50px;
    height: 50px;
    background: #e9ecef;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.step.active .step-circle {
    background: #0d6efd;
    color: white;
    box-shadow: 0 0 0 5px rgba(13,110,253,0.2);
    transform: scale(1.1);
}

.step.completed .step-circle {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Sidebar Navigation ---------- */
.sidebar {
    min-height: 100vh;
    background-color: #343a40;
    transition: all 0.3s ease;
}

.sidebar a {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar a:hover {
    background-color: #495057;
    border-left-color: #0d6efd;
    padding-left: 25px;
}

.sidebar a.active {
    background-color: #0d6efd;
    border-left-color: #fff;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ---------- Alerts ---------- */
.alert {
    border-radius: 10px;
    border: none;
    animation: fadeIn 0.5s ease;
}

/* ---------- Dashboard Stats Cards ---------- */
.stat-card {
    border-radius: 15px;
    padding: 20px;
    color: white;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
}

.stat-card p {
    margin-bottom: 0;
    opacity: 0.9;
}

/* ---------- Modal Styles ---------- */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background-color: #343a40;
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* ---------- Responsive Design ---------- */
@media (max-width: 1200px) {
    .hero-section h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.3rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 60vh !important;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .step {
        font-size: 10px;
    }
    
    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    .message {
        max-width: 95%;
    }
    
    .sidebar {
        min-height: auto;
    }
    
    .table-responsive {
        font-size: 12px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 8px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 6px 15px;
        font-size: 0.85rem;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    footer {
        text-align: center;
    }
    
    footer .text-md-end {
        text-align: center !important;
        margin-top: 1rem;
    }
}

/* ---------- Print Styles for Invoice ---------- */
@media print {
    .navbar,
    .sidebar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        padding: 20px;
    }
}

/* ---------- Loading Spinner ---------- */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ---------- Utility Classes ---------- */
.cursor-pointer {
    cursor: pointer;
}

.text-justify {
    text-align: justify;
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ---------- Dashboard Widgets ---------- */
.widget {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* ---------- Contact Page Map Placeholder ---------- */
.map-placeholder {
    background: #e9ecef;
    height: 300px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* ---------- Invoice Styles ---------- */
.invoice-box {
    max-width: 800px;
    margin: auto;
    padding: 30px;
    border: 1px solid #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    font-size: 16px;
    line-height: 24px;
    font-family: 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
    color: #555;
}

.invoice-box table {
    width: 100%;
    line-height: inherit;
    text-align: left;
}

.invoice-box table td {
    padding: 5px;
    vertical-align: top;
}

.invoice-box table tr td:nth-child(2) {
    text-align: right;
}

.invoice-box table tr.top table td {
    padding-bottom: 20px;
}

.invoice-box table tr.top table td.title {
    font-size: 45px;
    line-height: 45px;
    color: #333;
}

.invoice-box table tr.information table td {
    padding-bottom: 40px;
}

.invoice-box table tr.heading td {
    background: #eee;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}

.invoice-box table tr.details td {
    padding-bottom: 20px;
}

.invoice-box table tr.item td {
    border-bottom: 1px solid #eee;
}

.invoice-box table tr.item.last td {
    border-bottom: none;
}

.invoice-box table tr.total td:nth-child(2) {
    border-top: 2px solid #eee;
    font-weight: bold;
}