/* Intranet specific styles - extends ../style.css */

html:has(#app .intranet-sidebar),
html:has(#app .intranet-sidebar) body {
  overflow-x: hidden;
}

#app {
  overflow-x: hidden;
  max-width: 100%;
}

/* Intranet sidebar */
.intranet-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebarW, 250px);
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-x: hidden;
}

.intranet-sidebar__header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.intranet-sidebar__logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.intranet-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.intranet-logo-img--login {
  width: 64px;
  height: 64px;
}

.intranet-logo-img--brand {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 4px 24px rgba(255, 140, 0, 0.5));
}

.intranet-sidebar__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.intranet-sidebar__subtitle {
  font-size: 12px;
  color: var(--muted);
}

.intranet-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  min-width: 0;
}

.intranet-sidebar__section {
  margin-bottom: 8px;
}

.intranet-sidebar__section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px 4px;
}

.intranet-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.intranet-nav-item:hover {
  background: var(--slate-100);
}

.intranet-nav-item.active {
  background: var(--police-50);
  color: var(--police);
}

.intranet-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.intranet-sidebar__section--meos {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.intranet-nav-item--meos {
  background: var(--police);
  color: white;
  margin-top: 0;
}

.intranet-nav-item--meos:hover {
  background: var(--police-hover);
  color: white;
}

.intranet-sidebar__footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.intranet-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--slate-100);
}

.intranet-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--police);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.intranet-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intranet-user-info {
  flex: 1;
  min-width: 0;
}

