@import url('https://fonts.googleapis.com/css?family=Geologica');

:root {
  --primary: #2563eb;
  --accent: #22d3ee;
  --sidebar: #232946;
  --button: var(--primary);
  --on-button: #ffffff;
  --on-sidebar: #ffffff;
  --on-accent: #ffffff;
  --on-gradient: #ffffff;
  --success: #10b981;
  --warning: #f59e42;
  --danger: #ef4444;
  --bg: #f3f4f6;
  --text: #1e293b;
  --muted: #64748b;
  --card-radius: 1.25rem;
  --card-shadow: 0 4px 24px rgba(37,99,235,0.08);
}
html.brand-pending body {
  visibility: hidden;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 1rem;
}
.navbar-custom {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--on-gradient);
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  z-index: 1030;
  transition: left 0.2s;
  overflow: visible;
}

.navbar-custom .navbar-nav .nav-link,
.navbar-custom .navbar-brand {
  color: var(--on-gradient);
}

.navbar-custom .navbar-nav .nav-link.active,
.navbar-custom .navbar-nav .nav-link:focus,
.navbar-custom .navbar-nav .nav-link:hover {
  color: var(--on-gradient);
}

.sidebar {
  background: var(--sidebar);
  color: var(--on-sidebar);
  min-height: 100vh;
  width: 240px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  transition: width 0.2s;
}

.sidebar .sidebar-brand {
  text-decoration: none;
  display: block;
}

.sidebar .sidebar-logo {
  max-width: 120px;
  height: auto;
  transition: transform 0.3s ease;
}

.sidebar .sidebar-brand:hover .sidebar-logo {
  transform: scale(1.05);
}

.sidebar .brand-text {
  font-family: 'Geologica', sans-serif;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--on-sidebar);
  line-height: 1.2;
}


