/* Basic styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


.logo_main {
    width: 80px;
    height: 80px;
    margin-right: 10px;
    background-image: url(../images/logo.png);
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 10px 15px !important;
    transition: all 0.3s ease;
    margin: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.navbar .nav-link {
    flex-direction: column;
    text-align: center;
}

.navbar .nav-link i {
    margin-right: 0;
}

.nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.nav-link.active {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

/* Container */
.container {
    max-width: 1200px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Page header improvements */
h1 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h1 i {
    vertical-align: middle;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0 !important;
}

.card-title {
    font-weight: 600;
    color: #2a5298;
    margin: 0;
    font-size: 1.1rem;
}

.card-body {
    padding: 20px;
}

/* Equal height cards */
.h-100 {
    height: 100%;
}

.card.h-100 .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
    white-space: nowrap;
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #2a5298;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

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

.table tbody td {
    vertical-align: middle;
}

/* Machines table improvements */
.machines-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 10px;
    padding: 12px 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
}

.machines-toolbar__left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.machines-count {
    font-weight: 600;
    color: #2a5298;
}

.machines-subcount {
    font-size: 0.85rem;
    color: #6c757d;
}

.machines-toolbar__right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.machines-search {
    min-width: 260px;
}

.machines-filter {
    min-width: 160px;
}

.machines-table {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: auto;
    max-height: 600px;
}

.machines-table .table {
    margin-bottom: 0;
    min-width: 1800px;
}

.machines-table thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.machines-table th,
.machines-table td {
    height: 56px;
    max-height: 56px;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.machine-details summary {
    cursor: pointer;
    color: #2a5298;
    font-weight: 600;
    list-style: none;
}

.machine-details summary::-webkit-details-marker {
    display: none;
}

.machine-details pre {
    margin-top: 8px;
    max-width: 320px;
    max-height: 240px;
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.75rem;
    color: #495057;
}

.machine-json-inline {
    max-width: 260px;
    max-height: 160px;
    margin: 0;
    padding: 8px;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.7rem;
    color: #495057;
    overflow: auto;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.media-grid__item {
    min-width: 0;
}

.machines-table tbody tr:nth-child(even) {
    background-color: #fbfcfe;
}

@media (min-width: 768px) {
    .machines-table .machines-col-extended {
        display: none;
    }
}

.machines-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.dashboard-chart-wrap {
    position: relative;
    width: 100%;
    height: 280px;
}

@media (max-width: 768px) {
    .dashboard-chart-wrap {
        height: 230px;
    }
}

/* Transactions UI improvements */
.transactions-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 10px;
    padding: 12px 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
}

.transactions-toolbar__left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.transactions-count {
    font-weight: 600;
    color: #2a5298;
}

.transactions-subcount {
    font-size: 0.85rem;
    color: #6c757d;
}

.transactions-toolbar__right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.transactions-search {
    min-width: 260px;
}

.transactions-filter,
.transactions-page-size {
    min-width: 160px;
}

.transactions-table {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.transactions-table .table {
    margin-bottom: 0;
}

.transactions-table thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 1;
}

.transactions-table tbody tr:nth-child(even) {
    background-color: #fbfcfe;
}

.transactions-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transactions-empty {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    color: #6c757d;
}

.transactions-empty i {
    font-size: 2.5rem;
    color: #dee2e6;
    margin-bottom: 12px;
}

/* Shared data list styles */
.data-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 10px;
    padding: 12px 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
}

.data-toolbar__left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.data-count {
    font-weight: 600;
    color: #2a5298;
}

.data-subcount {
    font-size: 0.85rem;
    color: #6c757d;
}

.data-toolbar__right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.data-search {
    min-width: 260px;
}

.data-filter,
.data-page-size {
    min-width: 160px;
}

.data-table {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.data-table .table {
    margin-bottom: 0;
}

.data-table thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 1;
}

.data-table tbody tr:nth-child(even) {
    background-color: #fbfcfe;
}

.data-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-empty {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    color: #6c757d;
}

.data-empty i {
    font-size: 2.5rem;
    color: #dee2e6;
    margin-bottom: 12px;
}

/* Status pills */
.status-cell {
    min-width: 260px;
}

