/* ==========================================================================
   XpressDart Admin Panel Stylesheet
   ========================================================================== */

/* Admin Layout */
.admin-body {
    display: flex;
    min-height: 100vh;
    background-color: #f5f6f8;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

/* Sidebar overlay */
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.admin-sidebar-overlay.active {
    display: block;
}

.admin-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #1b365d;
    text-decoration: none;
}

.admin-sidebar-brand img {
    height: 32px;
}

.admin-sidebar-brand span {
    color: #d40511;
}

.admin-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
}

.admin-nav-section {
    margin-bottom: 20px;
}

.admin-nav-title {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 20px;
    margin-bottom: 4px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s;
    margin: 2px 10px;
    border-radius: 8px;
}

.admin-nav-link:hover {
    background: #f8f9fa;
    color: #1b365d;
}

.admin-nav-link.active {
    background: rgba(212, 5, 17, 0.08);
    color: #d40511;
}

.admin-nav-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.admin-nav-badge {
    background: #d40511;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.admin-topbar {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1001;
}

.admin-mobile-toggle {
    display: none;
    background: #f0f0f0;
    border: none;
    font-size: 24px;
    color: #1b365d;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 8px;
    margin-right: 15px;
}

.admin-mobile-toggle:hover {
    background: #e0e0e0;
}

.admin-mobile-toggle i {
    display: block;
}

.admin-topbar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 8px;
    flex: 1;
    max-width: 400px;
}

.admin-topbar-search i {
    color: #adb5bd;
}

.admin-topbar-search input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-topbar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
}

.admin-topbar-link:hover {
    color: #1b365d;
}

.admin-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #d40511 0%, #1b365d 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.admin-user-info {
    display: flex;
    flex-direction: column;
}

.admin-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #1b365d;
}

.admin-user-role {
    font-size: 12px;
    color: #adb5bd;
}

/* Content Area */
.admin-content {
    padding: 30px;
    flex: 1;
}

/* Page Header */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-page-title {
    font-size: 24px;
    font-weight: 700;
    color: #1b365d;
    margin: 0;
}

.admin-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #adb5bd;
    margin-top: 5px;
}

.admin-breadcrumb a {
    color: #d40511;
    text-decoration: none;
}

.admin-breadcrumb a:hover {
    text-decoration: underline;
}

/* Buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.admin-btn-primary {
    background: #d40511;
    color: #fff;
}

.admin-btn-primary:hover {
    background: #b3040f;
}

.admin-btn-ghost {
    background: transparent;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

.admin-btn-ghost:hover {
    background: #f8f9fa;
    color: #1b365d;
}

/* Cards */
.admin-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.admin-card-header {
    padding: 18px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #fafbfc;
}

.admin-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1b365d;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-card-title i {
    color: #d40511;
}

.admin-card-body {
    padding: 20px;
}

.admin-card-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Badges */
.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
}

.admin-badge-success {
    background: rgba(0, 166, 81, 0.1);
    color: #00a651;
}

.admin-badge-warning {
    background: rgba(255, 185, 0, 0.15);
    color: #cc9700;
}

.admin-badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.admin-badge-info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.admin-badge-primary {
    background: rgba(212, 5, 17, 0.1);
    color: #d40511;
}

.admin-badge-secondary {
    background: #e9ecef;
    color: #6c757d;
}

/* Alerts */
.admin-alert {
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.admin-alert-success {
    background: rgba(0, 166, 81, 0.1);
    color: #00a651;
}

.admin-alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Stats */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.admin-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.admin-stat-icon.primary,
.admin-stat-icon-primary {
    background: rgba(212, 5, 17, 0.1);
    color: #d40511;
}

.admin-stat-icon.success,
.admin-stat-icon-success {
    background: rgba(0, 166, 81, 0.1);
    color: #00a651;
}

.admin-stat-icon.warning,
.admin-stat-icon-warning {
    background: rgba(255, 185, 0, 0.15);
    color: #cc9700;
}

.admin-stat-icon.info,
.admin-stat-icon-info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.admin-stat-icon.danger,
.admin-stat-icon-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.admin-stat-content {
    flex: 1;
}

.admin-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1b365d;
}

.admin-stat-label {
    font-size: 13px;
    color: #adb5bd;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.admin-table th {
    background: #fafbfc;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.admin-tracking-link {
    color: #d40511;
    font-weight: 600;
    text-decoration: none;
}

.admin-tracking-link:hover {
    text-decoration: underline;
}

.admin-btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.admin-btn-icon:hover {
    background: #f0f0f0;
    color: #1b365d;
}

