/* Scandinavian Enterprise Real-Estate Theme for WebMegler Archive Portal */
:root {
  --navy-dark: #0A192F;
  --navy-sidebar: #0F2137;
  --navy-active: #0066CC;
  --navy-hover: #162B4D;
  --bg-page: #F4F6F9;
  --bg-card: #FFFFFF;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --border-light: #E2E8F0;
  
  --accent-blue: #0284C7;
  --accent-blue-bg: #E0F2FE;
  --accent-green: #16A34A;
  --accent-green-bg: #DCFCE7;
  --accent-orange: #EA580C;
  --accent-orange-bg: #FFEDD5;
  --accent-red: #DC2626;
  --accent-red-bg: #FEE2E2;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --radius: 8px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

tr.row-red-company {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  border-left: 4px solid #dc2626;
}

.badge-danger-red {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Breadcrumbs */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.breadcrumb a, .breadcrumb .crumb-link {
  color: #0066CC;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s ease;
}
.breadcrumb a:hover, .breadcrumb .crumb-link:hover {
  text-decoration: underline;
  color: #004C99;
}
.breadcrumb .crumb-separator {
  color: #94A3B8;
  user-select: none;
  font-size: 0.8rem;
}
.breadcrumb .crumb-current {
  color: #1E293B;
  font-weight: 700;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-size: 14px;
}

/* Sidebar Layout */
.sidebar {
  width: 250px;
  background-color: var(--navy-sidebar);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  user-select: none;
}

.brand-container {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #FFFFFF;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 3px;
  color: #94A3B8;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-group-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748B;
  padding: 12px 12px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #CBD5E1;
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
  background: var(--navy-hover);
  color: #FFFFFF;
}

.nav-item.active {
  background: var(--navy-active);
  color: #FFFFFF;
  font-weight: 600;
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-sub-items {
  padding-left: 32px;
  margin-bottom: 4px;
}

.nav-sub-item {
  display: block;
  padding: 6px 12px;
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.88rem;
  border-radius: 4px;
  cursor: pointer;
}

.nav-sub-item:hover, .nav-sub-item.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: #94A3B8;
}

.office-card-sm {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
}

.office-card-sm .office-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #64748B;
  font-weight: 600;
}

.office-card-sm .office-name {
  font-weight: 600;
  color: #FFFFFF;
  margin-top: 2px;
  font-size: 0.9rem;
}

.office-card-sm .office-org {
  font-size: 0.75rem;
  color: #94A3B8;
  margin-top: 2px;
}

.btn-switch-office {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #38BDF8;
  text-decoration: none;
  font-size: 0.8rem;
  margin-top: 8px;
  cursor: pointer;
}

.btn-switch-office:hover {
  text-decoration: underline;
}

/* App Main Body */
.app-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.top-header {
  height: 64px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
}

.header-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.office-selector-wrapper select {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.search-header-input {
  position: relative;
  width: 280px;
}

.search-header-input input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 0.85rem;
  outline: none;
}

.search-header-input .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0284C7;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Page Content View Area */
.content-area {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.page-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.kpi-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 10px 0 4px;
}

.kpi-card.solgt .kpi-value { color: var(--accent-green); }
.kpi-card.pending .kpi-value { color: var(--accent-orange); }
.kpi-card.cancelled .kpi-value { color: var(--accent-red); }
.kpi-card.other .kpi-value { color: #8B5CF6; }

.kpi-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.kpi-badge.up { background: var(--accent-green-bg); color: var(--accent-green); }
.kpi-badge.down { background: var(--accent-red-bg); color: var(--accent-red); }

.kpi-icon-box {
  position: absolute;
  right: 16px;
  top: 18px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  color: var(--text-muted);
}

/* Filter Controls Bar */
/* Filter Controls Bar */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.filter-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-search-group {
  flex: 1;
  min-width: 260px;
}

.filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  height: 16px;
  line-height: 16px;
  display: block;
}

.search-field {
  position: relative;
  width: 100%;
}

.search-field input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.88rem;
  outline: none;
  background: #FFFFFF;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-field input:focus {
  border-color: var(--navy-active);
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15);
}

.search-field .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.select-filter {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: #FFFFFF;
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
  min-width: 130px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select-filter:focus {
  border-color: var(--navy-active);
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15);
}

.filter-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  align-self: flex-end;
}

.filter-actions-group .btn {
  height: 40px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--navy-active);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #0052A3;
}

.btn-outline {
  background: #FFFFFF;
  border-color: var(--border-light);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-page);
}

.btn-excel {
  background: #FFFFFF;
  border: 1px solid #0066CC;
  color: #0066CC;
}

.btn-excel:hover {
  background: #EFF6FF;
}

/* Enterprise Data Table */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: #F8FAFC;
  padding: 12px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
  color: var(--text-main);
}

