body {
  background: #f5f8fc !important;
  color: #2c3e50;
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', Arial, sans-serif !important;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
}

html,
body {
  height: 100%;
}

#content,
.orf-main,
.orf-page-wrapper,
.orf-home-page {
  flex: 1 0 auto;
}

a { color: #1a75bb; }
a:hover { color: #1560a0; }

.masthead,
.account-masthead,
.site-footer,
.site-title,
.ckan-version,
nav.navbar {
  display: none !important;
}

.btn-primary {
  background-color: #1a75bb !important;
  border-color: #1a75bb !important;
}

.btn-primary:hover {
  background-color: #1560a0 !important;
  border-color: #1560a0 !important;
}

.orf-header {
  background: #1a2a3a;
  border-bottom: 4px solid #1a75bb;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.orf-header-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1100px;
  padding: 12px 24px;
}

.orf-brand {
  align-items: center;
  display: flex;
  gap: 12px;
  text-decoration: none;
}

.orf-logo-wrap {
  background: #ffffff;
  border-radius: 4px;
  display: inline-flex;
  padding: 5px 10px;
}

.orf-logo-wrap img {
  display: block;
  height: 36px;
  object-fit: contain;
}

.orf-brand-copy strong {
  color: #ffffff;
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
}

.orf-brand-copy small {
  color: #8da9c4;
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.orf-nav {
  align-items: center;
  display: flex;
  gap: 18px;
}

.orf-nav a {
  color: #cdd8e3;
  font-size: 13px;
  text-decoration: none;
}

.orf-nav a:hover { color: #ffffff; }

.orf-login {
  background: #1a75bb;
  border-radius: 4px;
  color: #ffffff !important;
  font-weight: 600;
  padding: 7px 18px;
}

.orf-logout {
  background: transparent;
  border: 1px solid #8da9c4;
  border-radius: 4px;
  color: #cdd8e3 !important;
  padding: 7px 16px;
}

.orf-footer {
  background: #1a2a3a;
  color: #8da9c4;
  flex-shrink: 0;
  font-size: 12px;
  margin-top: auto !important;
  padding: 24px;
  text-align: center;
}

footer.footer {
  flex-shrink: 0;
  margin-top: auto !important;
}

.orf-footer a { color: #1a75bb; }

.orf-hero {
  background: #1a2a3a;
  padding: 52px 24px;
  text-align: center;
}

.orf-hero h1 {
  color: #ffffff;
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 10px;
}

.orf-hero p {
  color: #8da9c4;
  font-size: 16px;
  margin: 0 0 28px;
}

.orf-hero-search {
  display: flex;
  margin: 0 auto;
  max-width: 580px;
}

.orf-hero-search input {
  background: #ffffff;
  border: 0;
  border-radius: 4px 0 0 4px;
  flex: 1;
  font-size: 15px;
  padding: 13px 18px;
}

.orf-hero-search button {
  background: #1a75bb;
  border: 0;
  border-radius: 0 4px 4px 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
}

.orf-stats-bar {
  background: #1560a0;
  padding: 16px 24px;
}

.orf-stats-inner {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1100px;
}

.orf-stats-inner div {
  text-align: center;
}

.orf-stats-inner strong {
  color: #ffffff;
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.orf-stats-inner span {
  color: #b8d4f0;
  display: block;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.orf-main-grid,
.orf-search-layout,
.orf-detail-layout,
.orf-resource-layout {
  display: grid;
  gap: 28px;
  margin: 0 auto;
  max-width: 1100px;
  padding: 32px 24px;
}

.orf-main-grid { grid-template-columns: 1fr 280px; }
.orf-search-layout { grid-template-columns: 240px 1fr; gap: 24px; padding-top: 24px; }
.orf-detail-layout { grid-template-columns: 1fr 260px; padding-top: 24px; }
.orf-resource-layout { grid-template-columns: 1fr 240px; gap: 24px; padding-top: 24px; }

.orf-topics-bar {
  background: #ffffff;
  border-bottom: 1px solid #dde3ea;
  padding: 12px 24px;
}

.orf-topics-inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto;
  max-width: 1100px;
}

.orf-topics-label {
  color: #8da9c4;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  margin-right: 4px;
  text-transform: uppercase;
}

.orf-topic-pill {
  background: #f0f4f8;
  border: 1px solid #dde3ea;
  border-radius: 20px;
  color: #1a75bb;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.orf-topic-pill:hover {
  background: #e6f1fb;
  border-color: #1a75bb;
  text-decoration: none;
}

.dataset-card {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  margin-bottom: 12px;
  padding: 18px 20px;
  position: relative;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.dataset-card:hover {
  border-color: #1a75bb;
  box-shadow: 0 4px 12px rgba(26,117,187,0.12);
}

.dataset-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
}

.dataset-card h3 a {
  color: #1a75bb;
  text-decoration: none;
}

.dataset-card h3 a:hover { text-decoration: underline; }

.dataset-card p {
  color: #5a6a7a;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.dataset-card-edit-btn {
  color: #8da9c4;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  position: absolute;
  right: 12px;
  text-decoration: none;
  top: 12px;
  transition: color 0.2s;
}

.dataset-card-edit-btn:hover {
  color: #1a75bb;
  text-decoration: none;
}

.dataset-card-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.access-badge {
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
}

.access-badge.open { background: #eaf3de; color: #3b6d11; }
.access-badge.private { background: #faeeda; color: #854f0b; }
.access-badge.restricted { background: #faece7; color: #993c1d; }

.orf-tag {
  background: #e6f1fb;
  border-radius: 3px;
  color: #1560a0;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
}

.sidebar-card {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 18px;
}

.sidebar-card h4 {
  border-bottom: 1px solid #dde3ea;
  color: #1a2a3a;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 8px;
}

.sidebar-card h5 {
  color: #8da9c4;
  font-size: 11px;
  letter-spacing: 0.8px;
  margin: 16px 0 4px;
}

.sidebar-cat-item {
  align-items: center;
  border-bottom: 1px solid #f0f2f5;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  padding: 7px 0;
}

.sidebar-cat-item:last-child { border-bottom: none; }
.sidebar-cat-item a { color: #1a75bb; text-decoration: none; }

.sidebar-cat-count {
  background: #f1efe8;
  border-radius: 10px;
  color: #5f5e5a;
  font-size: 11px;
  padding: 2px 8px;
}

.orf-section-title {
  align-items: center;
  border-bottom: 2px solid #1a75bb;
  color: #1a2a3a;
  display: flex;
  font-size: 17px;
  font-weight: 700;
  justify-content: space-between;
  margin: 0 0 16px;
  padding-bottom: 8px;
}

.orf-section-title a {
  color: #1a75bb;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
}

.orf-filter-form input {
  border: 1px solid #dde3ea;
  border-radius: 4px;
  font-size: 13px;
  padding: 9px 10px;
  width: 100%;
}

.orf-filter-form button,
.orf-button {
  border-radius: 4px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  justify-content: center;
  padding: 8px 12px;
  text-decoration: none;
}

.orf-filter-form button {
  background: #1a75bb;
  border: 0;
  color: #ffffff;
  margin-top: 8px;
  width: 100%;
}

.orf-button.filled {
  background: #1a75bb;
  border: 1px solid #1a75bb;
  color: #ffffff;
}

.orf-button.outline {
  background: #ffffff;
  border: 1px solid #1a75bb;
  color: #1a75bb;
}

.orf-button.full {
  box-sizing: border-box;
  width: 100%;
}

.orf-results-topbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 12px 14px;
}

.orf-results-topbar select {
  border: 1px solid #dde3ea;
  border-radius: 4px;
  padding: 6px 10px;
}

.orf-pagination .pagination .active a,
.orf-pagination .pagination .active span {
  background: #1a75bb !important;
  border-color: #1a75bb !important;
  color: #ffffff !important;
}

.orf-breadcrumb {
  color: #8da9c4;
  font-size: 12px;
  margin-bottom: 12px;
}

.orf-breadcrumb a { color: #8da9c4; text-decoration: none; }

.orf-detail-title {
  align-items: center;
  color: #1a2a3a;
  display: flex;
  flex-wrap: wrap;
  font-size: 22px;
  font-weight: 700;
  gap: 10px;
  margin: 0 0 12px;
}

.orf-detail-description {
  color: #5a6a7a;
  font-size: 14px;
  line-height: 1.6;
}

.orf-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 22px;
}

.orf-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.orf-action-btn {
  background: #ffffff;
  border: 1px solid #1a75bb;
  border-radius: 4px;
  color: #1a75bb;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  text-decoration: none;
  transition: background 0.2s;
}

.orf-action-btn:hover {
  background: #e6f1fb;
  text-decoration: none;
}

.orf-action-btn-danger {
  border-color: #e74c3c;
  color: #e74c3c;
}

.orf-action-btn-danger:hover {
  background: #fdf0ee;
}

.orf-action-btn-locked {
  border-color: #dde3ea;
  color: #8da9c4;
  cursor: not-allowed;
  opacity: 0.6;
}

.orf-access-msg {
  color: #8da9c4;
  display: block;
  font-size: 12px;
  margin-top: 6px;
}

.orf-access-msg a {
  color: #1a75bb;
}

.orf-metadata-table {
  border-collapse: collapse;
  width: 100%;
}

.orf-metadata-table tr {
  border-bottom: 1px solid #dde3ea;
}

.orf-metadata-table th {
  color: #8da9c4;
  font-weight: 600;
  padding: 10px 12px 10px 0;
  text-align: left;
  width: 140px;
}

.orf-metadata-table td {
  color: #2c3e50;
  padding: 10px 0;
}

.orf-resource-card {
  border: 1px solid #dde3ea;
  border-radius: 4px;
  margin-bottom: 8px;
  padding: 12px;
}

.orf-resource-card strong {
  color: #1a2a3a;
  display: block;
  font-size: 13px;
  margin-top: 7px;
}

.orf-format-badge {
  background: #1a75bb;
  border-radius: 3px;
  color: #ffffff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
}

.orf-format-badge.pdf { background: #27ae60; }
.orf-format-badge.excel { background: #e67e22; }

.res-format-badge {
  border-radius: 3px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  text-transform: uppercase;
}

.orf-resource-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.res-card {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 4px;
  margin-bottom: 10px;
  padding: 12px;
}

.res-card-top {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.res-card-name {
  color: #1a2a3a;
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}

.res-card-desc {
  color: #5a6a7a;
  font-size: 12px;
  margin: 0 0 8px;
}

.orf-action-btn-filled {
  background: #1a75bb;
  border-color: #1a75bb;
  color: #ffffff !important;
}

.orf-action-btn-filled:hover {
  background: #1560a0;
}

.orf-resource-subtitle a {
  color: #8da9c4;
  text-decoration: none;
}

.orf-preview-panel {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  padding: 16px;
}

.orf-preview-area {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  overflow: hidden;
}

.orf-preview-header {
  align-items: flex-start;
  background: #f5f8fc;
  border-bottom: 1px solid #dde3ea;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
}

.orf-preview-title {
  color: #1a2a3a;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
}

.orf-preview-subtitle {
  color: #8da9c4;
  font-size: 13px;
  margin: 0;
}

.orf-preview-subtitle a {
  color: #1a75bb;
  text-decoration: none;
}

.orf-preview-container {
  min-height: 500px;
  padding: 0;
}

.orf-preview-container .recline-view,
.orf-preview-container iframe,
.orf-preview-container .resource-view {
  border: none !important;
  min-height: 500px !important;
  width: 100% !important;
}

.res-meta-item {
  border-bottom: 1px solid #f0f2f5;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  padding: 8px 0;
}

.res-meta-item:last-of-type {
  border-bottom: none;
}

.res-meta-label {
  color: #8da9c4;
}

.res-meta-value {
  color: #2c3e50;
  font-weight: 500;
}

.orf-download-btn {
  background: #1a75bb;
  border-radius: 4px;
  color: #ffffff;
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-top: 16px;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.orf-download-btn:hover {
  background: #1560a0;
  color: #ffffff;
  text-decoration: none;
}

.orf-no-preview {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 400px;
  padding: 40px;
  text-align: center;
}

.orf-no-preview-icon {
  color: #8da9c4;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  opacity: 0.8;
}

.orf-no-preview-title {
  color: #1a2a3a;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.orf-no-preview-msg {
  color: #8da9c4;
  font-size: 14px;
  line-height: 1.6;
  max-width: 360px;
}

.orf-access-denied {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 400px;
  padding: 40px;
  text-align: center;
}

.orf-access-denied-icon {
  color: #8da9c4;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.orf-access-denied h2 {
  color: #1a2a3a;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
}

.orf-access-denied p {
  color: #5a6a7a;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px;
  max-width: 400px;
}

.orf-back-link {
  color: #1a75bb;
  display: block;
  font-size: 13px;
  margin-top: 12px;
  text-decoration: none;
}

.orf-login-page {
  align-items: center;
  background: #f5f8fc;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.orf-login-card {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 36px;
  text-align: center;
  width: 360px;
}

.orf-login-brand {
  align-items: center;
  background: #1a2a3a;
  border-radius: 4px;
  color: #ffffff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  padding: 8px 14px;
}

.orf-login-brand img {
  background: #ffffff;
  border-radius: 3px;
  height: 28px;
  padding: 2px;
}

.orf-login-card h1 {
  color: #1a2a3a;
  font-size: 17px;
  font-weight: 700;
  margin: 18px 0 4px;
}

.orf-login-card p {
  color: #8da9c4;
  font-size: 12px;
  margin: 0 0 20px;
}

.orf-login-card label {
  color: #5a6a7a;
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin: 12px 0 4px;
  text-align: left;
}

.orf-login-card input {
  border: 1px solid #dde3ea;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 14px;
  padding: 10px 12px;
  width: 100%;
}

.orf-login-card input:focus {
  border-color: #1a75bb;
  outline: none;
}

.orf-login-card button {
  background: #1a75bb;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  margin-top: 20px;
  padding: 12px;
  width: 100%;
}

.orf-dashboard,
.orf-org-page {
  margin: 0 auto;
  max-width: 1100px;
  padding: 32px 24px;
}

.orf-org-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.orf-dashboard h1,
.orf-org-page h1 {
  color: #1a2a3a;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.orf-dashboard > p,
.orf-org-page > p {
  color: #8da9c4;
  font-size: 13px;
}

.orf-org-header p,
.orf-page-subtitle {
  color: #8da9c4;
  font-size: 13px;
  margin: 6px 0 0;
}

.org-avatar-initials {
  align-items: center;
  background: #1a2a3a;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  flex-shrink: 0;
  font-size: 24px;
  font-weight: 700;
  height: 64px;
  justify-content: center;
  width: 64px;
}

.org-avatar-img {
  border-radius: 8px;
  flex-shrink: 0;
  height: 64px;
  object-fit: cover;
  width: 64px;
}

.orf-org-card .org-avatar-img,
.orf-org-card .org-avatar-initials {
  margin: 0 auto 12px;
}

.orf-dashboard-stats {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  margin: 20px 0;
}

.orf-dashboard-stats div {
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  padding: 16px;
}

.orf-dashboard-stats strong {
  color: #1a75bb;
  display: block;
  font-size: 24px;
  font-weight: 700;
}

.orf-dashboard-stats span {
  color: #8da9c4;
  display: block;
  font-size: 11px;
  text-transform: uppercase;
}

.orf-admin-page,
.orf-about-page {
  margin: 0 auto;
  max-width: 1100px;
  padding: 32px 24px;
}

.orf-admin-page h1 {
  color: #1a2a3a;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 18px;
}

.orf-rbac-status {
  color: #2c3e50;
  font-size: 15px;
}

.orf-toggle-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.orf-toggle {
  align-items: center;
  color: #1a2a3a;
  display: flex;
  font-size: 15px;
  font-weight: 600;
  gap: 14px;
}

.orf-toggle input {
  display: none;
}

.orf-toggle-slider {
  background: #8da9c4;
  border-radius: 999px;
  display: inline-block;
  height: 32px;
  position: relative;
  transition: background 0.2s;
  width: 58px;
}

.orf-toggle-slider::after {
  background: #ffffff;
  border-radius: 50%;
  content: "";
  height: 26px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform 0.2s;
  width: 26px;
}

.orf-toggle input:checked + .orf-toggle-slider {
  background: #1a75bb;
}

.orf-toggle input:checked + .orf-toggle-slider::after {
  transform: translateX(26px);
}

.orf-admin-table {
  border-collapse: collapse;
  font-size: 13px;
  width: 100%;
}

.orf-admin-table th,
.orf-admin-table td {
  border-bottom: 1px solid #dde3ea;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.orf-admin-table th {
  color: #1a2a3a;
  font-weight: 700;
}

.orf-admin-table tbody tr:nth-child(odd) {
  background: #f5f8fc;
}

.orf-about-hero {
  background: #1a2a3a;
  border-radius: 6px;
  color: #ffffff;
  margin-bottom: 18px;
  padding: 36px 24px;
  text-align: center;
}

.orf-about-hero img {
  background: #ffffff;
  border-radius: 4px;
  height: 48px;
  margin-bottom: 16px;
  padding: 6px 12px;
}

.orf-about-hero h1 {
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
}

.orf-about-hero p {
  color: #8da9c4;
  margin: 0;
}

.orf-card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

.organization-list,
a[href*='/organization/new'],
a[href*='/organization/edit'] {
  display: none !important;
}

.orf-quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.orf-activity-card {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px;
}

.orf-activity-dot {
  background: #1a75bb;
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  margin-top: 8px;
  width: 8px;
}

.orf-activity-card small {
  color: #8da9c4;
  display: block;
}

.orf-badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 840px) {
  .orf-header-inner,
  .orf-nav,
  .orf-hero-search {
    align-items: stretch;
    flex-direction: column;
  }

  .orf-header-inner,
  .orf-nav {
    display: flex;
  }

  .orf-main-grid,
  .orf-search-layout,
  .orf-detail-layout,
  .orf-resource-layout,
  .orf-dashboard-stats {
    grid-template-columns: 1fr;
  }

  .orf-card-grid {
    grid-template-columns: 1fr;
  }

  .orf-stats-inner {
    flex-wrap: wrap;
    gap: 20px;
  }
}