.sidebar .sidebar-header {
  padding: 1.5rem 1rem 1rem 1rem;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--on-sidebar);
  background: var(--sidebar);
}
.sidebar .nav-link {
  color: var(--on-sidebar);
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  margin-bottom: 0.25rem;
  transition: background 0.2s, color 0.2s;
}
.sidebar .nav-link.active,
.sidebar .nav-link:hover {
  background: var(--accent);
  color: var(--on-accent);
}
.sidebar .nav-header {
  padding: 0.5rem 1.5rem 0.25rem 1.5rem;
  font-size: 0.75rem;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.main-content {
  margin-left: 240px;
  margin-top: 70px;
  padding: 2rem 2rem 2rem 2rem;
  min-height: 100vh;
  transition: margin-left 0.2s;
}

/* Desktop collapsed state */
body .sidebar.collapsed ~ .main-content,
body .sidebar.collapsed + .main-content {
  margin-left: 60px;
  width: calc(100vw - 60px);
  max-width: calc(100vw - 60px);
}

body .sidebar.collapsed ~ .navbar-custom,
body .sidebar.collapsed + .navbar-custom {
  left: 60px;
  width: calc(100vw - 60px);
  max-width: calc(100vw - 60px);
}

/* Alternative approach using body class */
body.sidebar-collapsed .main-content {
  margin-left: 60px;
  width: calc(100vw - 60px);
  max-width: calc(100vw - 60px);
}

body.sidebar-collapsed .navbar-custom {
  left: 60px;
  width: calc(100vw - 60px);
  max-width: calc(100vw - 60px);
}

/* Ensure all containers expand properly when sidebar is collapsed */
.sidebar.collapsed ~ .main-content .container-fluid,
.sidebar.collapsed ~ .main-content .container {
  width: 100%;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}
/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   ============================================ */

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1039;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

/* Tablet and below (≤991px) */
@media (max-width: 991.98px) {
  .sidebar {
    left: -240px;
    z-index: 1050;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.show {
    left: 0;
  }
  .navbar-custom {
    left: 0;
    z-index: 1040;
  }
  .main-content {
    margin-left: 0;
    margin-top: 70px;
    padding: 1rem;
  }
  .sidebar.collapsed ~ .main-content {
    margin-left: 0;
    width: 100vw;
    max-width: 100vw;
  }
  .sidebar.collapsed ~ .navbar-custom {
    left: 0;
    width: 100vw;
    max-width: 100vw;
  }
  
  /* Content Header Responsive */
  .content-header {
    padding: 1rem 0;
  }
  
  .content-header h1 {
    font-size: 1.75rem;
  }
  
  /* Stats Cards - 2 columns on tablet */
  .stats-card {
    padding: 1.25rem 1rem;
    margin-bottom: 1rem;
  }
  
  .stats-card .stats-number {
    font-size: 1.75rem;
  }
  
  /* Cards spacing */
  .card-custom {
    margin-bottom: 1.5rem;
  }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  .main-content {
    padding: 0.75rem;
    margin-top: 60px;
  }
  
  .content-header {
    padding: 0.75rem 0;
  }
  
  .content-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .content-header .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }
  
  .content-header .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Stats Cards - Full width on mobile */
  .stats-card {
    padding: 1rem 0.875rem;
    margin-bottom: 0.875rem;
  }
  
  .stats-card .stats-label {
    font-size: 0.875rem;
  }
  
  .stats-card .stats-number {
    font-size: 1.5rem;
  }
  
  .stats-card .stats-icon {
    font-size: 1.75rem;
  }
  
  /* Cards */
  .card-custom {
    margin-bottom: 1.25rem;
    border-radius: 1rem;
  }
  
  .card-header-custom {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* Buttons - Standardize sizes */
  .btn {
    min-height: 44px; /* Touch target size */
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 0.625rem;
  }
  
  .btn-sm {
    min-height: 36px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .btn-lg {
    min-height: 48px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Button groups - Stack on mobile */
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-group .btn {
    width: 100%;
    border-radius: 0.625rem !important;
    margin-bottom: 0.5rem;
  }
  
  .btn-group .btn:last-child {
    margin-bottom: 0;
  }
  
  /* Forms */
  .form-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }
  
  .form-control,
  .form-select {
    min-height: 44px;
    font-size: 0.95rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.625rem;
  }
  
  .input-group-text {
    min-height: 44px;
    padding: 0.625rem 0.875rem;
  }
  
  /* Input groups - Stack on mobile */
  .input-group.flex-column {
    gap: 0.5rem;
  }
  
  .input-group.flex-column .input-group-text {
    border-radius: 0.625rem 0.625rem 0 0 !important;
    width: 100%;
    justify-content: center;
  }
  
  .input-group.flex-column .form-control,
  .input-group.flex-column .form-select {
    border-radius: 0 !important;
    width: 100%;
  }
  
  .input-group.flex-column .btn {
    border-radius: 0 0 0.625rem 0.625rem !important;
    width: 100%;
  }
  
  /* Tables - Horizontal scroll on mobile */
  .table-responsive {
    border-radius: 0.75rem;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
  
  .table {
    font-size: 0.875rem;
    margin-bottom: 0;
  }
  
  .table th,
  .table td {
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
    vertical-align: middle;
  }
  
  .table th {
    font-size: 0.8rem;
    font-weight: 600;
    background-color: #f8f9fa;
  }
  
  /* Table action buttons - Stack on mobile */
  .table .btn-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  .table .btn-sm {
    min-height: 32px;
    padding: 0.375rem 0.625rem;
    font-size: 0.8rem;
  }
  
  /* Hide less important columns on mobile */
  .table th.d-none-mobile,
  .table td.d-none-mobile {
    display: none !important;
  }
  
  /* Modals - Full screen on mobile */
  .modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
  }
  
  .modal-content {
    border-radius: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: none;
  }
  
  .modal-header {
    padding: 1rem;
    flex-shrink: 0;
  }
  
  .modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
  }
  
  .modal-footer {
    padding: 1rem;
    flex-shrink: 0;
    border-top: 1px solid #e9ecef;
  }
  
  .modal-footer .btn {
    flex: 1;
    margin: 0 0.25rem;
  }
  
  .modal-footer .btn:first-child {
    margin-left: 0;
  }
  
  .modal-footer .btn:last-child {
    margin-right: 0;
  }
  
  /* Navbar adjustments */
  .navbar-custom {
    height: 60px;
  }
  
  .navbar-custom .navbar-nav .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  /* Breadcrumb */
  .breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }
  
  /* Spacing adjustments */
  .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }
  
  .row > * {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* Grid adjustments */
  .col-md-6,
  .col-lg-4,
  .col-lg-6,
  .col-xl-3 {
    margin-bottom: 1rem;
  }
  
  /* Charts - Responsive height */
  canvas {
    max-height: 250px !important;
  }
  
  /* Icon fixes - prevent distortion on mobile */
  .table i[class*="fa-"],
  .table .fa {
    min-width: 16px !important;
    width: 16px !important;
    flex-shrink: 0 !important;
    text-align: center !important;
  }
  
  .d-flex i[class*="fa-"],
  .d-flex .fa {
    flex-shrink: 0 !important;
  }
}

/* Small Mobile (≤576px) */
@media (max-width: 576px) {
  .main-content {
    padding: 0.5rem;
  }
  
  .content-header h1 {
    font-size: 1.25rem;
  }
  
  .stats-card {
    padding: 0.875rem 0.75rem;
  }
  
  .stats-card .stats-number {
    font-size: 1.375rem;
  }
  
  .stats-card .stats-label {
    font-size: 0.8rem;
  }
  
  .card-header-custom {
    padding: 0.75rem 0.875rem;
    font-size: 0.9rem;
  }
  
  .card-body {
    padding: 0.875rem;
  }
  
  .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
  
  .table {
    font-size: 0.8rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem 0.375rem;
  }
  
  .form-control,
  .form-select {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
  
  /* Hide less important elements on very small screens */
  .d-none-mobile {
    display: none !important;
  }
}
.card-custom {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: none;
  margin-bottom: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.card-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card-custom:hover {
  box-shadow: 0 12px 40px rgba(37,99,235,0.15);
  transform: translateY(-2px);
}
.card-custom:hover::before {
  opacity: 1;
}
.stats-card {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.stats-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(37,99,235,0.05) 0%, rgba(34,211,238,0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.stats-card:hover {
  box-shadow: 0 8px 32px rgba(37,99,235,0.12);
  transform: translateY(-4px);
}
.stats-card:hover::after {
  opacity: 1;
}
.stats-card .stats-label {
  font-size: 0.95rem;
  color: var(--muted);
}
.stats-card .stats-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text);
}
.stats-card .stats-icon {
  font-size: 2.2rem;
  opacity: 0.18;
}
.stats-card .stats-icon.primary { color: var(--primary); }
.stats-card .stats-icon.success { color: var(--success); }
.stats-card .stats-icon.warning { color: var(--warning); }
.card-header-custom {
  background: #f4f6fb;
  border-bottom: 1px solid #e9ecef;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  font-weight: 600;
  color: var(--text);
}
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--button);
  border-color: var(--button);
  color: var(--on-button);
}
.btn-outline-primary {
  color: var(--button);
  border-color: var(--button);
  background-color: transparent;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--button);
  border-color: var(--button);
  color: var(--on-button);
}
.btn-primary-custom {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border: none;
  color: var(--on-gradient);
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.75rem 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}
.btn-primary-custom::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
.btn-primary-custom:hover {
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
  color: var(--on-gradient);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.3);
}
.btn-primary-custom:hover::before {
  width: 300px;
  height: 300px;
}
.btn-primary-custom:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37,99,235,0.2);
}
.btn-success-custom {
  background: var(--success);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(16,185,129,0.2);
}
.btn-success-custom:hover {
  background: #059669;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16,185,129,0.3);
}
.btn-success-custom:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(16,185,129,0.2);
}
.btn-warning-custom {
  background: var(--warning);
  border: none;
  color: #232946;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(245,158,66,0.2);
}
.btn-warning-custom:hover {
  background: #f59e0b;
  color: #232946;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,66,0.3);
}
.btn-warning-custom:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(245,158,66,0.2);
}
.breadcrumb-custom {
  background: none;
  padding: 0;
  margin-bottom: 0.5rem;
}
.breadcrumb-custom .breadcrumb-item.active {
  color: var(--primary);
  font-weight: 600;
}
.file-type-icon {
  font-size: 1.5rem;
  margin-right: 0.5rem;
}
.file-type-pdf { color: #ef4444; }
.file-type-doc, .file-type-docx { color: #2563eb; }
.file-type-xls, .file-type-xlsx { color: #10b981; }
.file-type-jpg, .file-type-jpeg, .file-type-png { color: #f59e42; }
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
}
.modal-content {
  border-radius: var(--card-radius);
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
  border-bottom: 1px solid #e9ecef;
  padding: 1.25rem 1.5rem;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.modal-footer {
  border-top: 1px solid #e9ecef;
  padding: 1rem 1.5rem;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}

.modal-body {
  padding: 1.5rem;
}

/* Modal animations */
.modal.fade .modal-dialog {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: translate(0, 0);
}
.form-control-like {
  background: #f4f6fb;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
::-webkit-scrollbar {
  width: 8px;
  background: #e9ecef;
}
::-webkit-scrollbar-thumb {
  background: #bfc9d9;
  border-radius: 4px;
}
/* Responsive grid tweaks */
@media (max-width: 768px) {
  .main-content {
    padding: 1rem 0.5rem;
  }
  .card-custom, .stats-card {
    margin-bottom: 1rem;
  }
  .sidebar {
    width: 100vw;
    left: -100vw;
  }
  .sidebar.show {
    left: 0;
    width: 100vw;
  }
}

/* ===== LOGIN PAGE STYLES ===== */
body.login-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.login-container {
    min-height: 100vh;
    padding: 2rem 0;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.brand-text {
    font-family: 'Geologica', sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h2 {
    color: var(--text);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--muted);
    font-size: 1.1rem;
    font-weight: 400;
}

.login-page .form-label {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.login-page .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.login-page .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

.login-page .input-group-text {
    background: rgba(248, 250, 252, 0.8);
    border: 2px solid #e2e8f0;
    border-right: none;
    color: var(--muted);
}

.login-page .input-group .form-control {
    border-left: none;
}

.login-page .input-group .form-control:focus + .input-group-text,
.login-page .input-group .form-control:focus {
    border-color: var(--primary);
}

.login-page .btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.login-page .btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.login-page .btn-outline-secondary {
    border: 2px solid #e2e8f0;
    border-left: none;
    background: rgba(248, 250, 252, 0.8);
    color: var(--muted);
    transition: all 0.3s ease;
}

.login-page .btn-outline-secondary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-button);
}

.login-page .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.demo-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.demo-card .card-body {
    padding: 1.5rem;
}

.demo-card .card-title {
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
}

.demo-info {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.demo-info:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary);
}

.demo-info.active {
    background: rgba(37, 99, 235, 0.2);
    border-color: var(--primary);
    transform: scale(1.02);
}

.demo-info small {
    display: block;
    line-height: 1.4;
}

.demo-info .role-label {
    font-weight: 600;
    font-size: 0.875rem;
}

.demo-info .credentials {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--accent);
}

/* Firma Logosu (Sayfanın Altında) */
.developer-brand {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.developer-logo-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.developer-logo {
    height: 40px;
    width: auto;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.developer-logo-link:hover .developer-logo {
    opacity: 1;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .brand-text {
        font-size: 2rem;
    }
    
    .developer-brand {
        bottom: 10px;
    }
    
    .developer-logo {
        height: 32px;
    }
}

/* Status Badge Styles */
.badge-status {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-approved {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border-color: rgba(34, 197, 94, 0.2);
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

/* Alternative status badge classes for compatibility */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.status-badge.beklemede {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.2);
}

.status-badge.onaylandi {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border-color: rgba(34, 197, 94, 0.2);
}

.status-badge.reddedildi {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

/* Hover effects for status badges */
.badge-status:hover,
.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

/* Enhanced Pill Styles */
.pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2.5rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  width: 100%;
  position: relative;
}

.pill {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  border-radius: 1.5rem;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin: 0.125rem;
  max-width: calc(100% - 0.25rem);
  word-wrap: break-word;
  flex-shrink: 0;
}

.pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.pill:hover::before {
  opacity: 1;
}

.pill span {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.pill-remove {
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 0.875rem;
  background: none;
  border: none;
  padding: 0;
  border-radius: 50%;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.pill-remove:hover {
  color: white;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Form Control Like Container */
.form-control-like {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.form-control-like:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: white;
}

.form-control-like.readonly {
  background: #f1f5f9;
  border-color: #cbd5e1;
  cursor: not-allowed;
}

/* View-only form control (without input) */
.form-control-like.view-only {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  min-height: auto;
  display: block;
  transition: all 0.3s ease;
}

.form-control-like.view-only:hover {
  border-color: var(--primary);
  background: white;
}

/* Pills Input */
.pills-input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 0.875rem;
  color: var(--text);
  padding: 0.5rem 0;
  border-top: 1px solid #e2e8f0;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
}

.pills-input::placeholder {
  color: var(--muted);
  font-style: italic;
  font-size: 0.8rem;
}

.pills-input:focus {
  outline: none;
  border-top-color: var(--primary);
  background: rgba(255, 255, 255, 0.5);
}

.pills-input:disabled {
  background: transparent;
  color: var(--muted);
  cursor: not-allowed;
}

/* Category and Keyword specific styles */
.pill.category-pill {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.pill.category-pill:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.pill.keyword-pill {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.pill.keyword-pill:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

/* Avatar fixes - prevent distortion on mobile */
.avatar-sm,
.avatar-title {
  min-width: 32px !important;
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.avatar-sm img,
.avatar-title img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.avatar-sm i,
.avatar-title i {
  font-size: 0.875rem !important;
}

/* Table avatars - prevent distortion */
.table .avatar-sm,
.table .avatar-title {
  min-width: 28px !important;
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
}

.table .avatar-sm i,
.table .avatar-title i {
  font-size: 0.75rem !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .pills-container {
    gap: 0.375rem;
  }
  
  .pill {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    max-width: calc(100% - 0.125rem);
  }
  
  .pill span {
    max-width: 150px;
  }
  
  .form-control-like {
    padding: 0.5rem 0.75rem;
    min-height: 44px;
  }
}

.sidebar.collapsed {
  width: 60px;
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .brand-text {
  display: none;
}

.sidebar.collapsed .sidebar-logo {
  max-width: 40px;
}

.sidebar.collapsed .sidebar-header {
  padding: 1rem 0.5rem;
  text-align: center;
}

.sidebar.collapsed .nav-link {
  text-align: center;
  padding: 0.75rem 0.5rem;
  justify-content: center;
  position: relative;
}

.sidebar.collapsed .nav-link i {
  font-size: 1.1rem;
  margin: 0;
}

.sidebar.collapsed .nav-link:hover::after {
  content: attr(title);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  white-space: nowrap;
  z-index: 1060;
  margin-left: 0.5rem;
  pointer-events: none;
}

.sidebar.collapsed .nav-link:hover::before {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-right-color: rgba(0, 0, 0, 0.8);
  margin-left: -0.25rem;
  z-index: 1060;
  pointer-events: none;
}

.sidebar.collapsed .nav-header {
  display: none;
}

/* Navbar burger menu button styles */
.navbar-custom .btn-outline-secondary {
  color: var(--on-gradient);
  border-color: color-mix(in srgb, var(--on-gradient) 35%, transparent);
  background: transparent;
  transition: all 0.3s ease;
}

.navbar-custom .btn-outline-secondary:hover {
  color: var(--on-gradient);
  border-color: color-mix(in srgb, var(--on-gradient) 60%, transparent);
  background: color-mix(in srgb, var(--on-gradient) 10%, transparent);
}

.navbar-custom .btn-outline-secondary:focus {
  color: var(--on-gradient);
  border-color: color-mix(in srgb, var(--on-gradient) 80%, transparent);
  background: color-mix(in srgb, var(--on-gradient) 15%, transparent);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--on-gradient) 25%, transparent);
}

.navbar-custom .btn-outline-secondary:active {
  color: var(--on-gradient);
  border-color: color-mix(in srgb, var(--on-gradient) 80%, transparent);
  background: color-mix(in srgb, var(--on-gradient) 20%, transparent);
}

/* Navbar alignment and spacing fixes */
.navbar-custom .navbar-nav {
  align-items: center;
}

.navbar-custom .nav-item {
  display: flex;
  align-items: center;
}

.navbar-custom .nav-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.navbar-custom .nav-link:hover {
  color: white;
}

.navbar-custom .nav-link:focus {
  color: white;
}

.navbar-custom .nav-link.active {
  color: white;
}

.navbar-custom .dropdown-toggle::after {
  margin-left: 0.5rem;
}

/* Dropdown menu styles */
.navbar-custom .dropdown-menu {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.navbar-custom .dropdown-item {
  color: var(--text);
  transition: all 0.2s ease;
}

.navbar-custom .dropdown-item:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.navbar-custom .dropdown-item:focus {
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary);
}

.navbar-custom .dropdown-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

/* Two-Factor Authentication UI */
.twofa-status-card {
  border: 1px solid #e8edf5;
  border-radius: 14px;
  padding: 20px;
  background: linear-gradient(135deg, #f8faff 0%, #ffffff 90%);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}
.twofa-status-card .status-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
}
.twofa-status-card .status-title {
  font-weight: 700;
  font-size: 1.1rem;
}
.twofa-status-card .status-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
}
.twofa-status-card .status-icon.bg-success {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
}
.twofa-status-card .status-icon.bg-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
}

.twofa-method-selection .twofa-method-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.twofa-method-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.twofa-method-card:hover {
  transform: translateY(-2px);
  border-color: #6366f1;
  box-shadow: 0 14px 32px rgba(99, 102, 241, 0.15);
}
.twofa-method-card .method-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(59, 130, 246, 0.15));
  color: #4338ca;
  font-size: 1.5rem;
}
.twofa-method-card h5 {
  font-weight: 700;
  margin-bottom: 8px;
}
.twofa-method-card p {
  font-size: 0.9rem;
  min-height: 60px;
}
.twofa-method-card button {
  margin-top: 12px;
}

.twofa-authenticator-setup .qr-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border: 1px dashed #94a3b8;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.twofa-authenticator-setup .qr-wrapper img,
.twofa-authenticator-setup .qr-wrapper svg {
  max-width: 220px;
}
.twofa-authenticator-setup .qr-wrapper.fallback {
  flex-direction: column;
}
.twofa-authenticator-setup .manual-key-box {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.twofa-authenticator-setup .manual-key-box .label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(226, 232, 240, 0.7);
}
.twofa-authenticator-setup .manual-key-box .value {
  font-family: "Courier New", monospace;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}
.twofa-authenticator-setup .manual-key-box button {
  white-space: nowrap;
}

.twofa-verification input#twofaCodeInput {
  font-size: 1.1rem;
  letter-spacing: 0.4em;
  text-align: center;
  text-transform: uppercase;
}
.twofa-verification .alert-light {
  border-radius: 10px;
}

.twofa-sms-phone .form-label {
  font-weight: 600;
}

.backup-codes-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  padding: 16px;
  border: 1px dashed #94a3b8;
  border-radius: 12px;
  background: #f8fafc;
}
.backup-codes-list .code {
  font-family: "Courier New", monospace;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  letter-spacing: 0.08em;
}
.twofa-success .backup-codes-list {
  margin-top: 16px;
}
.twofa-success .success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.3);
}

/* Mobile navbar adjustments */
@media (max-width: 991.98px) {
  .navbar-custom .navbar-nav {
    margin-left: auto;
  }
  
  .navbar-custom .nav-item {
    margin-left: 0.5rem;
  }
  
  .navbar-custom .nav-link {
    padding: 0.5rem;
  }
  
  .navbar-custom .dropdown-menu {
    margin-top: 0.5rem;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: auto;
    min-width: 200px;
    z-index: 1050;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  }
  
  .navbar-custom .dropdown-menu.show {
    display: block;
    transform: none;
  }
}

/* Navbar container fixes */
.navbar-custom .container-fluid {
  overflow: visible;
  position: relative;
}

.navbar-custom .navbar-nav {
  align-items: center;
  position: relative;
}

/* Mevzuat ve Adres Bileşenleri */
.legislation-item {
    border-left: 4px solid var(--primary) !important;
    transition: all 0.3s ease;
}

.legislation-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.address-item {
    border-left: 4px solid var(--success) !important;
    transition: all 0.3s ease;
}

.address-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.address-item .btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.address-item .btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Koordinat kodu stili */
.address-item code {
    background-color: #f8f9fa;
    color: #e83e8c;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.875em;
}

/* Mevzuat badge stili */
.legislation-item .badge {
    font-size: 0.75em;
    padding: 0.375rem 0.5rem;
}

/* Adres harita butonu */
.address-item .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Responsive düzenlemeler */
@media (max-width: 768px) {
    .address-item .row {
        flex-direction: column;
    }
    
    .address-item .col-md-4 {
        margin-top: 1rem;
    }
    
    .legislation-item .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .legislation-item .me-3 {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
}

.decision-map {
    height: 420px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    z-index: 1;
}

.decision-map-toolbar .btn.active {
    background: var(--button);
    border-color: var(--button);
    color: var(--on-button);
}

.notification-menu {
    width: 340px;
    max-height: 380px;
    overflow: auto;
    padding-bottom: 0.25rem;
}

.notification-item {
    white-space: normal;
    border-bottom: 1px solid #f1f3f5;
}

.notification-item.unread {
    background: #f4f7ff;
}