/* ============================================================================
   Hub820 - Acadia Theme
   Dark Navy: #1a3a5c
   Darker Navy: #1a2332
   Copper/Bronze: #b87333
   Light Copper: #c49a6c
   Warm Cream: #f5f0eb
   Light Blue: #e8f0f8
   Focus Blue: #4a7fb5
   ============================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 10pt;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(180deg, #e8f5f9 0%, #b8dff0 12%, #7bbdd8 28%, #4a8ec2 45%, #2d5a8c 65%, #1a3a5c 82%, #0d2137 100%) fixed;
  min-height: 100vh;
}

/* ============================================================================
   Scrollbar Styling
   ============================================================================ */

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f5f0eb;
}

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

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

/* ============================================================================
   Topbar Navigation
   ============================================================================ */

.topbar {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  color: white;
  padding: 8px 24px;
  height: 88px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14pt;
  font-weight: 600;
  color: white;
}

.topbar-brand-icon {
  width: 32px;
  height: 32px;
  background-color: #b87333;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-logout-btn {
  background: rgba(15, 40, 70, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font-size: 10pt;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 4px;
  transition: all 0.2s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  text-decoration: none;
  white-space: nowrap;
}

.topbar-logout-btn:hover {
  background: rgba(15, 40, 70, 0.85);
  border-color: rgba(255, 255, 255, 0.9);
  color: #ffffff;
  text-decoration: none;
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(26, 58, 92, 0.2);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  min-width: 200px;
  display: none;
  z-index: 1001;
  margin-top: 6px;
  overflow: hidden;
}

.user-dropdown-menu.active {
  display: block;
}

.user-dropdown-menu a,
.user-dropdown-menu button {
  display: block;
  width: 100%;
  padding: 11px 16px;
  text-align: left;
  background: none;
  border: none;
  color: #1a3a5c;
  cursor: pointer;
  font-size: 10pt;
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 58, 92, 0.1);
}

.user-dropdown-menu a:last-child,
.user-dropdown-menu button:last-child {
  border-bottom: none;
}

.user-dropdown-menu a:hover,
.user-dropdown-menu button:hover {
  background-color: rgba(184, 115, 51, 0.12);
  color: #b87333;
}

.user-info {
  font-size: 9pt;
  color: #888;
  padding: 10px 16px 4px;
}

.user-email {
  font-weight: 600;
  color: #1a3a5c;
  padding: 0 16px 10px;
  display: block;
  font-size: 10pt;
  border-bottom: 1px solid rgba(26,58,92,0.1);
  color: #1a3a5c;
}

/* ============================================================================
   Mobile Sidebar Toggle
   ============================================================================ */

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

/* ============================================================================
   Sidebar Navigation
   ============================================================================ */

.sidebar {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  color: white;
  width: 240px;
  padding: 20px;
  min-height: calc(100vh - 88px);
  position: fixed;
  left: 0;
  top: 88px;
  overflow-y: auto;
  z-index: 999;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.12);
}

.sidebar.hidden {
  display: none;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 8px;
}

.sidebar-nav a {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 10pt;
  transition: all 0.2s;
}

.sidebar-nav a:hover {
  background-color: #b87333;
  color: white;
}

.sidebar-nav a.active {
  background-color: #b87333;
  color: white;
  font-weight: 600;
}

.sidebar-section-title {
  font-size: 9pt;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(0,0,0,0.25);
  margin-top: 16px;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* ============================================================================
   Main Content Area
   ============================================================================ */

.main-content {
  margin-left: 240px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.07);
  min-height: 100vh;
  min-height: calc(100vh - 56px);
}

body.no-sidebar .main-content {
  margin-left: 0;
}

.main-content h1, .main-content h2, .main-content h3 {
  color: #ffffff;
}

.main-content .text-muted {
  color: rgba(255,255,255,0.7) !important;
}

