/* Custom Styles for AutoVL License Admin */

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 8px 4px;
        white-space: nowrap;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.875rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-text {
        font-size: 0.875rem;
    }
    
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 10px 15px;
    }
    
    .alert {
        margin: 10px 0;
        padding: 10px 15px;
    }
    
    .pagination {
        justify-content: center;
    }
    
    .pagination .page-link {
        padding: 6px 10px;
        font-size: 0.875rem;
    }
    
    /* Responsive table improvements */
    .table-responsive {
        border: none;
    }
    
    .table th,
    .table td {
        min-width: auto;
    }
    
    /* Hide less important columns on mobile */
    .d-none.d-md-table-cell {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Show important columns on mobile */
    .d-md-table-cell {
        display: table-cell !important;
    }
    
    /* Action buttons optimization for mobile */
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin: 0;
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    /* Status badges optimization */
    .status-badge {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
}

/* Session timeout notification */
.alert {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.alert-warning {
    background-color: #fff8db;
    border: 1px solid #ffe08a;
    color: #7a5d00;
}

/* Login form improvements */
.login-card input[type="password"] {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card input[type="password"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background-color: #f1f3f5;
    color: #343a40;
    border-radius: 10px 10px 0 0 !important;
    border: none;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 8px 8px 0 0;
    margin-right: 5px;
    color: #6c757d;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    background-color: #eef2f7;
    color: #495057;
    border: 1px solid #dee2e6;
}

.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    font-weight: 600;
    color: #495057;
}

.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 8px 16px;
}

.btn-primary {
    background-color: #74b3f0;
    border: 1px solid #66a8ea;
}
.btn-primary:hover {
    background-color: #66a8ea;
    border-color: #5a9fdf;
}

.btn-success {
    background-color: #8fd19e;
    border: 1px solid #7ec48f;
}
.btn-success:hover {
    background-color: #7ec48f;
    border-color: #73b983;
}

.btn-warning {
    background-color: #ffd27f;
    border: 1px solid #ffc766;
    color: #5a4a00;
}
.btn-warning:hover {
    background-color: #ffc766;
    border-color: #ffbd4d;
}

.btn-danger {
    background-color: #ff9aa2;
    border: 1px solid #ff8790;
}
.btn-danger:hover {
    background-color: #ff8790;
    border-color: #ff7680;
}

.btn-dark {
    background-color: #ced4da;
    color: #343a40;
    border: 1px solid #c1c9cf;
}
.btn-dark:hover {
    background-color: #c1c9cf;
    color: #2f353a;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.status-active {
    background-color: #d1edff;
    color: #0c5460;
}

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

.status-unknown {
    background-color: #e2e3e5;
    color: #383d41;
}

.machine-id {
    font-family: 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons .btn {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 0.9rem;
    }

    .action-buttons {
        flex-direction: column;
    }
    
    /* Responsive table improvements */
    .table-responsive {
        border: none;
    }
    
    .table th,
    .table td {
        min-width: auto;
    }
    
    /* Hide less important columns on mobile */
    .d-none.d-md-table-cell {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Show important columns on mobile */
    .d-md-table-cell {
        display: table-cell !important;
    }
    
    /* Action buttons optimization for mobile */
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin: 0;
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    /* Status badges optimization */
    .status-badge {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
}

/* Custom animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Success/Error messages */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: #e9f7ef;
    color: #1f6f3d;
}

.alert-danger {
    background-color: #fdecef;
    color: #8a1c2b;
}

/* Modal customizations */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    background-color: #f5f7fa;
    color: #343a40;
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}
.login-card {
  width: 360px;
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

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

.pagination .page-link {
    border: none;
    color: #667eea;
    background-color: #f8f9fa;
    margin: 0 2px;
    border-radius: 6px;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    background-color: #e7effb;
    color: #3b5bdb;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background-color: #e7effb;
    border: 1px solid #d0dcfb;
    color: #3b5bdb;
}

/* Lighter navbar primary */
.navbar.bg-primary {
    background-color: #74b3f0 !important;
}

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

/* History table improvements */
#historyTable tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s;
}

/* Auto-cleanup settings */
.auto-cleanup-settings {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid #667eea;
}