/**
 * OCRP Panel - Custom Styles
 * Modern FiveM Staff Management System
 */

/* Root Variables */
:root {
  --accent-color: #00B2FF;
  --sidebar-width: 250px;
  --navbar-height: 70px;
  --transition-speed: 0.3s;
}

/* Base Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  overflow-x: hidden;
}

/* Navbar Styles */
.navbar-custom {
  background: var(--accent-color) !important;
  height: var(--navbar-height);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0 20px;
}

.navbar-custom .logo {
  display: flex;
  align-items: center;
  height: var(--navbar-height);
}

.navbar-custom .logo img {
  max-height: 40px;
}

.navbar-custom .topbar-right-menu {
  display: flex;
  align-items: center;
  height: var(--navbar-height);
}

.navbar-custom .nav-user {
  display: flex;
  align-items: center;
  color: white !important;
  padding: 10px 15px;
}

.navbar-custom .nav-user img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  margin-right: 10px;
}

.navbar-custom .button-menu-mobile {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  padding: 10px 15px;
  cursor: pointer;
}

/* Left Sidebar */
.left-side-menu {
  background: var(--accent-color) !important;
  width: var(--sidebar-width);
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  height: calc(100vh - var(--navbar-height));
  z-index: 100;
  transition: all var(--transition-speed);
  overflow-y: auto;
}

.left-side-menu .user-box {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.left-side-menu .user-box img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.left-side-menu .user-box h5 {
  color: white !important;
  margin-top: 10px;
}

/* Sidebar Menu */
#sidebar-menu {
  padding: 20px 0;
}

#sidebar-menu .menu-title {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 20px;
  margin-top: 10px;
}

#sidebar-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sidebar-menu ul li a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all var(--transition-speed);
}

#sidebar-menu ul li a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

#sidebar-menu ul li a.active {
  background: rgba(0, 0, 0, 0.2);
  color: white;
}

#sidebar-menu ul li a i {
  margin-right: 10px;
  font-size: 16px;
  width: 20px;
  text-align: center;
}

#sidebar-menu ul li a .menu-arrow {
  margin-left: auto;
  font-size: 10px;
}

/* Second Level Menu */
.nav-second-level {
  background: rgba(0, 0, 0, 0.1);
  display: none;
}

.nav-second-level li a {
  padding-left: 50px !important;
  font-size: 13px;
}

/* Content Page */
.content-page {
  margin-left: var(--sidebar-width);
  padding-top: var(--navbar-height);
  min-height: 100vh;
  transition: all var(--transition-speed);
}

.content {
  padding: 20px;
}

/* Page Title Box */
.page-title-box {
  padding: 20px 0;
  margin-bottom: 20px;
}

.page-title-box .page-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.page-title-box .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
}

.page-title-box .breadcrumb-item a {
  color: var(--accent-color);
  text-decoration: none;
}

.page-title-box .breadcrumb-item.active {
  color: #6c757d;
}

/* Cards */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.card-body {
  padding: 20px;
}

.card .header-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

/* Avatar */
.avatar-sm {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.avatar-md {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.avatar-title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Tables */
.table {
  margin-bottom: 0;
}

.table thead th {
  border-top: none;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: #333;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody td {
  vertical-align: middle;
  padding: 12px 8px;
  font-size: 14px;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 178, 255, 0.05);
}

/* Badges */
.badge {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
}

.badge-success {
  background-color: #28a745;
}

.badge-warning {
  background-color: #ffc107;
  color: #212529;
}

.badge-danger {
  background-color: #dc3545;
}

.badge-info {
  background-color: #17a2b8;
}

/* Buttons */
.btn {
  border-radius: 6px;
  font-weight: 500;
  padding: 8px 16px;
  transition: all var(--transition-speed);
}

.btn-outline-info {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-outline-info:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.btn-info {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-info:hover {
  background-color: darken(var(--accent-color), 10%);
  border-color: darken(var(--accent-color), 10%);
}

/* Forms */
.form-control {
  border-radius: 6px;
  border: 1px solid #dee2e6;
  padding: 10px 15px;
  transition: all var(--transition-speed);
}

.form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 178, 255, 0.25);
}

/* Alerts */
.alert {
  border-radius: 8px;
  border: none;
  padding: 15px 20px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
}

/* Pagination */
.pagination {
  margin-bottom: 0;
}

.page-link {
  color: var(--accent-color);
  border: 1px solid #dee2e6;
  padding: 8px 14px;
}

.page-link:hover {
  color: var(--accent-color);
  background-color: rgba(0, 178, 255, 0.1);
  border-color: var(--accent-color);
}

.page-item.active .page-link {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.page-item.disabled .page-link {
  color: #6c757d;
}

/* Footer */
.footer {
  background: #fff;
  padding: 20px 0;
  border-top: 1px solid #dee2e6;
  margin-top: 40px;
}

.footer .footer-links a {
  color: #6c757d;
  text-decoration: none;
  margin-left: 20px;
  transition: color var(--transition-speed);
}

.footer .footer-links a:hover {
  color: var(--accent-color);
}

/* Dark Mode */
body.dark-mode {
  background-color: #1a1a1a;
}

body.dark-mode .card {
  background-color: #2d2d2d;
}

body.dark-mode .card .header-title,
body.dark-mode .page-title-box .page-title,
body.dark-mode .table thead th,
body.dark-mode .table tbody td {
  color: #fff;
}

body.dark-mode .table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .form-control {
  background-color: #2d2d2d;
  border-color: #404040;
  color: #fff;
}

body.dark-mode .form-control:focus {
  background-color: #2d2d2d;
  border-color: var(--accent-color);
}

body.dark-mode .footer {
  background-color: #2d2d2d;
  border-color: #404040;
}

body.dark-mode .footer .footer-links a {
  color: #aaa;
}

body.dark-mode .left-side-menu {
  background: #2d2d2d !important;
}

body.dark-mode #sidebar-menu ul li a {
  color: rgba(255, 255, 255, 0.8);
}

body.dark-mode #sidebar-menu ul li a:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode #sidebar-menu ul li a.active {
  background: rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 992px) {
  .left-side-menu {
    left: -var(--sidebar-width);
  }
  
  .content-page {
    margin-left: 0;
  }
  
  body.sidebar-enable .left-side-menu {
    left: 0;
  }
  
  body.sidebar-enable .content-page {
    margin-left: var(--sidebar-width);
  }
}

