/* Custom styles for Shipping Management System */

/* Variables */
:root {
    --primary-color: #ff6b9d;
    --primary-dark: #e0487b;
    --primary-light: #ffd0e0;
    --secondary-color: #9b4f7f;
    --accent-color: #f2c4d8;
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-light: #fef5f9;
    --background-dark: #fbe2ec;
    --shadow: 0 4px 10px rgba(255, 107, 157, 0.15);
}

/* Test style to verify CSS is loading */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    z-index: 9999;
}

/* General Styles */
body {
    background-color: var(--background-light);
    color: var(--text-dark);
    font-family: 'Poppins', 'Segoe UI', Roboto, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main content wrapper */
.container.flex-grow-1 {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Ensure content inside flex container expands */
.container.flex-grow-1 > * {
    flex-shrink: 0;
}

/* Footer styles */
footer {
    margin-top: auto;
    background-color: var(--background-dark) !important;
    border-top: 1px solid var(--primary-light);
    box-shadow: 0 -2px 10px rgba(255, 107, 157, 0.1);
}

.container {
    max-width: 1200px;
}

/* Card Styles */
.card {
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border-radius: 12px;
    border: none;
    background-color: #ffffff;
    overflow: hidden;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(255, 107, 157, 0.2);
}

.card-header {
    padding: 1rem 1.5rem;
    background-color: #ffffff;
    border-bottom: 1px solid var(--primary-light);
    font-weight: 600;
    color: var(--primary-dark);
}

/* Dashboard Cards */
.dashboard-card {
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, #ffffff, var(--background-light));
    flex-shrink: 0;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, #ffffff, var(--accent-color));
}
/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="courier-pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/><rect x="0" y="0" width="20" height="20" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23courier-pattern)"/></svg>');
    opacity: 0.3;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 0;
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    background: linear-gradient(135deg, #ff6b9d, #9b4f7f);
    color: white;
    padding: 2rem;
    text-align: center;
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: white;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 2;
}

.login-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0.5rem 0 0;
    position: relative;
    z-index: 2;
}

.login-body {
    padding: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.login-form .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-form .input-group {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.login-form .input-group:focus-within {
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.2);
    transform: translateY(-2px);
}

.login-form .input-group-text {
    background: linear-gradient(135deg, #ff6b9d, #9b4f7f);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
}

.login-form .form-control {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.login-form .form-control:focus {
    background: white;
    box-shadow: none;
    outline: none;
}

.login-form .toggle-password {
    background: #f8f9fa;
    border: none;
    color: #6c757d;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.login-form .toggle-password:hover {
    background: #e9ecef;
    color: #ff6b9d;
}

.login-btn {
    background: linear-gradient(135deg, #ff6b9d, #9b4f7f);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.3);
    width: 100%;
    margin-top: 1rem;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 157, 0.4);
    background: linear-gradient(135deg, #e0487b, #8a4670);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.login-footer small {
    color: #6c757d;
    font-size: 0.85rem;
}

.courier-icons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    opacity: 0.1;
}

.courier-icons i {
    font-size: 2rem;
    color: #ff6b9d;
    animation: bounce 2s infinite;
}

.courier-icons i:nth-child(2) {
    animation-delay: 0.5s;
}

.courier-icons i:nth-child(3) {
    animation-delay: 1s;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@media (max-width: 576px) {
    .login-container {
        padding: 10px;
    }
    
    .login-card {
        margin: 10px;
    }
    
    .login-header {
        padding: 1.5rem;
    }
    
    .login-body {
        padding: 1.5rem;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
}
/* Navigation */
.navbar {
    box-shadow: var(--shadow);
    background-color: #ffffff;
    padding: 1rem 1.5rem;
}

.navbar-brand {
    font-weight: bold;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary-dark) !important;
}

nav .logo-navbar, .navbar .logo-navbar, .logo-navbar {
    height: 40px !important;
    max-height: 48px !important;
    width: auto !important;
    max-width: 160px !important;
    object-fit: contain !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
    padding: 2px 6px !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* User logo in navbar */
.navbar-user-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-user-logo:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(255, 107, 157, 0.3);
}

.navbar .dropdown-toggle::after {
    margin-left: 0.5rem;
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: var(--shadow);
    border-radius: 12px;
    padding: 0.5rem 0;
}

.navbar .dropdown-item {
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.5rem;
}

.navbar .dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* Buttons */
.btn {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(224, 72, 123, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--text-light);
    color: var(--text-light);
}

/* Tables */
.table {
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: -8px;
}

.table th {
    background-color: var(--background-dark);
    font-weight: 600;
    color: var(--primary-dark);
    border: none;
    padding: 12px 15px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-top: none;
    background-color: #ffffff;
    box-shadow: var(--shadow);
}

.table tbody tr {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 10px;
}

.table-hover tbody tr:hover {
    background-color: var(--primary-light);
    transform: scale(1.01);
}

.table-hover tbody tr:hover td {
    background-color: var(--background-light);
}

/* Forms */
.form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 157, 0.25);
    background-color: var(--background-light);
}

.form-label {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-dark);
}

/* Custom Badge Colors */
.badge {
    padding: 0.5rem 0.8rem;
    font-weight: 500;
    border-radius: 20px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge.bg-shipped {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.badge.bg-consolidated {
    background-color:  rgba(var(--bs-success-rgb));
    color: var(--text-light);
}

.badge.bg-success {
    background-color: #4CAF50;
}

.badge.bg-warning {
    background-color: #FFC107;
    color: var(--text-dark);
}

.badge.bg-danger {
    background-color: #F44336;
}

/* Shipping Label & Receipt */
.shipping-label, .receipt {
    font-family: 'Poppins', Arial, sans-serif;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.barcode {
    font-family: "Courier New", monospace;
    text-align: center;
    padding: 15px;
    margin: 15px 0;
    border: 1px dashed var(--primary-color);
    background-color: var(--background-light);
    border-radius: 8px;
}

/* Print styles */
@media print {
    header,
    .navbar,
    footer,
    .sidebar,
    .main-menu,
    .print-hide,
    .site-header,
    .site-footer {
        display: none !important;
        height: 0 !important;
        visibility: hidden !important;
    }
    body {
        background: #fff !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-title {
        font-size: 1.1rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }

    .navbar {
        padding: 0.75rem 1rem;
    }

    .btn {
        padding: 0.4rem 1.2rem;
        font-size: 0.85rem;
    }

    .table th, .table td {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* Additional modern elements */
.section-title {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--primary-dark);
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 50px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 20px;
}

/* Stats cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.stats-card .stat-icon {
    font-size: 3rem;
    opacity: 0.5;
    position: absolute;
    right: 20px;
    top: 20px;
}

.stats-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Pagination */
.pagination .page-item .page-link {
    color: var(--primary-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    border: none;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.pagination .page-item .page-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

/* Make sure cards and tables don't overflow */
.card, .table-responsive {
    flex-shrink: 0;
}

/* Ensure table-responsive works well with flexbox */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Table Filtering, Sorting, Pagination and Search Styles */
.table-controls {
    background: linear-gradient(135deg, var(--background-light), #ffffff);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--primary-light);
}

.table-controls .row {
    align-items: end;
}

.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 2.5rem;
    border-radius: 25px;
    border: 2px solid var(--primary-light);
    transition: all 0.3s ease;
}

.search-box .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 157, 0.25);
}

.search-box .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    z-index: 2;
}

.filter-select {
    border-radius: 25px;
    border: 2px solid var(--primary-light);
    transition: all 0.3s ease;
    background: white;
}

.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 157, 0.25);
}

.sort-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sort-btn {
    background: var(--primary-light);
    border: 2px solid var(--primary-light);
    color: var(--primary-dark);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sort-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.sort-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.sort-btn .sort-icon {
    transition: transform 0.3s ease;
}

.sort-btn.asc .sort-icon {
    transform: rotate(180deg);
}

.table-info {
    background: var(--background-light);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.table-info .results-count {
    color: var(--primary-dark);
    font-weight: 600;
}

.table-info .export-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.table-info .export-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 12px;
    border: 1px solid var(--primary-light);
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--primary-dark);
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-size-select {
    border-radius: 20px;
    border: 2px solid var(--primary-light);
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    background: white;
}

.pagination {
    margin: 0;
    gap: 0.25rem;
}

.pagination .page-item .page-link {
    border-radius: 20px;
    border: 2px solid var(--primary-light);
    color: var(--primary-dark);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    background: white;
}

.pagination .page-item .page-link:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.disabled .page-link {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
}

/* Responsive adjustments for table controls */
@media (max-width: 768px) {
    .table-controls {
        padding: 1rem;
    }
    
    .table-controls .row > div {
        margin-bottom: 1rem;
    }
    
    .sort-controls {
        flex-wrap: wrap;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .pagination {
        justify-content: center;
    }
}

/* Animation for table rows */
.table tbody tr {
    animation: fadeInUp 0.3s ease;
}

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

/* Loading state for tables */
.table-loading {
    position: relative;
    min-height: 200px;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Resaltado visual para el nav-link activo */
.nav-link.active, .nav-link.active:focus, .nav-link.active:hover {
    background-color: var(--primary-light) !important;
    color: var(--primary-dark) !important;
    font-weight: bold;
    border-bottom: 3px solid var(--primary-color);
    border-radius: 20px 20px 0 0;
}

