/* Spotlight Dashboard CSS - Enhanced with Mobile Responsiveness */

@font-face {
    font-family: 'Coolvetica';
    src: url('../fonts/Coolvetica.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary: #007883;
    --secondary: #16BECF;
    --dark: #231F20;
    --light: #f8f9fa;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 16px;
}

/* Base font size improvements */
body {
    font-size: 16px;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content-container {
    flex-grow: 1;
    padding: 20px 0;
}

/* Enhanced Dashboard specific styles */
.summary-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
    transition: var(--transition);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.summary-card h3 {
    font-size: 3rem !important;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
    font-family: 'Coolvetica', sans-serif;
    line-height: 1;
}

.summary-card p {
    font-size: 1.1rem !important;
    font-weight: 500;
    margin-bottom: 0;
}

/* Form container improvements */
.form-container {
    font-size: 15px;
}

.form-container h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
}

/* Enhanced Form container styling */
.form-container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-container h2 {
    color: var(--dark);
    border-bottom: 3px solid var(--secondary);
    padding-bottom: 12px;
    margin-bottom: 25px;
    font-family: 'Coolvetica', sans-serif;
    font-size: 1.5rem;
}

/* Enhanced Table styling with scrollability */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f1f1;
}

.table-responsive::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
    border: 2px solid #f1f1f1;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #005f66;
}

.table-responsive::-webkit-scrollbar-corner {
    background: #f1f1f1;
}

.table {
    margin-bottom: 0;
    min-width: 700px; /* Ensure minimum width for readability */
    font-size: 15px;
}

.table th {
    font-size: 15px;
    font-weight: 600;
    padding: 12px 8px;
    background-color: var(--light);
    border-bottom: 2px solid var(--primary);
    color: var(--dark);
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.table td {
    font-size: 15px;
    padding: 12px 8px;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(22, 190, 207, 0.05);
}

.table tbody tr:hover {
    background-color: rgba(0, 120, 131, 0.08);
    transition: background-color 0.15s ease-in-out;
}

/* Enhanced Badge styling */
.badge {
    font-size: 0.85rem;
    padding: 0.4em 0.8em;
    font-weight: 600;
    border-radius: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    line-height: 1;
}

.badge-success {
    background-color: var(--success);
    color: white;
}

.badge-danger {
    background-color: var(--danger);
    color: white;
}

.badge-warning {
    background-color: var(--warning);
    color: var(--dark);
}

.badge-info {
    background-color: var(--info);
    color: white;
}

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

/* Enhanced Alert item styling */
.alert-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
    position: relative;
    background: white;
    transition: var(--transition);
}

.alert-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-item.severity-critical {
    border-left-color: #8B0000;
    background-color: rgba(139, 0, 0, 0.02);
}

.alert-item.severity-high {
    border-left-color: var(--danger);
    background-color: rgba(220, 53, 69, 0.02);
}

.alert-item.severity-medium {
    border-left-color: var(--warning);
    background-color: rgba(255, 193, 7, 0.02);
}

.alert-item.severity-low {
    border-left-color: var(--success);
    background-color: rgba(40, 167, 69, 0.02);
}

.alert-item h4 {
    margin-bottom: 8px;
    font-size: 1.3rem;
    color: var(--dark);
    font-weight: 600;
}

/* Enhanced Button styling */
button, .btn {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    line-height: 1.5;
}

button:hover, .btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

button:disabled, .btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    filter: none;
    transform: none;
    opacity: 0.65;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
}

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

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: var(--dark);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.btn-sm {
    font-size: 14px;
    padding: 6px 12px;
}

.btn-lg {
    font-size: 17px;
    padding: 12px 24px;
}

/* Enhanced Button container */
.btn-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    align-items: center;
}

/* Enhanced Form styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: var(--transition);
    background-color: white;
    color: #333;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 120, 131, 0.1);
    color: #333;
}

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

.modal-header {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    border-radius: 8px 8px 0 0;
    padding: 1rem 1.5rem;
}

.modal-header .modal-title {
    font-family: 'Coolvetica', sans-serif;
    font-size: 1.3rem;
    margin: 0;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: none;
}

.modal-header .close:hover {
    opacity: 1;
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* Enhanced Alert styling */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    border-left: 4px solid;
    font-size: 15px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    border-left-color: var(--success);
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    border-left-color: var(--danger);
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
    border-left-color: var(--warning);
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
    border-left-color: var(--info);
}

