/* Custom styles for PII Admin Panel */

body {
    font-size: 0.875rem;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 25%, #bae6fd 50%, #7dd3fc 75%, #38bdf8 100%) !important;
    min-height: 100vh;
}

/* Ensure login page has the correct background */
body #loginForm {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 25%, #bae6fd 50%, #7dd3fc 75%, #38bdf8 100%) !important;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #adb5bd;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.25rem 0.5rem;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.content-section {
    padding: 20px 0;
}

.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.text-xs {
    font-size: 0.7rem;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-uppercase {
    text-transform: uppercase !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.shadow {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

.card {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    border: 1px solid #e3e6f0;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table th {
    background-color: #f8f9fc;
    border-top: 1px solid #e3e6f0;
    font-weight: 600;
    color: #5a5c69;
}

.btn {
    border-radius: 0.35rem;
    font-weight: 500;
}

.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-danger {
    background-color: #e74a3b;
    border-color: #e74a3b;
}

.btn-warning {
    background-color: #f6c23e;
    border-color: #f6c23e;
}

.btn-info {
    background-color: #36b9cc;
    border-color: #36b9cc;
}

.form-control, .form-select {
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
}

.form-control:focus, .form-select:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.alert {
    border-radius: 0.35rem;
}

/* Modal Styles */
.modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.25rem;
}

.modal-body {
    padding: 2rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.5rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.btn-close:hover {
    opacity: 1;
    color: #dc2626;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

.form-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal {
    backdrop-filter: blur(4px);
}

/* Modal animation */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.list-group-item {
    border: 1px solid #e3e6f0;
    padding: 0.75rem 1.25rem;
}

.list-group-item:first-child {
    border-top-left-radius: 0.35rem;
    border-top-right-radius: 0.35rem;
}

.list-group-item:last-child {
    border-bottom-left-radius: 0.35rem;
    border-bottom-right-radius: 0.35rem;
}

.badge {
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.35rem;
}

.badge-success {
    background-color: #1cc88a;
}

.badge-danger {
    background-color: #e74a3b;
}

.badge-warning {
    background-color: #f6c23e;
}

.badge-info {
    background-color: #36b9cc;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        top: 5rem;
    }
    
    .sidebar-sticky {
        top: 0;
    }
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.online {
    background-color: #1cc88a;
}

.status-indicator.offline {
    background-color: #e74a3b;
}

.status-indicator.warning {
    background-color: #f6c23e;
}

/* Animation for loading states */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Custom form switches */
.form-check-input:checked {
    background-color: #4e73df;
    border-color: #4e73df;
}

/* Table hover effects */
.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Custom button groups */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.35rem;
    border-bottom-left-radius: 0.35rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.35rem;
    border-bottom-right-radius: 0.35rem;
}

/* Dashboard Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.refresh-btn {
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    background-color: #f7fafc;
    color: #2d3748;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-icon {
    color: #a0aec0;
    opacity: 0.6;
}

/* Stat card colors */
.stat-card.pii-detected .stat-label {
    color: #3182ce;
}

.stat-card.pii-detected .stat-number {
    color: #3182ce;
}

.stat-card.content-blocked .stat-label {
    color: #38a169;
}

.stat-card.content-blocked .stat-number {
    color: #38a169;
}

.stat-card.file-uploads .stat-label {
    color: #3182ce;
}

.stat-card.file-uploads .stat-number {
    color: #3182ce;
}

.stat-card.active-extensions .stat-label {
    color: #d69e2e;
}

.stat-card.active-extensions .stat-number {
    color: #d69e2e;
}

/* Recent Events Section */
.recent-events-section {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.recent-events-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #3182ce;
    margin: 0;
    padding: 1.5rem 1.5rem 0 1.5rem;
}

.events-table-container {
    padding: 1.5rem;
}

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

.events-table th {
    background-color: #f8f9fc;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.events-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #4a5568;
    font-size: 0.875rem;
}

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

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

.events-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge styles for event types */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.bg-warning {
    background-color: #f6c23e;
    color: #fff;
}

.bg-danger {
    background-color: #e74a3b;
    color: #fff;
}

.bg-primary {
    background-color: #4e73df;
    color: #fff;
}

.bg-info {
    background-color: #36b9cc;
    color: #fff;
}

/* Configuration Section Styles */
.config-section {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.config-header {
    padding: 1.5rem 1.5rem 0 1.5rem;
}

.config-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #3182ce;
    margin: 0 0 0.5rem 0;
}

.config-description {
    color: #718096;
    font-size: 0.875rem;
    margin: 0 0 1.5rem 0;
}

.config-form {
    padding: 1.5rem;
}

.config-grid {
    margin-bottom: 2rem;
}

.config-card {
    background: #f8f9fc;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.config-item:last-child {
    border-bottom: none;
}

.config-label {
    flex: 1;
}

.config-label label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
    display: block;
}

.config-help {
    font-size: 0.75rem;
    color: #718096;
    display: block;
}

.config-control {
    margin-left: 1rem;
}

.form-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    text-align: center;
}

.form-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #3182ce;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.config-actions {
    text-align: right;
}

.save-btn {
    background: #3182ce;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.save-btn:hover {
    background: #2c5aa0;
}

/* Website Management Styles */
.websites-section {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.websites-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 800px;
}

