/* Path: delivery\assets\css\style.css */
/* delivery/assets/css/style.css */

/* Base Styles */
:root {
    --primary: #f6c445;
    --primary-dark: #2b2b2b;
    --secondary: #6c757d;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #e9ecef;
    
    --sidebar-width: 250px;
    --sidebar-width-collapsed: 60px;
    --header-height: 60px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 22px;
    margin-top: 15px;
    color: var(--dark);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-control {
    height: 50px;
    border-radius: 5px;
}

.login-form .input-group-text {
    background: var(--light);
    border-right: none;
}

.login-form .form-control {
    border-left: none;
}

/* Dashboard Layout */
.delivery-dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

.sidebar-header {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--gray);
    height: var(--header-height);
}

.sidebar-header .logo {
    height: 40px;
}

.sidebar-header .logo-text {
    font-weight: bold;
    margin-left: 10px;
    font-size: 18px;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    padding: 15px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    border-radius: 0 30px 30px 0;
}

.nav-item i {
    min-width: 30px;
    text-align: center;
    font-size: 18px;
}

.nav-item .nav-text {
    margin-left: 10px;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-item:hover {
    background: var(--gray);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-divider {
    height: 1px;
    background: var(--gray);
    margin: 15px 15px;
}

.nav-item.logout {
    margin-top: auto;
    color: var(--danger);
}

.nav-item.logout:hover {
    background: var(--danger);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
    padding-top: calc(var(--header-height) + 20px);
    transition: margin-left 0.3s ease;
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-width-collapsed);
}

/* Header */
.delivery-header {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 900;
    transition: left 0.3s ease;
}

body.sidebar-collapsed .delivery-header {
    left: var(--sidebar-width-collapsed);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.toggle-sidebar {
    display: none;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info i {
    font-size: 20px;
    margin-right: 8px;
}

.header-actions {
    display: flex;
    align-items: center;
}

/* Content Styling */
.content-header {
    margin-bottom: 25px;
}

.content-header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Filter Bar */
.filter-bar {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

/* Cards */
.order-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.order-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-body {
    padding: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark);
}

.section-title i {
    margin-right: 5px;
    color: var(--primary);
}

.info-content {
    background: var(--light);
    border-radius: 8px;
    padding: 15px;
}

.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

/* Item List */
.items-list {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.item-row {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.item-row:last-child {
    border-bottom: none;
}

.item-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 5px;
    margin-right: 15px;
}

.item-image-placeholder {
    width: 50px;
    height: 50px;
    background: #eee;
    border-radius: 5px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 600;
    margin-bottom: 3px;
}

.item-boutique, .item-quantity, .item-price {
    font-size: 14px;
    color: #666;
}

/* Progress Steps */
.progress-steps {
    margin-top: 10px;
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
    color: var(--secondary);
}

.step.completed .step-icon {
    color: var(--success);
}

.step-label {
    font-size: 12px;
    color: var(--secondary);
}

.step.completed .step-label {
    color: var(--dark);
}

/* Timeline (History) */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray);
    left: 20px;
}

.timeline-date {
    position: relative;
    margin-bottom: 30px;
    margin-left: 45px;
}

.timeline-date span {
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    margin-left: 45px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.timeline-marker {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    left: -45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.timeline-marker.pickup {
    background: var(--info);
}

.timeline-marker.delivery {
    background: var(--success);
}

.timeline-marker.return {
    background: var(--warning);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.timeline-header h5 {
    font-size: 16px;
    margin: 0;
}

.timeline-header .time {
    font-size: 14px;
    color: #666;
}

.timeline-body {
    color: #666;
}

/* Stats Section */
.stats-section {
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 20px;
    height: 100%;
}

.stat-icon {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 15px;
}

.stat-icon.success {
    color: var(--success);
}

.stat-icon.info {
    color: var(--info);
}

.stat-icon.warning {
    color: var(--warning);
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
}

.metric-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 15px;
    height: 100%;
}

.metric-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 20px;
    font-weight: bold;
}

/* Profile Page */
.profile-container {
    max-width: 700px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.profile-avatar {
    margin-right: 20px;
    color: var(--primary);
}

.profile-info h4 {
    margin: 0;
    margin-bottom: 5px;
}

.password-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray);
}
.notification-alert {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: 20px;
    max-width: 350px;
    z-index: 1050;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    animation: slide-in-right 0.3s ease-out forwards;
}
/* Collapsible Card Sections */
.collapsible-section {
    margin-bottom: 15px;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.collapsible-header:hover {
    background-color: #e9ecef;
}

.collapsible-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.collapsible-header .toggle-icon {
    transition: transform 0.3s ease;
}

.collapsible-header .toggle-icon.rotated {
    transform: rotate(180deg);
}

.collapsible-content {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.collapsible-content.expanded {
    padding: 15px;
    max-height: 1000px; /* Arbitrary large height */
    overflow: visible;
}

/* Updated Card Styling */
.order-card {
    transition: box-shadow 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.order-header {
    cursor: pointer;
}

/* Compact Item List */
.items-list.compact .item-row {
    padding: 8px 10px;
}

.items-list.compact .item-image,
.items-list.compact .item-image-placeholder {
    width: 40px;
    height: 40px;
}

/* Badge Styling */
.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Collapsible Section CSS */
.collapsible-section {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.collapsible-header:hover {
    background-color: #e9ecef;
}

.collapsible-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.collapsible-header .toggle-icon {
    transition: transform 0.3s ease;
}

.collapsible-header .toggle-icon.rotated {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.collapsible-content.expanded {
    padding: 15px;
    max-height: 1000px; /* Arbitrary large height */
    overflow: visible;
}

/* Order Card Header */
.order-card {
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.order-header {
    cursor: pointer;
    position: relative;
}

.order-header .collapse-indicator {
    transition: transform 0.3s ease;
}

.order-header.collapsed .collapse-indicator {
    transform: rotate(180deg);
}

/* Compact Item List */
.items-list.compact .item-row {
    padding: 6px 10px;
}

.items-list.compact .item-image,
.items-list.compact .item-image-placeholder {
    width: 40px;
    height: 40px;
}

.items-list.compact .item-details {
    font-size: 0.9rem;
}

/* Badge Styling */
.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Mobile Sidebar  */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-width-collapsed);
        position: fixed;
        z-index: 1050;
    }
    
    .sidebar .logo-text {
        display: none;
    }
    
    .sidebar .nav-text {
        display: none;
    }
    
    .main-content {
        margin-left: var(--sidebar-width-collapsed) !important;
    }
    
    .delivery-header {
        left: var(--sidebar-width-collapsed) !important;
    }
    
    /* Hide the toggle button since we don't need it */
    .toggle-sidebar {
        display: none;
    }
}

/* Animation for notification alerts */
@keyframes slide-in-right {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}