/* Pagination */
.admin-pagination {
    display: flex;
    justify-content: center;
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.admin-pagination-list {
    display: flex;
    gap: 5px;
}

.admin-pagination-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-pagination-item:hover {
    background: #e9ecef;
    color: #1b365d;
}

.admin-pagination-item.active {
    background: #d40511;
    color: #fff;
}

/* Empty State */
.admin-empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #adb5bd;
}

.admin-empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.admin-empty-state p {
    font-size: 16px;
    margin: 0;
}

/* Timeline */
.admin-timeline {
    position: relative;
    padding-left: 30px;
}

.admin-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.admin-timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.admin-timeline-item:last-child {
    padding-bottom: 0;
}

.admin-timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d40511;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #d40511;
}

.admin-timeline-item.active::before {
    background: #00a651;
    box-shadow: 0 0 0 2px #00a651;
}

.admin-timeline-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.admin-timeline-status {
    font-weight: 600;
    color: #1b365d;
    margin-bottom: 5px;
}

.admin-timeline-desc {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 5px;
}

.admin-timeline-time {
    font-size: 12px;
    color: #adb5bd;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1b365d;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #d40511;
    box-shadow: 0 0 0 3px rgba(212, 5, 17, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #d40511;
    box-shadow: 0 0 0 3px rgba(212, 5, 17, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Messages */
.admin-message-item {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.admin-message-item:hover {
    background: #f8f9fa;
}

.admin-message-item.active {
    background: rgba(212, 5, 17, 0.05);
    border-left: 3px solid #d40511;
}

.admin-message-item.unread {
    background: #fafbfc;
}

.admin-message-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #d40511 0%, #1b365d 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.admin-message-content {
    flex: 1;
    min-width: 0;
}

.admin-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.admin-message-name {
    font-weight: 600;
    color: #1b365d;
}

.admin-message-time {
    font-size: 12px;
    color: #adb5bd;
}

.admin-message-preview {
    font-size: 13px;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-message-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    background: #d40511;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 5px;
}

/* Login Page */
.admin-login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1b365d 0%, #0d1b2a 100%);
}

.admin-login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.admin-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.admin-login-logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #d40511 0%, #1b365d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.admin-login-logo i {
    font-size: 32px;
    color: #fff;
}

.admin-login-title {
    font-size: 24px;
    font-weight: 700;
    color: #1b365d;
    margin: 0 0 8px;
}

.admin-login-subtitle {
    font-size: 14px;
    color: #adb5bd;
    margin: 0;
}

.admin-login-form .form-group {
    margin-bottom: 20px;
}

.admin-login-form .form-label {
    font-size: 13px;
    font-weight: 600;
}

.admin-login-form .form-control {
    padding: 14px 16px;
}

.admin-login-form .admin-btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 15px;
}

.admin-login-form .form-group {
    margin-bottom: 20px;
}

.admin-login-form .form-label {
    font-size: 13px;
    font-weight: 600;
}

.admin-login-form .form-control {
    padding: 14px 16px;
}

.admin-login-form .admin-btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 15px;
}

.admin-login-error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

/* Dashboard Quick Links */
.admin-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.admin-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #1b365d;
    transition: all 0.2s;
}

.admin-quick-action:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.admin-quick-action i {
    font-size: 28px;
    color: #d40511;
}

.admin-quick-action span {
    font-size: 13px;
    font-weight: 500;
}