.website-category {
    /* Removed border-right since we only have one category now */
}

.website-category:last-child {
    border-right: none;
}

.category-header {
    padding: 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.category-header.allowed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.category-header.blocked {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.category-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.category-description {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.8;
    font-weight: 400;
}

.category-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.category-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 3rem;
    text-align: center;
}

.category-label {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.website-list {
    padding: 1.5rem;
    min-height: 300px;
}

.website-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.website-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #10b981, #059669);
    transition: width 0.3s ease;
}

.website-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.website-item:hover::before {
    width: 6px;
}

.website-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.website-domain {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.website-domain::before {
    content: '🌐';
    font-size: 0.875rem;
}

.website-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.website-status.allowed {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border: 1px solid #bbf7d0;
}

.website-status.blocked {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.website-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.action-btn:hover::before {
    width: 100%;
    height: 100%;
}

.action-btn.delete {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    border: 1px solid #fecaca;
}

.action-btn.delete:hover {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #b91c1c;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: #64748b;
}

.empty-icon {
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-state h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #475569;
}

.empty-state p {
    margin: 0 0 1.5rem 0;
    font-size: 0.875rem;
    color: #64748b;
}

.empty-action-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.empty-action-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.add-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.add-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.add-btn:hover::before {
    left: 100%;
}

.add-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Events Section Styles */
.events-section {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.events-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.375rem;
    background: white;
    font-size: 0.875rem;
    color: #4a5568;
}

.filter-select:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.loading-state {
    text-align: center;
    padding: 3rem;
    color: #718096;
}

.loading-state svg {
    margin-bottom: 1rem;
    opacity: 0.5;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Analytics Section Styles */
.analytics-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.analytics-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.analytics-card.full-width {
    grid-column: 1 / -1;
}

.chart-header {
    padding: 1.5rem 1.5rem 0 1.5rem;
}

.chart-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #3182ce;
    margin: 0 0 0.5rem 0;
}

.chart-description {
    color: #718096;
    font-size: 0.875rem;
    margin: 0 0 1.5rem 0;
}

.chart-container {
    padding: 1.5rem;
    position: relative;
    height: 300px;
}

/* Login Form Styles */
.login-container {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 25%, #bae6fd 50%, #7dd3fc 75%, #38bdf8 100%) !important;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    padding: 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    margin: 0;
    box-sizing: border-box;
    z-index: 1;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(125, 211, 252, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(186, 230, 253, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

/* Background Elements */
.bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.bg-circle, .bg-square {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(56, 189, 248, 0.1);
}

.bg-circle {
    border-radius: 50%;
}

.bg-square {
    border-radius: 20px;
}

.circle-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    animation: floatCircle1 20s ease-in-out infinite;
}

.circle-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 15%;
    animation: floatCircle2 25s ease-in-out infinite;
}

.circle-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation: floatCircle3 18s ease-in-out infinite;
}

.square-1 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 25%;
    animation: floatSquare1 22s ease-in-out infinite;
}

.square-2 {
    width: 70px;
    height: 70px;
    bottom: 30%;
    right: 10%;
    animation: floatSquare2 28s ease-in-out infinite;
}

@keyframes floatCircle1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -20px) rotate(90deg); }
    50% { transform: translate(-20px, 30px) rotate(180deg); }
    75% { transform: translate(20px, 20px) rotate(270deg); }
}

@keyframes floatCircle2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-40px, 20px) rotate(120deg); }
    66% { transform: translate(20px, -30px) rotate(240deg); }
}

@keyframes floatCircle3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(25px, -25px) rotate(180deg); }
}

@keyframes floatSquare1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-25px, 15px) rotate(90deg); }
    50% { transform: translate(15px, 25px) rotate(180deg); }
    75% { transform: translate(25px, -15px) rotate(270deg); }
}

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

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2rem;
    box-shadow: 
        0 32px 64px -12px rgba(56, 189, 248, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    min-width: 320px;
    position: relative;
    z-index: 10;
    transform: translateY(0);
    transition: all 0.3s ease;
    margin: 0 auto;
    flex-shrink: 0;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 40px 80px -12px rgba(56, 189, 248, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
    border-radius: 2px;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.3);
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.login-header p {
    color: #718096;
    font-size: 0.875rem;
    margin: 0;
}

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

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    background: #f9fafb;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #38bdf8;
    background: white;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.login-btn:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
}

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

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

.login-btn:hover .btn-icon {
    transform: translateX(2px);
}

.login-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.error-text {
    flex: 1;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #1a202c 0%, #2d3748 100%);
    color: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 6px -1px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3182ce, #2c5aa0);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.brand-info h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: white;
}

.brand-info p {
    font-size: 0.75rem;
    color: #a0aec0;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: #a0aec0;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #3182ce;
}

.nav-item.active {
    color: white;
    background: rgba(49, 130, 206, 0.1);
    border-left-color: #3182ce;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #3182ce;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    width: 100%;
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.logout-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-text {
    flex: 1;
    text-align: left;
}

/* Main content adjustment for new sidebar */
.main-content {
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
    background: #f7fafc;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem;
        margin: 0;
        max-width: 100%;
        min-width: 280px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 0.5rem;
    }
    
    .login-card {
        padding: 1.5rem;
        min-width: 260px;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .login-logo {
        width: 48px;
        height: 48px;
    }
}

