/* Compact Layout Styles for BLS Courier System */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.3;
    font-size: 13px;
}

/* Layout Container */
.layout-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 200px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    transition: width 0.2s ease;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.sidebar-header .subtitle {
    font-size: 0.7rem;
    opacity: 0.8;
}

.sidebar-nav {
    padding: 10px 0;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    font-size: 13px;
}

.nav-link:hover,
.nav-link.active {
    background-color: #34495e;
    color: white;
    border-left-color: #3498db;
}

.nav-link i {
    margin-right: 10px;
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .sidebar-header .subtitle {
    display: none;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 200px;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.2s ease;
}

.main-content.expanded {
    margin-left: 60px;
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 8px 20px;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.toggle-sidebar {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1rem;
    margin-right: 10px;
    cursor: pointer;
    padding: 6px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.toggle-sidebar:hover {
    background-color: #f8f9fa;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 12px;
    color: #495057;
}

.user-role {
    font-size: 11px;
    color: #6c757d;
}

.balance-info {
    background: #27ae60;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 11px;
}

.quick-actions {
    display: flex;
    gap: 5px;
}

.btn-icon {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.9rem;
    padding: 6px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: #f8f9fa;
    color: #495057;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 15px;
    max-width: 100%;
    overflow-x: auto;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.card-icon {
    width: 35px;
    height: 35px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 1rem;
}

.card-icon.primary { background: #3498db; color: white; }
.card-icon.success { background: #27ae60; color: white; }
.card-icon.warning { background: #f39c12; color: white; }
.card-icon.info { background: #95a5a6; color: white; }

.card-title {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 2px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 2px;
}

.card-subtitle {
    font-size: 0.7rem;
    color: #6c757d;
}

/* Recent Shipments */
.recent-shipments {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.recent-shipments-header {
    padding: 12px 15px;
    background: #34495e;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recent-shipments-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.view-all-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: white;
}

/* Filters Section */
.filters-section {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 3px;
}

.filter-input {
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
    transition: border-color 0.2s ease;
    height: 32px;
}

.filter-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25);
}

.btn-filter {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    height: 32px;
}

.btn-filter:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-clear {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    height: 32px;
}

.btn-clear:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Data Tables */
.data-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table thead th {
    background: #f8f9fa;
    padding: 8px 6px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.data-table tbody td {
    padding: 6px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Status Badges */
.status-badge {
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-collected { background: #d1ecf1; color: #0c5460; }
.status-in_transit { background: #fff3cd; color: #856404; }
.status-out_for_delivery { background: #d4edda; color: #155724; }
.status-delivered { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }
.status-active { background: #d4edda; color: #155724; }
.status-inactive { background: #f8d7da; color: #721c24; }

/* Action Buttons */
.action-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.8rem;
    padding: 4px 6px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 3px;
}

.action-btn:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.action-btn.view { color: #17a2b8; }
.action-btn.edit { color: #ffc107; }
.action-btn.delete { color: #dc3545; }

/* Bootstrap Component Overrides for Compact Design */

/* Cards */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 600;
}

.card-body {
    padding: 15px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Tables */
.table {
    font-size: 12px;
    margin-bottom: 0;
}

.table th {
    padding: 8px 12px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.table td {
    padding: 8px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Buttons */
.btn {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-sm {
    font-size: 11px;
    padding: 4px 8px;
    height: 28px;
}

.btn-lg {
    font-size: 13px;
    padding: 8px 16px;
    height: 36px;
}

/* Form Controls */
.form-control {
    font-size: 12px;
    padding: 6px 8px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25);
}

.form-select {
    font-size: 12px;
    padding: 6px 8px;
    height: 32px;
    border-radius: 4px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #495057;
}

/* Text Areas */
textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

/* Alerts */
.alert {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
}

/* Permanent alerts - won't auto-dismiss */
.alert-permanent {
    /* No fade class, stays visible */
}

/* Badges */
.badge {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Modal */
.modal-content {
    border-radius: 8px;
}

.modal-header {
    padding: 12px 15px;
}

.modal-body {
    padding: 15px;
}

.modal-footer {
    padding: 12px 15px;
}

.modal-title {
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    font-size: 12px;
}

.pagination .page-link {
    padding: 6px 8px;
}

/* Dropdown */
.dropdown-menu {
    font-size: 12px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.dropdown-item {
    padding: 6px 12px;
}

/* Nav Tabs */
.nav-tabs {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 15px;
}

.nav-tabs .nav-link {
    font-size: 13px;
    padding: 8px 16px;
    color: #495057;
    border: 1px solid transparent;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: 600;
}

/* Tab Content Visibility */
.tab-content {
    display: block;
}

.tab-pane {
    display: none;
}

.tab-pane.active,
.tab-pane.show.active {
    display: block !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 200px;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .top-bar {
        padding: 6px 12px;
        height: 45px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .filters-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .data-table-container {
        overflow-x: auto;
    }

    .data-table {
        min-width: 600px;
    }
}

@media (max-width: 576px) {
    .content-area {
        padding: 10px;
    }

    .dashboard-card {
        padding: 12px;
    }

    .top-bar-right {
        gap: 8px;
    }

    .user-details {
        display: none;
    }

    .balance-info {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.login-container {
    max-width: 440px;
    width: 100%;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

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

.login-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db 0%, #2ecc71 100%);
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.login-logo i {
    font-size: 2.5rem;
    color: white;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
}

.login-header .subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    color: #ecf0f1;
    font-weight: 400;
}

.login-body {
    padding: 2.5rem 2rem;
}

.login-form .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

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

.login-form .input-group-text {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-right: 0;
    color: #6c757d;
    width: 45px;
    justify-content: center;
    border: 1px solid #ced4da;
}

.login-form .form-control {
    border-left: 0;
    font-size: 0.95rem;
    padding: 0.6rem 0.75rem;
    height: auto;
}

.login-form .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.login-form .input-group:focus-within .input-group-text {
    border-color: #3498db;
    color: #3498db;
}

.btn-login {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-login:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
    font-size: 0.8rem;
    color: #6c757d;
}

.login-footer i {
    color: #27ae60;
    margin-right: 5px;
}

.login-alert {
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

/* Login page responsive */
@media (max-width: 576px) {
    .login-container {
        padding: 15px;
    }
    
    .login-header {
        padding: 2rem 1.5rem;
    }
    
    .login-logo {
        width: 70px;
        height: 70px;
    }
    
    .login-logo i {
        font-size: 2rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .login-body {
        padding: 2rem 1.5rem;
    }
}