/* Status Colors */
.status-pending { color: #ffc107; }
.status-processing { color: #17a2b8; }
.status-shipped { color: #0dcaf0; }
.status-in-transit { color: #6610f2; }
.status-on-hold { color: #fd7e14; }
.status-arrived { color: #20c997; }
.status-delivered { color: #198754; }
.status-cancelled { color: #dc3545; }
.status-returned { color: #6c757d; }

/* Two Column Grid */
.admin-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 991px) {
    .admin-grid-2col {
        grid-template-columns: 1fr;
    }
}

/* Card Header Link */
.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card-link {
    font-size: 13px;
    color: #d40511;
    text-decoration: none;
    font-weight: 500;
}

.admin-card-link:hover {
    text-decoration: underline;
}

/* Table Actions */
.admin-table-actions {
    display: flex;
    gap: 5px;
}

/* Messages List */
.admin-messages-list {
    display: flex;
    flex-direction: column;
}

/* Nav Stats */
.admin-nav-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    font-size: 13px;
    color: #6c757d;
}

.admin-nav-stat-value {
    margin-left: auto;
    font-weight: 600;
    color: #1b365d;
}

.admin-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
}

.admin-status-dot.admin-status-pending { background: #ffc107; }
.admin-status-dot.admin-status-processing { background: #17a2b8; }
.admin-status-dot.admin-status-shipped { background: #0dcaf0; }
.admin-status-dot.admin-status-in-transit { background: #6610f2; }
.admin-status-dot.admin-status-on-hold { background: #fd7e14; }
.admin-status-dot.admin-status-arrived { background: #20c997; }
.admin-status-dot.admin-status-delivered { background: #198754; }
.admin-status-dot.admin-status-cancelled { background: #dc3545; }
.admin-status-dot.admin-status-returned { background: #6c757d; }

/* Stat Trend */
.admin-stat-trend {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-stat-trend-up {
    background: rgba(0, 166, 81, 0.1);
    color: #00a651;
}

/* Small Button */
.admin-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Print Styles */
@media print {
    .admin-sidebar,
    .admin-topbar,
    .admin-btn,
    .admin-pagination {
        display: none !important;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-content {
        padding: 0;
    }
    
    .admin-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Responsive */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-mobile-toggle {
        display: block;
    }
    
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .admin-content {
        padding: 20px;
    }
    
    .admin-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-topbar-search {
        display: none;
    }
    
    .admin-user-info {
        display: none;
    }
}

/* Gap Utilities */
.g-1 { gap: 0.25rem !important; }
.g-2 { gap: 0.5rem !important; }
.g-3 { gap: 1rem !important; }
.g-4 { gap: 1.5rem !important; }
.g-5 { gap: 3rem !important; }
.gx-1 { column-gap: 0.25rem !important; }
.gx-2 { column-gap: 0.5rem !important; }
.gx-3 { column-gap: 1rem !important; }
.gx-4 { column-gap: 1.5rem !important; }
.gy-1 { row-gap: 0.25rem !important; }
.gy-2 { row-gap: 0.5rem !important; }
.gy-3 { row-gap: 1rem !important; }
.gy-4 { row-gap: 1.5rem !important; }

/* Bootstrap Grid Utilities */
.container, .container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col {
    flex-basis: 0;
    flex-grow: 1;
    max-width: 100%;
}

.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }

@media (min-width: 576px) {
    .col-sm { flex-basis: 0; flex-grow: 1; max-width: 100%; }
    .col-sm-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
    .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-sm-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-sm-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-sm-9 { flex: 0 0 75%; max-width: 75%; }
    .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-sm-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 768px) {
    .col-md { flex-basis: 0; flex-grow: 1; max-width: 100%; }
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 992px) {
    .col-lg { flex-basis: 0; flex-grow: 1; max-width: 100%; }
    .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
    .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Spacing Utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.pb-5 { padding-bottom: 3rem !important; }
.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }
.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

/* Text Utilities */
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }
.text-primary { color: #d40511 !important; }
.text-success { color: #00a651 !important; }
.text-warning { color: #cc9700 !important; }
.text-danger { color: #dc3545 !important; }
.text-muted { color: #adb5bd !important; }
.text-white { color: #fff !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fs-1 { font-size: 2.5rem !important; }
.fs-2 { font-size: 2rem !important; }
.fs-3 { font-size: 1.75rem !important; }
.fs-4 { font-size: 1.5rem !important; }
.fs-5 { font-size: 1.25rem !important; }
.fs-6 { font-size: 1rem !important; }
.small { font-size: 0.875em !important; }

/* Display Utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-inline-flex { display: inline-flex !important; }

/* Flex Utilities */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-stretch { align-items: stretch !important; }
.flex-fill { flex: 1 1 auto !important; }
.flex-grow-0 { flex-grow: 0 !important; }
.flex-grow-1 { flex-grow: 1 !important; }

/* Width/Height Utilities */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

/* Overflow */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }

/* Border Utilities */
.border { border: 1px solid #dee2e6 !important; }
.border-0 { border: 0 !important; }
.rounded { border-radius: 0.25rem !important; }
.rounded-0 { border-radius: 0 !important; }
.rounded-1 { border-radius: 0.25rem !important; }
.rounded-2 { border-radius: 0.5rem !important; }
.rounded-3 { border-radius: 0.75rem !important; }
.rounded-circle { border-radius: 50% !important; }

/* Background Utilities */
.bg-white { background-color: #fff !important; }
.bg-light { background-color: #f8f9fa !important; }
.bg-dark { background-color: #343a40 !important; }
.bg-primary { background-color: #d40511 !important; }
.bg-success { background-color: #00a651 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-info { background-color: #17a2b8 !important; }

/* Progress Bar */
.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}
.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    transition: width 0.6s ease;
}
.bg-success { background-color: #00a651 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-info { background-color: #17a2b8 !important; }
.bg-primary { background-color: #d40511 !important; }

/* Badge */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}
.badge.bg-danger { background-color: #dc3545 !important; color: #fff; }
.badge.bg-success { background-color: #00a651 !important; color: #fff; }
.badge.bg-warning { background-color: #ffc107 !important; color: #000; }
.badge.bg-primary { background-color: #d40511 !important; color: #fff; }

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */

/* Large Tablets */
@media (max-width: 1024px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-grid-2col {
        grid-template-columns: 1fr;
    }
    
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
        height: 100vh;
        overflow-y: auto;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
        width: 100%;
    }
    
    .admin-mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .admin-content {
        padding: 20px;
    }
    
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Container */
    .container {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Admin Layout */
    .admin-content {
        padding: 15px;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .admin-stat-card {
        padding: 15px;
    }
    
    .admin-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .admin-stat-value {
        font-size: 20px;
    }
    
    /* Page Header */
    .admin-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .admin-page-title {
        font-size: 20px;
    }
    
    .admin-breadcrumb {
        font-size: 12px;
    }
    
    /* Cards */
    .admin-card {
        border-radius: 12px;
    }
    
    .admin-card-header {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .admin-card-body {
        padding: 15px;
    }
    
    .admin-card-title {
        font-size: 14px;
    }
    
    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-table {
        font-size: 12px;
        min-width: 600px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-label {
        font-size: 12px;
    }
    
    .form-control,
    .form-select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .admin-card-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .admin-card-footer .btn {
        width: 100%;
    }
    
    /* Buttons */
    .admin-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
    
    .admin-btn-icon {
        width: 32px;
        height: 32px;
    }
    
    /* Messages */
    .admin-message-item {
        padding: 12px 15px;
    }
    
    .admin-message-avatar {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    /* Quick Actions */
    .admin-quick-actions {
        grid-template-columns: 1fr;
    }
    
    /* Filter Form */
    .d-flex.flex-wrap {
        flex-direction: column;
    }
    
    .d-flex.flex-wrap > * {
        width: 100%;
    }
    
    /* Pagination */
    .admin-pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .admin-pagination-item {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    /* Grid */
    .row {
        margin-left: -7.5px;
        margin-right: -7.5px;
    }
    
    [class*="col-"] {
        padding-left: 7.5px;
        padding-right: 7.5px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .admin-content {
        padding: 10px;
    }
    
    .admin-page-title {
        font-size: 18px;
    }
    
    .admin-stat-card {
        padding: 12px;
        flex-direction: column;
        text-align: center;
    }
    
    .admin-stat-trend {
        display: none;
    }
    
    .admin-table {
        font-size: 11px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px 5px;
    }
    
    .admin-tracking-link {
        font-size: 11px;
    }
    
    /* Form Grid */
    [class*="col-md-"],
    [class*="col-lg-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Empty State */
    .admin-empty-state {
        padding: 30px 15px;
    }
    
    .admin-empty-state i {
        font-size: 36px;
    }
    
    .admin-empty-state p {
        font-size: 14px;
    }
    
    /* Messages */
    .admin-message-preview {
        font-size: 12px;
    }
    
    .admin-message-time {
        font-size: 10px;
    }
    
    /* Alerts */
    .admin-alert {
        padding: 12px 15px;
        font-size: 13px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    /* Login */
    .admin-login-card {
        padding: 25px 20px;
        margin: 15px;
        border-radius: 16px;
    }
    
    .admin-login-logo {
        width: 60px;
        height: 60px;
    }
    
    .admin-login-logo i {
        font-size: 28px;
    }
    
    .admin-login-title {
        font-size: 20px;
    }
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    .admin-nav-link:active,
    .admin-btn:active,
    .admin-btn-icon:active {
        opacity: 0.8;
    }
    
    .admin-card:hover {
        transform: none;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .admin-login-card {
        padding: 15px;
        max-width: 400px;
    }
    
    .admin-login-logo {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }
}

/* High Resolution */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .admin-logo img,
    .admin-sidebar-brand img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print */
@media print {
    .admin-sidebar,
    .admin-topbar,
    .admin-btn,
    .admin-pagination,
    .admin-mobile-toggle,
    .print-btn {
        display: none !important;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-content {
        padding: 0;
    }
    
    .admin-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}