.status-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f1f3f5;
    color: #495057;
    white-space: nowrap;
}

.status-pill i {
    font-size: 0.5rem;
}

.status-pill--success {
    background: #d4edda;
    color: #155724;
}

.status-pill--warning {
    background: #fff3cd;
    color: #856404;
}

.status-pill--danger {
    background: #f8d7da;
    color: #721c24;
}

.status-pill--muted {
    background: #e2e3e5;
    color: #6c757d;
}

.machines-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.machines-empty {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    color: #6c757d;
}

.machines-empty i {
    font-size: 2.5rem;
    color: #dee2e6;
    margin-bottom: 12px;
}

/* Action buttons in tables */
.table .btn-group {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.table .btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
    margin: 2px;
}

/* Buttons */
.btn {
    border-radius: 5px;
    font-weight: 500;
    padding: 8px 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(42, 82, 152, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(32, 201, 151, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb347 100%);
    border: none;
    color: #000;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ffb347 0%, #ffc107 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
    color: #000;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%);
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #dc3545 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-outline-primary {
    border-color: #2a5298;
    color: #2a5298;
}

.btn-outline-primary:hover {
    background-color: #2a5298;
    border-color: #2a5298;
    color: white;
}

/* Responsive button utilities */
.w-md-auto {
    width: 100%;
}

@media (min-width: 768px) {
    .w-md-auto {
        width: auto !important;
    }
}

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

.form-control:focus, .form-select:focus {
    border-color: #2a5298;
    box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.25);
}

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

/* Alerts */
.alert {
    border: none;
    border-radius: 5px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    animation: slideInDown 0.3s ease-out;
}

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

.alert i {
    margin-right: 10px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Bootstrap badge background utilities */
.bg-info {
    background-color: #17a2b8 !important;
    color: white !important;
}

.bg-success {
    background-color: #28a745 !important;
    color: white !important;
}

.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.bg-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

/* Progress Bars */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 5px;
}

/* Login styles */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

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

.login-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 30px;
    text-align: center;
    color: white;
}

.login-header h2 {
    font-weight: 700;
    margin: 0;
    font-size: 1.5rem;
}

