/* Satoshi Font - @font-face declarations */
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi-Variable.woff2') format('woff2'),
       url('../fonts/Satoshi-Variable.woff') format('woff');
  font-weight: 300 900;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi-VariableItalic.woff2') format('woff2'),
       url('../fonts/Satoshi-VariableItalic.woff') format('woff');
  font-weight: 300 900;
  font-display: swap;
  font-style: italic;
}

/* Alternative: Individual font weights if not using variable fonts
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi-Regular.woff2') format('woff2'),
       url('../fonts/Satoshi-Regular.woff') format('woff');
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi-Medium.woff2') format('woff2'),
       url('../fonts/Satoshi-Medium.woff') format('woff');
  font-weight: 500;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi-Bold.woff2') format('woff2'),
       url('../fonts/Satoshi-Bold.woff') format('woff');
  font-weight: 700;
  font-display: swap;
  font-style: normal;
}
*/

/* Bootstrap Variable Overrides */
:root {
  --bs-primary: #3387e8;
  --bs-primary-rgb: 51, 135, 232;
  --bs-body-font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Primary Button Override */
.btn-primary {
  background-color: #3387e8 !important;
  border-color: #3387e8 !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #2570c9 !important;
  border-color: #2570c9 !important;
}

.btn-primary:active,
.btn-primary.active {
  background-color: #1f5fa8 !important;
  border-color: #1f5fa8 !important;
}

.btn-outline-primary {
  color: #3387e8 !important;
  border-color: #3387e8 !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: #3387e8 !important;
  border-color: #3387e8 !important;
  color: #fff !important;
}

/* Global Styles */
body {
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8f9fa;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 60px;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 48px 0 0;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
  min-height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar .nav-link {
  font-weight: 500;
  color: #333;
  padding: 10px 20px;
  transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
  color: #3387e8;
  background-color: #f1f3f5;
  border-left: 3px solid #3387e8;
  padding-left: 17px;
}

.sidebar .nav-link.active {
  color: #3387e8;
  background-color: #e7f1ff;
  border-left: 3px solid #3387e8;
  padding-left: 17px;
}

.sidebar .nav-link i {
  width: 20px;
  text-align: center;
}

/* Two-level Menu Styles */
.sidebar .nav-item.has-submenu .nav-link {
  position: relative;
}

.sidebar .nav-item.has-submenu .nav-link::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
  font-size: 12px;
}

.sidebar .nav-item.has-submenu .nav-link[aria-expanded="true"]::after {
  transform: translateY(-50%) rotate(180deg);
}

.sidebar .submenu {
  background-color: #f8f9fa;
  border-left: 2px solid #e9ecef;
  margin-left: 20px;
  padding-left: 0;
}

.sidebar .submenu .nav-link {
  padding: 8px 15px 8px 35px;
  font-size: 0.9rem;
  color: #6c757d;
  border-left: none;
}

.sidebar .submenu .nav-link:hover {
  color: #3387e8;
  background-color: #f1f3f5;
  border-left: 2px solid #3387e8;
  padding-left: 33px;
}

.sidebar .submenu .nav-link.active {
  color: #3387e8;
  background-color: #e7f1ff;
  border-left: 2px solid #3387e8;
  padding-left: 33px;
}

.sidebar .submenu .nav-link i {
  width: 16px;
  font-size: 12px;
}

/* Main Content Area */
main {
  padding-top: 20px;
}

/* Card Styles */
.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

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

.border-left-primary {
  border-left: 5px solid #3387e8 !important;
}

.border-left-success {
  border-left: 5px solid #198754 !important;
}

.border-left-info {
  border-left: 5px solid #0dcaf0 !important;
}

.border-left-warning {
  border-left: 5px solid #ffc107 !important;
}

/* Login Page Styles */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .sidebar {
    position: static;
    padding-top: 20px;
    min-height: auto;
  }
  
  main {
    margin-left: 0 !important;
  }
}

/* Badge Styles */
.badge {
  padding: 5px 10px;
  font-weight: 500;
}

/* Table Styles */
.table-hover tbody tr:hover {
  background-color: #f5f5f5;
  cursor: pointer;
}

/* Button Styles */
.btn {
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Navbar Styles */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.25rem;
}

/* Dropdown Styles */
.dropdown-menu {
  border: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  border-radius: 10px;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  color: #3387e8;
}

/* Alert Styles */
.alert {
  border: none;
  border-radius: 10px;
}

/* Text Utilities */
.text-gray-300 {
  color: #d1d3e2 !important;
}

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

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

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

/* Error Page Styles */
.error-container {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-card {
  max-width: 600px;
  margin: 20px auto;
}

.error-icon {
  font-size: 6rem;
  opacity: 0.8;
}

.error-code {
  font-size: 5rem;
  font-weight: 700;
  opacity: 0.1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}

/* Animate error icon */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.error-icon:hover {
  animation: shake 0.5s;
}

/* Error page specific card styles */
.card.border-danger .card-header {
  border-bottom: 2px solid #dc3545;
}

.card.border-warning .card-header {
  border-bottom: 2px solid #ffc107;
}

.card.border-secondary .card-header {
  border-bottom: 2px solid #6c757d;
}