.data-table tbody tr:hover {
  background: #F8FAFC;
  cursor: pointer;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.badge-solgt {
  background: var(--accent-green-bg);
  color: var(--accent-green);
}

.badge-pending {
  background: var(--accent-orange-bg);
  color: var(--accent-orange);
}

.badge-cancelled {
  background: var(--accent-red-bg);
  color: var(--accent-red);
}

.badge-type {
  background: #F1F5F9;
  color: #475569;
}

/* Pagination */
.table-footer {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.page-btn.active {
  background: var(--navy-active);
  color: #FFFFFF;
  border-color: var(--navy-active);
  font-weight: 700;
}

.page-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #F8FAFC;
}

/* Assignment Detail Hero & Layout */
.assignment-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.hero-main-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 24px;
}

.house-img-box {
  width: 240px;
  height: 160px;
  border-radius: 6px;
  overflow: hidden;
  background: #E2E8F0;
  flex-shrink: 0;
}

.house-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-address {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}

.hero-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.specs-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  font-size: 0.85rem;
}

.specs-label {
  color: var(--text-muted);
}

.specs-val {
  font-weight: 600;
  color: var(--text-main);
}

.overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
}

/* Tab Bar */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--navy-active);
  border-bottom-color: var(--navy-active);
}

.tab-badge {
  background: #F1F5F9;
  color: #475569;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Warning Banner */
.warning-banner {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #1E40AF;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

/* Timeline Components */
.timeline {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--border-light);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-dot {
  position: absolute;
  left: -26px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--navy-active);
}

.timeline-dot.pending {
  background: #CBD5E1;
}

.timeline-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.timeline-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Modal Window */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  display: none;
}

.modal-content {
  background: #FFFFFF;
  border-radius: var(--radius);
  width: 800px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
  overflow: hidden;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Office Explorer & Extended Admin Styles */
.modal-large {
  width: 1200px;
  max-width: 95vw;
  height: 85vh;
}

.table-footer-summary {
  background: #F8FAFC;
  font-weight: 700;
  border-top: 2px solid var(--border-light);
}

.summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #F8FAFC;
  border-top: 1px solid var(--border-light);
  font-size: 0.88rem;
  border-radius: 0 0 var(--radius) var(--radius);
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  background: #F1F5F9;
  color: var(--text-main);
}

.filter-pill.active {
  background: var(--navy-active);
  color: #FFFFFF;
  border-color: var(--navy-active);
}

.badge-exported {
  background: var(--accent-green-bg);
  color: var(--accent-green);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  display: inline-block;
}

.badge-partial {
  background: var(--accent-orange-bg);
  color: var(--accent-orange);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  display: inline-block;
}

.badge-pending {
  background: #F1F5F9;
  color: var(--text-muted);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  display: inline-block;
}

/* Document Details Sub-table & Warnings */
.prop-doc-row {
  background: #F8FAFC;
  border-bottom: 2px solid var(--border-light);
}

.prop-doc-container {
  padding: 16px 20px;
  background: #F8FAFC;
  border-radius: 6px;
  margin: 6px 12px 14px;
  border: 1px solid var(--border-light);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.doc-warning-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.doc-warning-banner.warning {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}

.doc-warning-banner.danger {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

.doc-warning-banner.success {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  font-size: 0.82rem;
}

.doc-table th {
  background: #EDF2F7;
  color: var(--text-main);
  padding: 8px 12px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.doc-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

.doc-table tr:last-child td {
  border-bottom: none;
}

.doc-expand-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--navy-active);
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.doc-expand-btn:hover {
  background: var(--accent-blue-bg);
}

.badge-doc-downloaded {
  background: #DCFCE7;
  color: #16A34A;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  border: 1px solid #86EFAC;
}

.badge-doc-missing-404 {
  background: #FEF3C7;
  color: #B45309;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  border: 1px solid #FCD34D;
}

.badge-doc-missing-disk {
  background: #FEE2E2;
  color: #DC2626;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  border: 1px solid #FCA5A5;
}

/* ==========================================================================
   AUTHENTICATION & USER MANAGEMENT STYLES
   ========================================================================== */

/* Fullscreen Login Overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #0B1E36 0%, #1A365D 60%, #0F172A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 36px 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: modalFadeIn 0.25s ease-out;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.login-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #F87171;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: shake 0.2s ease-in-out;
}

.btn-logout {
  padding: 6px 12px;
  font-size: 0.82rem;
  color: #DC2626;
  border-color: #FECACA;
  background: #FFF5F5;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #B91C1C;
}

.btn-text-action {
  background: transparent;
  border: none;
  color: #0066CC;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.btn-text-action:hover {
  text-decoration: underline;
}

.badge-role-admin {
  background: #EEF2FF;
  color: #4338CA;
  border: 1px solid #C7D2FE;
  font-weight: 700;
}

.badge-role-broker {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
  font-weight: 600;
}

.table-btn-action {
  padding: 4px 8px;
  font-size: 0.78rem;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.table-btn-action:hover {
  background: #F1F5F9;
}

.table-btn-danger {
  color: #DC2626;
  border-color: #FECACA;
  background: #FFF5F5;
}

.table-btn-danger:hover {
  background: #FEE2E2;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Offices Admin table adjustments */
.col-office-company {
  max-width: 280px;
  width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#failedDocsModal .data-table th,
#failedDocsModal .data-table td {
  padding: 10px 14px;
}