.intranet-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.intranet-user-rank {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main content area */
.intranet-main {
  margin-left: var(--sidebarW, 250px);
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
  max-width: 100%;
}

.intranet-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: var(--topH, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="dark"] .intranet-topbar {
  background: rgba(30, 41, 59, 0.8);
}

.intranet-topbar__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.intranet-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.intranet-content {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Dashboard widgets */
.intranet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.intranet-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.intranet-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.intranet-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.intranet-card__title svg {
  width: 18px;
  height: 18px;
  color: var(--police);
}

/* Clock widget */
.clock-widget {
  text-align: center;
  padding: 24px;
}

.clock-status {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.clock-status--active {
  color: var(--ok);
}

.clock-time {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.clock-date {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

.clock-btn {
  width: 100%;
}

/* Announcements */
.announcement-item {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--slate-50);
  margin-bottom: 8px;
  border-left: 3px solid var(--police);
}

.announcement-item:last-child {
  margin-bottom: 0;
}

.announcement-item--urgent {
  border-left-color: var(--danger);
  background: var(--red-50);
}

.announcement-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.announcement-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.announcement-meta {
  font-size: 11px;
  color: var(--slate-400);
  margin-top: 8px;
}

/* Quick links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.quick-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--slate-50);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition-fast);
  cursor: pointer;
  border: none;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.quick-link--meos {
  background: var(--police);
  color: white;
}

.quick-link--meos:hover {
  background: var(--police-hover, #2980b9);
  color: white;
}

.quick-link--meos svg {
  color: white;
}

.quick-link:hover {
  background: var(--slate-100);
}

.quick-link svg {
  width: 18px;
  height: 18px;
  color: var(--police);
}

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  text-align: center;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--slate-50);
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Empty state */
.intranet-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.intranet-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.intranet-empty__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.intranet-empty__text {
  font-size: 13px;
}

/* Login page - split screen design */
.intranet-login {
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-content: stretch;
  background: var(--bg);
}

#app:has(.intranet-login) {
  min-height: 100vh;
  min-height: 100svh;
}

/* Left brand panel */
.intranet-login__brand {
  flex: 1 1 280px;
  min-width: min(100%, 320px);
  background: linear-gradient(145deg, #0c2d4d 0%, var(--police) 40%, #1a5294 80%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.intranet-login__brand::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 50%),
    repeating-linear-gradient(-35deg, transparent, transparent 40px, rgba(255,255,255,0.02) 40px, rgba(255,255,255,0.02) 80px);
  pointer-events: none;
}

/* Floating particles */
.intranet-login__brand::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(2px 2px at 10% 30%, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 40% 60%, rgba(255,255,255,0.2), transparent),
    radial-gradient(2px 2px at 70% 20%, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 90% 80%, rgba(255,255,255,0.15), transparent),
    radial-gradient(2px 2px at 30% 90%, rgba(255,255,255,0.2), transparent),
    radial-gradient(2px 2px at 60% 40%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 80% 50%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 20% 70%, rgba(255,255,255,0.15), transparent);
  animation: loginParticles 20s linear infinite;
  pointer-events: none;
}

@keyframes loginParticles {
  0% { transform: translateY(0); }
  100% { transform: translateY(-30px); }
}

.intranet-login__brand-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 380px;
  animation: loginBrandSlide 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes loginBrandSlide {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.intranet-login__brand-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intranet-login__brand-title {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.intranet-login__brand-tag {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 32px;
  font-weight: 500;
}

.intranet-login__brand-divider {
  width: 60px;
  height: 2px;
  background: rgba(255,255,255,0.25);
  margin: 0 auto 32px;
  border-radius: 1px;
}

.intranet-login__brand-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.intranet-login__feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 400;
}

.intranet-login__feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

.intranet-login__brand-time {
  margin-top: 40px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* Right form panel */
.intranet-login__form-panel {
  flex: 1 1 280px;
  min-width: min(100%, 300px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.intranet-login__card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
  padding: 44px 40px;
  animation: loginCardSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s backwards;
}

@keyframes loginCardSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.intranet-login__header {
  text-align: center;
  margin-bottom: 32px;
}

.intranet-login__logo {
  width: 64px;
  height: 64px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.intranet-login__title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.intranet-login__subtitle {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.intranet-login__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.intranet-login__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.intranet-login__field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.intranet-login__field input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  transition: all 0.2s ease;
}

.intranet-login__field input:focus {
  outline: none;
  border-color: var(--police);
  box-shadow: 0 0 0 3px rgba(21, 66, 115, 0.12);
  background: var(--panel);
}

.intranet-login__pass-wrap {
  position: relative;
}

.intranet-login__pass-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  padding: 4px;
  line-height: 1;
}

.intranet-login__pass-toggle:hover {
  color: var(--text);
}

.intranet-login__submit {
  margin-top: 4px;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--police) 0%, #1a5294 100%);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(21, 66, 115, 0.3);
}

.intranet-login__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(21, 66, 115, 0.4);
}

.intranet-login__submit:active {
  transform: translateY(0);
}

.intranet-login__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.intranet-login__error {
  background: var(--red-50);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
  border: 1px solid rgba(220, 38, 38, 0.15);
  animation: loginShake 0.4s ease;
}

@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.intranet-login__footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}

/* Dark mode overrides */
[data-theme="dark"] .intranet-login__brand {
  background: linear-gradient(145deg, #0a1f33 0%, #154273 40%, #1a5294 80%, #0a1929 100%);
}

[data-theme="dark"] .intranet-login__card {
  background: var(--panel);
  border-color: var(--border);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

[data-theme="dark"] .intranet-login__field input {
  background: var(--slate-100);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .intranet-login__field input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: var(--panel);
}

/* Desktop: side by side */
@media (min-width: 761px) {
  .intranet-login {
    flex-wrap: nowrap;
    height: 100vh;
    height: 100svh;
  }
  .intranet-login__brand {
    flex: 1 1 50%;
    min-height: 100%;
    align-self: stretch;
  }
  .intranet-login__form-panel {
    flex: 1 1 50%;
    min-height: 100%;
    align-self: stretch;
  }
}

/* Mobile */
@media (max-width: 760px) {
  .intranet-login {
    min-height: 100svh;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }
  .intranet-login__brand {
    flex: 0 0 auto;
    min-height: 0;
    width: 100%;
    padding: 28px 20px 32px;
  }
  .intranet-login__brand-title {
    font-size: 28px;
  }
  .intranet-login__brand-features {
    display: none;
  }
  .intranet-login__brand-time {
    margin-top: 16px;
  }
  .intranet-login__form-panel {
    flex: 1 1 auto;
    width: 100%;
    padding: 8px 16px max(20px, env(safe-area-inset-bottom));
    justify-content: flex-start;
  }
  .intranet-login__card {
    padding: 28px 24px;
    max-width: none;
    box-shadow: none;
    border: none;
    background: transparent;
  }
}

/* Progress bar */
#intranet-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--police);
  z-index: 9999;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

#intranet-progress.active {
  animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
  0% { transform: scaleX(0); }
  50% { transform: scaleX(0.7); }
  100% { transform: scaleX(1); }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .intranet-sidebar {
    transform: translateX(-100%);
  }
  
  .intranet-sidebar.open {
    transform: translateX(0);
  }
  
  .intranet-main {
    margin-left: 0;
  }
  
  .intranet-content {
    padding: 16px;
  }
  
  .intranet-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-links {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   MODERN UI ENHANCEMENTS
   ============================================ */

/* Modal Styling */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--panel);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 600px;
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.user-edit-modal {
  max-width: 700px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, transparent 100%);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.application-summary-banner {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(243, 156, 18, 0.12);
  border: 1px solid rgba(243, 156, 18, 0.35);
  font-size: 14px;
  color: var(--text);
}

.application-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.application-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}

.application-card--new {
  border-color: rgba(52, 152, 219, 0.45);
  box-shadow: 0 0 0 1px rgba(52, 152, 219, 0.12);
}

.application-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.06) 0%, transparent 100%);
}

.application-card--new .application-card__header {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.14) 0%, transparent 100%);
}