.dashboard-intro h1 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.dashboard-intro p {
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ============================================================================
   Form Styles
   ============================================================================ */

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 10pt;
  font-weight: 500;
  color: #1a3a5c;
}

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="color"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 10pt;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="color"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #4a7fb5;
  box-shadow: 0 0 0 3px rgba(74, 127, 181, 0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn,
button[type="submit"],
button[type="button"],
a.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #1a3a5c;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 10pt;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  text-align: center;
}

.btn:hover,
button[type="submit"]:hover,
button[type="button"]:hover,
a.btn:hover {
  background-color: #b87333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active,
button[type="submit"]:active,
button[type="button"]:active,
a.btn:active {
  transform: translateY(0);
}

.btn-primary,
a.btn.btn-primary,
button.btn-primary {
  background-color: #b87333 !important;
  color: #ffffff !important;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #a0621e;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-danger {
  background-color: #721c24;
}

.btn-danger:hover {
  background-color: #c3212b;
}

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

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-small {
  padding: 6px 12px;
  font-size: 9pt;
  min-width: 90px;
  text-align: center;
  color: white !important;
}

.btn-block {
  display: block;
  width: 100%;
}

/* ============================================================================
   Login Page
   ============================================================================ */

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-page .topbar {
  display: none;
}

.login-page .main-content {
  margin-left: 0;
  padding: 0;
  min-height: 0;
  width: 100%;
}

.login-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  width: 100%;
  overflow: hidden;
}

.login-header {
  background-color: #1a2332;
  color: white;
  padding: 24px;
  text-align: center;
}

.login-header h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.login-header .subtitle {
  font-size: 12px;
  color: #c49a6c;
  font-weight: 500;
}

.login-body {
  padding: 24px;
}

.login-body .form-group {
  margin-bottom: 12px;
}

.login-body .btn-block {
  margin-top: 20px;
  margin-bottom: 16px;
}

.login-footer {
  text-align: center;
  padding: 0 24px 20px;
  font-size: 9pt;
  color: #999;
}

.forgot-password-link {
  text-align: center;
  margin-top: 12px;
}

.forgot-password-link a {
  font-size: 10pt;
  color: #4a7fb5;
  text-decoration: none;
}

.forgot-password-link a:hover {
  text-decoration: underline;
  color: #b87333;
}

/* ============================================================================
   Flash Messages & Toast Notifications
   ============================================================================ */

.flash-messages {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 2000;
  max-width: 400px;
}

.alert {
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 5px;
  font-size: 10pt;
  border-left: 4px solid;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border-color: #28a745;
}

.alert-danger,
.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

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

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border-color: #ffeeba;
}

.alert-close {
  float: right;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.7;
  padding: 0;
  margin: -4px -4px -4px 8px;
}

.alert-close:hover {
  opacity: 1;
}

/* ============================================================================
   Panels & Cards
   ============================================================================ */

.panel {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  margin-bottom: 20px;
  overflow: hidden;
}