/* Enhanced Feature cards for home page */
.feature-card {
    background: white;
    padding: 30px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 30px;
    transition: var(--transition);
    border-top: 4px solid var(--primary);
}

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

.feature-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    color: var(--dark);
    margin-bottom: 15px;
    font-family: 'Coolvetica', sans-serif;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Enhanced Navigation */
.navbar-nav > li > a i {
    margin-right: 5px;
}

/* Page header enhancements */
.page-header-with-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.enhanced-nav {
    display: flex;
    gap: 1rem;
}

.nav-section h6 {
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-weight: 600;
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Performance metrics */
.performance-metrics {
    font-size: 0.85em;
    line-height: 1.4;
}

.metric-container {
    display: flex;
    flex-direction: column;
    min-width: 80px;
}

.progress {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-bar {
    height: 100%;
    transition: width 0.6s ease;
}

/* Chart containers */
#threatlockerTrendsChart {
    min-height: 300px;
    width: 100%;
}

.empty-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    text-align: center;
    padding: 2rem;
}

.empty-chart i {
    margin-bottom: 1rem;
}

/* Statistics styling */
.unblock-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background-color: rgba(0, 120, 131, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Coolvetica', sans-serif;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Loading and status indicators */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

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

/* Status indicators */
.status-online {
    color: var(--success);
}

.status-offline {
    color: var(--danger);
}

.status-warning {
    color: var(--warning);
}

/* Storage info styling */
.storage-info {
    text-align: left;
}

.storage-info strong {
    color: var(--dark);
}

.storage-info small {
    display: block;
    margin-top: 2px;
}

/* Logo styling */
img.sot_logo {
    height: 40px; 
    border-radius: 50%;
}

/* Form control enhancements */
.form-control select,
select.form-control {
    color: #333 !important;
    background-color: #fff !important;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 40px;
}

.form-control select option,
select.form-control option {
    color: #333 !important;
    background-color: #fff !important;
    padding: 8px 12px;
}

/* Ensure dropdown text is visible when focused */
.form-control:focus {
    color: #333 !important;
    background-color: #fff !important;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 120, 131, 0.25);
}

/* Fix for Bootstrap conflicts */
select.form-control:not([size]):not([multiple]) {
    height: calc(1.5em + 0.75rem + 4px);
    color: #333 !important;
}

/* Placeholder text styling */
.form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* Utility classes */
.text-center {
    text-align: center;
}

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

.mb-0 {
    margin-bottom: 0;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-20 {
    padding: 20px;
}

/* Jumbotron styling */
.jumbotron {
    background: linear-gradient(135deg, rgba(22, 190, 207, 0.1), rgba(0, 120, 131, 0.1));
    border-radius: 8px;
    padding: 60px 30px;
    margin-bottom: 30px;
}

.landing-center {
    text-align: center;
}

.admin-options, .client-options, .login-prompt {
    margin: 30px 0;
}

.admin-options .btn, 
.client-options .btn, 
.login-prompt .btn {
    margin: 10px;
}

/* Delete modal custom styles */
.modal-header.bg-danger {
    border-bottom: 1px solid #dc3545;
}

.alert-danger {
    border-left: 4px solid #dc3545;
}

#deleteUserModal .modal-content {
    border: 2px solid #dc3545;
}

#confirm-delete-user-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-group-sm .btn {
    margin: 1px;
}

/* Base mobile responsiveness (enhanced in responsive-mobile.css) */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .main-content-container {
        padding: 15px 0;
    }
    
    .summary-card {
        margin-bottom: 15px;
        padding: 20px 15px;
    }
    
    .summary-card h3 {
        font-size: 2.4rem !important;
    }
    
    .summary-card p {
        font-size: 1rem !important;
    }
    
    .btn-container {
        flex-direction: column;
    }
    
    .btn-container .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .page-header-with-nav {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .enhanced-nav {
        margin-top: 1rem;
        justify-content: center;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        font-size: 13px;
        padding: 8px 4px;
    }
}