.application-card__name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.application-card__meta {
  font-size: 12px;
  color: var(--muted);
}

.application-card__badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
  white-space: nowrap;
}

.application-card__status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.application-card__motivation {
  padding: 14px 16px;
}

.application-card__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}

.application-card__text {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text);
}

.application-card__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.application-card__status-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.application-status-select {
  min-width: 180px;
  max-width: 100%;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.form-group .input {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-group .input:focus {
  border-color: var(--police);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Permissions Section */
.permissions-section {
  background: var(--bg);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.permissions-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--police);
  margin: 0;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--panel);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.permission-item:hover {
  border-color: var(--border);
  background: var(--bg);
}

.permission-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--police);
  cursor: pointer;
}

/* Enhanced Cards */
.intranet-card {
  background: var(--panel);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 24px;
  transition: all 0.3s ease;
}

.intranet-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.intranet-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.intranet-card h3::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, var(--police) 0%, #2980b9 100%);
  border-radius: 2px;
}

/* Enhanced Table */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.table thead th {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.08) 0%, rgba(52, 152, 219, 0.02) 100%);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 14px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border);
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background: rgba(52, 152, 219, 0.04);
}

.table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* Enhanced Buttons */
.btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.intranet-card .btn:not(:disabled) {
  cursor: pointer;
  pointer-events: auto;
}

.intranet-card .btn.btnDanger:not(:disabled) {
  color: #fff;
}

.intranet-card .btn:not(.btnPrimary):not(.btnDanger):not(:disabled) {
  color: var(--text);
}

.btnPrimary {
  background: linear-gradient(135deg, var(--police) 0%, #2980b9 100%);
  border-color: var(--police);
  color: white;
}

.btnPrimary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2980b9 0%, var(--police) 100%);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btnDanger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border-color: #e74c3c;
  color: white;
}

.btnDanger:hover:not(:disabled) {
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* Enhanced Input */
.input {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.input:focus {
  outline: none;
  border-color: var(--police);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.input::placeholder {
  color: var(--muted);
}

select.input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: linear-gradient(135deg, var(--panel) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.2) 0%, rgba(52, 152, 219, 0.1) 100%);
  margin-bottom: 8px;
}

.stat-card__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-card__label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* Announcement Items */
.announcement-item {
  padding: 16px;
  border-radius: 12px;
  background: var(--bg);
  margin-bottom: 12px;
  border-left: 4px solid var(--police);
  transition: all 0.2s ease;
}

.announcement-item:hover {
  background: rgba(52, 152, 219, 0.05);
}

.announcement-item--urgent {
  border-left-color: #e74c3c;
  background: rgba(231, 76, 60, 0.05);
}

.announcement-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text);
}

.announcement-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 8px;
}

.announcement-meta {
  font-size: 12px;
  color: var(--muted);
}

/* Enhanced Sidebar */
.intranet-sidebar {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg) 100%);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
}