.login-header p {
    margin-top: 10px;
    margin-bottom: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.login-header .logo_main {
    display: inline-block !important;
    margin: 0 auto 10px;
}

.login-body {
    padding: 30px;
}

.login-footer {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    color: #6c757d;
    font-size: 0.9rem;
}

@media (max-width: 575.98px) {
    .login-card {
        margin: 10px;
    }

    .login-header {
        padding: 20px 15px;
    }

    .login-header h2 {
        font-size: 1.2rem;
    }

    .login-header p {
        font-size: 0.85rem;
    }

    .login-body {
        padding: 20px 15px;
    }

    .login-footer {
        padding: 15px;
        font-size: 0.8rem;
    }
}

/* Loading spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2a5298;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: #495057;
    margin-bottom: 10px;
}

/* Media Card Styles */
.media-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.media-card .media-thumbnail {
    transition: transform 0.3s ease;
}

.media-card:hover .media-thumbnail {
    transform: scale(1.05);
}

.media-card .card-body {
    padding: 15px;
}

.media-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2a5298;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-card .btn-group,
.media-card .d-grid {
    margin-top: 10px;
}

/* Modal improvements */
.modal-content {
    border-radius: 10px;
    overflow: hidden;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.modal-title {
    color: #2a5298;
    font-weight: 600;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Machine Status Card (Mobile) */
.machine-status-card {
    border-left: 4px solid #2a5298;
    transition: all 0.3s ease;
}

.machine-status-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.machine-status-card .card-body {
    padding: 15px;
}

.machine-status-card h6 {
    color: #2a5298;
    font-weight: 600;
    margin-bottom: 5px;
}

.machine-status-card .badge {
    font-size: 0.75rem;
    padding: 4px 10px;
}

/* Transaction Card (Mobile) */
.transaction-card {
    border-left: 4px solid #17a2b8;
    transition: all 0.3s ease;
}

.transaction-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.transaction-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 10px 15px;
}

.transaction-card .card-body {
    padding: 15px;
}

.transaction-card h6 {
    color: #2a5298;
    font-weight: 600;
    margin-bottom: 5px;
}

.transaction-card .row {
    font-size: 0.9rem;
}

.transaction-card small {
    display: block;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 3px;
}

.transaction-card p, .transaction-card strong {
    font-size: 0.95rem;
    color: #333;
}

.transaction-card .badge {
    font-size: 0.75rem;
    padding: 4px 10px;
}

.transaction-card .text-primary {
    font-size: 1rem;
    font-weight: 600;
}

.transaction-card .text-muted {
    font-size: 0.85rem;
}

/* Machine Info Card (Mobile) */
.machine-info-card {
    border-left: 4px solid #2a5298;
    transition: all 0.3s ease;
}

.machine-info-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.machine-info-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 12px 15px;
}

.machine-info-card .card-body {
    padding: 15px;
}

.machine-info-card h6 {
    color: #2a5298;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1rem;
}

.machine-info-card .row {
    font-size: 0.9rem;
}

.machine-info-card small {
    display: block;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 3px;
}

.machine-info-card p {
    font-size: 0.95rem;
    color: #333;
}

.machine-info-card .badge {
    font-size: 0.75rem;
    padding: 4px 10px;
}

.machine-info-card .btn {
    font-size: 0.85rem;
    padding: 6px 12px;
}

/* Card header flex improvements */
.machine-info-card .card-header .d-flex {
    gap: 1rem;
}

@media (max-width: 575.98px) {
    .machine-info-card .card-header .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Summary Card (Mobile) */
.summary-card {
    border-left: 4px solid #2a5298;
    transition: all 0.3s ease;
}

.summary-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.summary-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 12px 15px;
}

.summary-card .card-body {
    padding: 15px;
}

.summary-card h6 {
    color: #2a5298;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1rem;
}

.summary-card .row {
    font-size: 0.9rem;
}

.summary-card small {
    display: block;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 3px;
}

.summary-card p {
    font-size: 0.95rem;
    color: #333;
}

.summary-card .badge {
    font-size: 0.75rem;
    padding: 4px 10px;
}

.summary-card .fs-6 {
    font-size: 1rem !important;
}

/* Gap utility for flex */
.gap-2 {
    gap: 0.5rem;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-3 {
    gap: 1rem;
}

/* Flex fill utility */
.flex-fill {
    flex: 1 1 auto;
}

/* Responsive gap utility */
@media (max-width: 575.98px) {
    .gap-1 {
        gap: 0.35rem !important;
    }
    
    .gap-2 {
        gap: 0.5rem !important;
    }
    
    /* Make buttons full width on mobile in d-grid */
    .d-grid .btn {
        width: 100%;
    }
}

/* Gutter spacing for grid */
.g-2 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

.g-2 > * {
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
}

/* Badge spacing */
.badge.me-1 {
    margin-right: 0.25rem;
}

.badge.mb-1 {
    margin-bottom: 0.25rem;
}

.badge.me-2 {
    margin-right: 0.5rem;
}

/* Text utilities */
.text-primary {
    color: #2a5298 !important;
}

/* Margin utilities */
.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

/* Icon spacing */
i.me-1 {
    margin-right: 0.25rem;
}

i.me-2 {
    margin-right: 0.5rem;
}

/* Flex utilities */
.d-flex {
    display: flex !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-start {
    align-items: flex-start !important;
}

.align-items-center {
    align-items: center !important;
}

/* Grid utilities */
.row.g-2 {
    margin-right: -0.25rem;
    margin-left: -0.25rem;
}

.row.g-2 > * {
    padding-right: 0.25rem;
    padding-left: 0.25rem;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-12 {
 

.text-nowrap {
    white-space: nowrap !important;
}

/* Justify content utilities */
.justify-content-md-end {
    justify-content: flex-end !important;
}

/* d-md-flex utility */
.d-md-flex {
    display: flex !important;
}

@media (max-width: 767.98px) {
    .justify-content-md-end {
        justify-content: stretch !important;
    }
    
    .d-md-flex {
        display: grid !important;
    }
}   flex: 0 0 100%;
    max-width: 100%;
}

/* Display utilities */
.d-block {
    display: block !important;
}

.d-grid {
    display: grid !important;
}

/* Small text */
small {
    font-size: 0.875em;
}

/* Pagination Styles */
.pagination {
    margin-bottom: 0;
}

.pagination .page-item {
    margin: 0 3px;
}

.pagination .page-link {
    border-radius: 5px;
    border: 1px solid #dee2e6;
    color: #2a5298;
    padding: 8px 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination .page-link:hover {
    background-color: #f8f9fa;
    border-color: #2a5298;
    color: #1e3c72;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-color: #2a5298;
    color: white;
    box-shadow: 0 2px 4px rgba(42, 82, 152, 0.3);
}

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

/* Responsive pagination */
@media (max-width: 575.98px) {
    .pagination {
        font-size: 0.85rem;
    }
    
    .pagination .page-link {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .pagination .page-item {
        margin: 2px;
    }
}

/* Flex wrap utility */
.flex-wrap {
    flex-wrap: wrap !important;
}

/* Justify content center */
.justify-content-center {
    justify-content: center !important;
}

/* Font size utilities */
.fs-6 {
    font-size: 1rem !important;
}

/* File input styling */
input[type="file"] {
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    transform: translateY(-1px);
}

/* Position utilities */
.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.top-0 {
    top: 0;
}

.end-0 {
    right: 0;
}

/* Image preview in modal */
.modal-body img {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive design */

/* Mobile First - Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 10px;
    }

    /* Navbar tweaks */
    .navbar-brand {
        font-size: 1rem;
    }

    .logo_main {
        width: 50px;
        height: 50px;
        background-size: contain;
    }

    .nav-link {
        padding: 8px 10px !important;
        font-size: 0.9rem;
    }

    /* Headings */
    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    h5 {
        font-size: 1rem;
    }

    /* Cards */
    .card {
        margin-bottom: 15px;
    }

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

    .card-body {
        padding: 15px;
    }

    .card-title {
        font-size: 1rem;
    }

    /* Buttons */
    .btn {
        padding: 8px 16px;
        font-size: 0.875rem;
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-sm {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .btn-group .btn {
        width: auto;
        margin-bottom: 0;
    }

    /* Tables */
    .table {
        font-size: 0.85rem;
    }

    .table thead th {
        font-size: 0.75rem;
        padding: 8px 5px;
    }

    .table tbody td {
        padding: 8px 5px;
    }

    /* Make tables horizontally scrollable */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-container {
        padding: 10px;
        overflow-x: auto;
    }

    /* Forms */
    .form-control, .form-select {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .form-label {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    /* Modal */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .modal-body {
        padding: 15px;
    }

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

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

    /* Badges */
    .badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    /* Stats cards - Stack on mobile */
    .row > [class*='col-'] {
        margin-bottom: 15px;
    }

    /* Flexbox utilities for mobile */
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .d-flex.justify-content-between > * {
        margin-bottom: 10px;
        width: 100%;
    }

    /* Login page */
    .login-card {
        margin: 10px;
    }

    .login-header {
        padding: 20px;
    }

    .login-body {
        padding: 20px;
    }

    .login-header h2 {
        font-size: 1.3rem;
    }

    /* Empty state */
    .empty-state {
        padding: 30px 15px;
    }

    .empty-state i {
        font-size: 2rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.75rem;
    }

    .btn {
        padding: 8px 18px;
        font-size: 0.9rem;
    }

    .card-body {
        padding: 20px;
    }

    .table {
        font-size: 0.9rem;
    }

    .logo_main {
        width: 60px;
        height: 60px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 8px 20px;
        font-size: 1rem;
        width: auto;
    }

    .logo_main {
        width: 70px;
        height: 70px;
    }

    /* Adjust grid for tablets */
    .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* Utility classes for responsive display */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
}

/* Responsive table improvements */
@media (max-width: 768px) {
    .table-responsive-stack tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 10px;
    }

    .table-responsive-stack td,
    .table-responsive-stack th {
        display: block;
        text-align: right;
        padding: 8px 10px;
        border: none;
    }

    .table-responsive-stack td:before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: #2a5298;
    }

    .table-responsive-stack thead {
        display: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }

    body {
        background-color: white;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}