@media (max-width: 768px) {
  .navbar-custom .topbar-right-menu {
    display: none;
  }
  
  .content {
    padding: 10px;
  }
  
  .page-title-box .page-title {
    font-size: 20px;
  }
}

/* Utility Classes */
.text-accent {
  color: var(--accent-color) !important;
}

/* Online Players List */
.online-player-item {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.online-player-item:last-child {
  border-bottom: none;
}

/* Live Activity Feed */
.live-activity-item {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.live-activity-item:last-child {
  border-bottom: none;
}

.live-activity-item i {
  width: 20px;
}

/* Notifications Container */
.notifications-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 350px;
}

.notification {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 15px;
  margin-bottom: 10px;
  animation: slideIn 0.3s ease-out;
}

.notification.fade-out {
  animation: slideOut 0.3s ease-out;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
}

.notification-body {
  font-size: 13px;
  color: #666;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Trust Score Styles */
.trustscore {
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.trustscore.high {
  background-color: #d4edda;
  color: #155724;
}

.trustscore.medium {
  background-color: #fff3cd;
  color: #856404;
}

.trustscore.low {
  background-color: #f8d7da;
  color: #721c24;
}

.trustscore.updated {
  animation: pulse 0.5s ease-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Real-time Status Indicator */
.realtime-status {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

.realtime-status.connected {
  background-color: #28a745;
  animation: pulse 2s infinite;
}

.realtime-status.disconnected {
  background-color: #dc3545;
}

.realtime-status.connecting {
  background-color: #ffc107;
  animation: pulse 1s infinite;
}

.bg-accent {
  background-color: var(--accent-color) !important;
}

.border-accent {
  border-color: var(--accent-color) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

body.dark-mode ::-webkit-scrollbar-track {
  background: #2d2d2d;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: #555;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modal */
.modal-content {
  border: none;
  border-radius: 8px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: 1px solid #dee2e6;
  padding: 15px 20px;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 15px 20px;
}

/* Dropdown */
.dropdown-menu {
  border: none;
  border-radius: 8px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
  padding: 10px 0;
}

.dropdown-item {
  padding: 10px 20px;
  transition: all var(--transition-speed);
}

.dropdown-item:hover {
  background-color: rgba(0, 178, 255, 0.1);
  color: var(--accent-color);
}

/* Tooltip */
.tooltip {
  font-size: 12px;
}

/* Progress Bar */
.progress {
  height: 8px;
  border-radius: 4px;
  background-color: #e9ecef;
}

.progress-bar {
  background-color: var(--accent-color);
  border-radius: 4px;
}

/* List Group */
.list-group-item {
  border: none;
  border-bottom: 1px solid #dee2e6;
  padding: 15px 20px;
}

.list-group-item:last-child {
  border-bottom: none;
}

.list-group-item:hover {
  background-color: rgba(0, 178, 255, 0.05);
}

/* Media Queries for Print */
@media print {
  .navbar-custom,
  .left-side-menu,
  .footer {
    display: none !important;
  }
  
  .content-page {
    margin-left: 0 !important;
    padding-top: 0 !important;
  }
}