.panel-title {
  background: linear-gradient(135deg, #3a7bb8 0%, #5a9fd4 100%);
  color: #ffffff;
  padding: 12px 20px;
  font-size: 11pt;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.panel-body {
  padding: 20px;
}

.panel-footer {
  padding: 16px 20px;
  border-top: 1px solid #eee;
  background-color: #fafafa;
  border-radius: 0 0 10px 10px;
}

/* ============================================================================
   Dashboard & Cards
   ============================================================================ */

.dashboard-intro {
  margin-bottom: 24px;
}

.dashboard-intro h1 {
  font-size: 28px;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  margin-bottom: 4px;
}

.dashboard-intro .company-info {
  font-size: 11pt;
  color: #666;
}

.dashboard-intro .company-logo {
  max-height: 80px;
  max-width: 200px;
  margin-top: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.module-card {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.module-card-header {
  background-color: #1a3a5c;
  color: white;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.module-card-icon {
  width: 40px;
  height: 40px;
  background-color: #b87333;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
}

.module-card-title {
  font-size: 13pt;
  font-weight: 600;
  flex: 1;
}

.module-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.module-card-description {
  font-size: 10pt;
  color: #666;
  margin-bottom: 12px;
  flex: 1;
}

.module-card-footer {
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.module-card-link {
  color: #4a7fb5;
  text-decoration: none;
  font-weight: 500;
  font-size: 10pt;
}

.module-card-link:hover {
  color: #b87333;
  text-decoration: underline;
}

.no-modules {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.no-modules-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ============================================================================
   Stats Cards (Admin Dashboard)
   ============================================================================ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 24px 28px;
  border-top: 4px solid #b87333;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.stat-value {
  font-size: 42px;
  font-weight: 700;
  color: #1a3a5c;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
}

/* ============================================================================
   Tables
   ============================================================================ */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.admin-table thead {
  background-color: #1a3a5c;
  color: white;
}

.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 10pt;
  border: none;
}

.admin-table tbody tr {
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

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

.admin-table tbody tr:hover {
  background-color: #e8f0f8;
}

.admin-table td {
  padding: 12px 16px;
  font-size: 10pt;
  color: #333;
}

.admin-table a {
  color: #4a7fb5;
  text-decoration: none;
}

.admin-table a:hover {
  text-decoration: underline;
  color: #b87333;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.table-actions .btn,
.table-actions a.btn,
.table-actions button.btn {
  width: 110px;
  height: 34px;
  line-height: 20px;
  padding: 6px 0;
  text-align: center;
  box-sizing: border-box;
  font-size: 9pt;
}

.table-action-btn {
  padding: 4px 12px;
  font-size: 9pt;
  white-space: nowrap;
}

/* ============================================================================
   Badges & Status Indicators
   ============================================================================ */

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 9pt;
  font-weight: 500;
  text-align: center;
}

.badge-primary {
  background-color: #d1ecf1;
  color: #0c5460;
}

.badge-success {
  background-color: #d4edda;
  color: #155724;
}

.badge-danger {
  background-color: #f8d7da;
  color: #721c24;
}

.badge-warning {
  background-color: #fff3cd;
  color: #856404;
}

.badge-secondary {
  background-color: #e2e3e5;
  color: #383d41;
}

.status-active {
  background-color: #d4edda;
  color: #155724;
}

.status-inactive {
  background-color: #e2e3e5;
  color: #383d41;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

/* ============================================================================
   Utility Classes
   ============================================================================ */

.text-muted {
  color: #999;
  font-size: 9pt;
}

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

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

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

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

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

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

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

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

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

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

.hidden {
  display: none;
}

.visible {
  display: block;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

/* Tables — always horizontally scrollable so they never overflow */
.panel-body {
  overflow-x: auto;
}

.admin-table {
  min-width: 500px;
}

/* Medium screens — shrink sidebar slightly */
@media (max-width: 1100px) {
  .sidebar {
    width: 200px;
  }
  .main-content {
    margin-left: 200px;
  }
}

/* Tablet — shrink sidebar to icon-width */
@media (max-width: 900px) {
  .sidebar {
    width: 160px;
    padding: 16px 10px;
  }
  .main-content {
    margin-left: 160px;
    padding: 16px;
  }
  .sidebar-section-title {
    font-size: 8pt;
    letter-spacing: 0;
  }
  .sidebar-nav a {
    font-size: 9pt;
    padding: 8px 8px;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile — sidebar collapses, toggle shows */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: auto;
    min-height: auto;
    padding: 12px;
  }

  .sidebar.hidden {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 16px;
  }

  .sidebar-toggle {
    display: block;
  }

  .topbar {
    padding: 12px 16px;
  }

  .topbar-right {
    gap: 12px;
  }

  .user-dropdown-menu {
    right: -10px;
    left: auto;
  }

  .flash-messages {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .login-container {
    margin: 20px;
  }
}

/* ============================================================================
   Pagination
   ============================================================================ */

.pagination {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-top: 20px;
  justify-content: center;
}

.pagination li {
  margin: 0;
}

.pagination a,
.pagination span {
  display: block;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #4a7fb5;
  font-size: 10pt;
}

.pagination a:hover {
  background-color: #e8f0f8;
}

.pagination .active span {
  background-color: #1a3a5c;
  color: white;
  border-color: #1a3a5c;
}

.pagination .disabled span {
  color: #ccc;
  cursor: not-allowed;
}

/* ============================================================================
   File Upload & Drag Drop
   ============================================================================ */

.file-upload-area {
  border: 2px dashed #b87333;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  background-color: #f9f9f9;
  transition: all 0.2s;
  cursor: pointer;
}

.file-upload-area:hover,
.file-upload-area.dragover {
  background-color: #f0f5fa;
  border-color: #1a3a5c;
}

.file-upload-area input[type="file"] {
  display: none;
}

.file-upload-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.file-upload-text {
  font-size: 10pt;
  color: #666;
}

/* ============================================================================
   Color Picker Styling
   ============================================================================ */

input[type="color"] {
  width: 60px;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

/* ============================================================================
   Modal / Dialog Styles (if needed)
   ============================================================================ */

.confirm-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
}

.confirm-dialog.hidden {
  display: none;
}

.confirm-dialog-box {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
  padding: 24px;
}

.confirm-dialog-box h2 {
  font-size: 16px;
  color: #1a3a5c;
  margin-bottom: 12px;
}

.confirm-dialog-box p {
  font-size: 10pt;
  color: #666;
  margin-bottom: 20px;
}

.confirm-dialog-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.confirm-dialog-buttons .btn {
  flex: 1;
  text-align: center;
}

/* ============================================================================
   Data Directory
   ============================================================================ */

.dir-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #eef2f7;
  border: 1px solid #d0d9e4;
  border-radius: 5px;
  padding: 8px 14px;
  margin-bottom: 20px;
  font-size: 10pt;
  flex-wrap: wrap;
}

.dir-crumb-link {
  color: #1a3a5c;
  text-decoration: none;
  font-weight: 500;
}

.dir-crumb-link:hover {
  color: #b87333;
  text-decoration: underline;
}

.dir-crumb-sep {
  color: #aaa;
  font-size: 11pt;
}

/* Card grid layout */
.dir-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dir-card {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #d0d9e4;
  border-radius: 6px;
  padding: 14px 18px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dir-card:hover {
  border-color: #b87333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dir-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-right: 16px;
  background: #eef2f7;
}

.dir-icon-company .dir-emoji { font-size: 22px; }
.dir-icon-folder-modules .dir-emoji { font-size: 22px; }
.dir-icon-folder-users .dir-emoji { font-size: 22px; }
.dir-icon-module .dir-emoji { font-size: 20px; }
.dir-icon-user .dir-emoji { font-size: 20px; }

.dir-card-body {
  flex: 1;
  min-width: 0;
}

.dir-card-name {
  font-weight: 600;
  font-size: 11pt;
  margin-bottom: 2px;
}

.dir-link {
  text-decoration: none;
  font-weight: 600;
}

.dir-link-folder {
  color: #1a3a5c;
}

.dir-link-folder:hover {
  color: #b87333;
  text-decoration: underline;
}

.dir-card-detail {
  color: #777;
  font-size: 9pt;
}

.dir-card-actions {
  flex-shrink: 0;
  margin-left: 12px;
}

/* ============================================================================
   Modal
   ============================================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #1a3a5c;
  color: white;
}

.modal-header h2 {
  margin: 0;
  font-size: 14pt;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 20pt;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.8;
  min-width: auto;
}

.modal-close:hover {
  opacity: 1;
  background: none;
  transform: none;
}

.modal-body {
  padding: 24px;
}