.intranet-sidebar__section .intranet-nav-item {
  border-radius: 10px;
  padding: 12px 16px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.intranet-sidebar__section .intranet-nav-item:not(.intranet-nav-item--meos):hover {
  background: rgba(52, 152, 219, 0.1);
}

.intranet-sidebar__section .intranet-nav-item.active {
  background: linear-gradient(135deg, var(--police) 0%, #2980b9 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Page Header */
.intranet-header {
  background: linear-gradient(135deg, var(--panel) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.intranet-header__title {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--police) 0%, #2980b9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Empty State */
.intranet-empty {
  text-align: center;
  padding: 60px 20px;
}

.intranet-empty__icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.intranet-empty__text {
  font-size: 16px;
  color: var(--muted);
  max-width: 300px;
  margin: 0 auto;
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Beheer Tabs */
.intranet-card .btn {
  margin-right: 8px;
  margin-bottom: 8px;
}

/* Toast Improvements */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  z-index: 2000;
  animation: toastIn 0.3s ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.toast-success {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
}

.toast-error {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

.toast-info {
  background: linear-gradient(135deg, var(--police) 0%, #2980b9 100%);
  color: white;
}

.toast-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.intranet-topbar {
  gap: 16px;
}

.topbar-search-wrap {
  flex: 1;
  max-width: 420px;
  position: relative;
  margin: 0 12px;
}

.topbar-search-input {
  width: 100%;
  font-size: 13px;
  padding: 8px 12px;
}

.topbar-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
}

.topbar-search-section {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.topbar-search-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.topbar-search-item:hover {
  background: rgba(52, 152, 219, 0.08);
}

.topbar-search-empty {
  padding: 12px;
  font-size: 13px;
  color: var(--muted);
}

.topbar-notif-wrap {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  line-height: 16px;
  pointer-events: none;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, 90vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  z-index: 300;
  overflow: hidden;
}

.notification-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.notification-panel__list {
  max-height: 360px;
  overflow-y: auto;
}

.notification-panel__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.notification-panel__item:hover {
  background: rgba(52, 152, 219, 0.06);
}

.notification-panel__item--unread {
  background: rgba(52, 152, 219, 0.04);
}

.dash-widget-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

.dash-widget-item:last-child {
  border-bottom: none;
}

.dash-widget-item:hover {
  background: rgba(52, 152, 219, 0.06);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.team-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.team-card:hover {
  border-color: var(--police);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.team-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--police);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}

.team-card__avatar--lg {
  width: 72px;
  height: 72px;
  font-size: 22px;
}

.team-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card__body {
  flex: 1;
  min-width: 0;
}

.team-card__name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.team-card__meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.team-card__bio {
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.team-card__bio--empty {
  color: var(--muted);
  font-style: italic;
}

.profile-photo-preview {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--police);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-upload-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.password-rules {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 12px;
}

.password-rules__item {
  padding: 4px 0 4px 22px;
  position: relative;
  color: var(--muted);
}

.password-rules__item::before {
  content: '○';
  position: absolute;
  left: 0;
  color: var(--muted);
}

.password-rules__item--ok {
  color: var(--success, #27ae60);
}

.password-rules__item--ok::before {
  content: '✓';
  color: var(--success, #27ae60);
}

.vacancy-page-header {
  margin-bottom: 24px;
}

.vacancy-page-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
}

.vacancy-page-sub {
  margin: 0;
}

.vacancy-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.vacancy-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 12px;
}

.vacancy-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vacancy-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}

.vacancy-card--closed {
  opacity: 0.85;
}

.vacancy-card--has-pending {
  border-color: rgba(52, 152, 219, 0.45);
  box-shadow: 0 0 0 1px rgba(52, 152, 219, 0.1);
}

.vacancy-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, transparent 100%);
}

.vacancy-card--has-pending .vacancy-card__header {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.12) 0%, transparent 100%);
}

.vacancy-card__title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.vacancy-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vacancy-card__chip {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}

.vacancy-card__chip--warn {
  background: rgba(243, 156, 18, 0.12);
  border-color: rgba(243, 156, 18, 0.35);
  color: #d68910;
}

.vacancy-card__status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.vacancy-card__status--open {
  background: rgba(46, 204, 113, 0.15);
  color: #27ae60;
}

.vacancy-card__status--closed {
  background: rgba(127, 127, 127, 0.12);
  color: var(--muted);
}

.vacancy-card__body {
  padding: 0 18px;
}

.vacancy-card__details {
  border-bottom: 1px solid var(--border);
}

.vacancy-card__details:last-child {
  border-bottom: none;
}

.vacancy-card__summary {
  padding: 12px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vacancy-card__summary::-webkit-details-marker {
  display: none;
}

.vacancy-card__summary::before {
  content: '▸';
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.vacancy-card__details[open] .vacancy-card__summary::before {
  transform: rotate(90deg);
}

.vacancy-card__details-content {
  padding: 0 0 14px;
}

.vacancy-card__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}

.vacancy-card__text {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text);
  margin: 0;
}

.vacancy-card__req-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.vacancy-card__req-list li {
  margin-bottom: 4px;
}

.vacancy-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.vacancy-card__footer-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.vacancy-card__footer-meta--applied {
  color: #3498db;
}

.vacancy-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.vacancy-card__manage {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-right: 8px;
  border-right: 1px solid var(--border);
  margin-right: 4px;
}

.vacancy-card__manage .btn {
  padding: 5px 10px;
  font-size: 12px;
}

.vacancy-card__manage .btn.btnDanger {
  padding: 5px 10px;
}

.vacancy-form-panel,
.apply-modal-panel {
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.vacancy-questions-field {
  margin-bottom: 12px;
}

.vacancy-questions-label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
}

.vacancy-questions-hint {
  font-size: 12px;
  margin: 0 0 10px;
}

.vacancy-questions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vacancy-question-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.vacancy-question-input {
  flex: 1;
}

.vacancy-question-remove {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 16px;
  line-height: 1;
}

.vacancy-questions-add {
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 12px;
}

.apply-modal-body {
  margin-top: 16px;
}

.apply-questions-block {
  margin-bottom: 16px;
}

.apply-questions-block__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 10px;
}

.apply-question {
  margin-bottom: 14px;
}

.apply-question__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
}

.apply-motivation-block {
  margin-bottom: 12px;
}

.apply-modal-hint {
  font-size: 12px;
  margin: 0;
}

.application-card__qa {
  margin-bottom: 12px;
}

.application-card__qa:last-child {
  margin-bottom: 0;
}

.application-card__qa-q {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.doc-page-header {
  margin-bottom: 20px;
}

.doc-page-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
}

.doc-page-sub {
  margin: 0;
}

.doc-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.doc-toolbar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-filters {
  margin-bottom: 16px;
}

.doc-filters__pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-filter-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.doc-filter-pill:hover {
  border-color: rgba(52, 152, 219, 0.45);
  color: var(--text);
}

.doc-filter-pill--active {
  background: rgba(52, 152, 219, 0.15);
  border-color: rgba(52, 152, 219, 0.45);
  color: #3498db;
}

.doc-list__meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.doc-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.doc-card:hover {
  border-color: rgba(52, 152, 219, 0.35);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.doc-card--link {
  border-color: rgba(155, 89, 182, 0.25);
}

.doc-card--link:hover {
  border-color: rgba(155, 89, 182, 0.45);
}

.doc-card__main {
  display: flex;
  gap: 14px;
  padding: 16px 16px 12px;
  flex: 1;
  align-items: flex-start;
}

.doc-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-card__icon svg {
  width: 20px;
  height: 20px;
}

.doc-card__icon--file {
  background: rgba(52, 152, 219, 0.12);
  color: #3498db;
}

.doc-card__icon--link {
  background: rgba(155, 89, 182, 0.12);
  color: #9b59b6;
}

.doc-card__content {
  min-width: 0;
  flex: 1;
}

.doc-card__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.35;
  word-break: break-word;
}

.doc-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.doc-card__chip {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}

.doc-card__chip--link {
  background: rgba(155, 89, 182, 0.1);
  border-color: rgba(155, 89, 182, 0.3);
  color: #9b59b6;
}

.doc-card__chip--restricted {
  background: rgba(243, 156, 18, 0.1);
  border-color: rgba(243, 156, 18, 0.35);
  color: #d68910;
}

.doc-card__footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.doc-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-card__manage {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 8px;
  margin-right: 4px;
  border-right: 1px solid var(--border);
}

.doc-card__manage .btn {
  padding: 5px 10px;
  font-size: 12px;
}

.doc-card__actions .btn,
.doc-card__actions a.btn {
  padding: 6px 12px;
  font-size: 12px;
  text-decoration: none;
}
