:root {
  --op-primary: #1659A8;
  --op-primary-dark: #0D3D6E;
  --op-primary-light: #B5D4F4;
  --op-primary-subtle: #E6F1FB;
  --op-sidebar-width: 220px;
  --op-topbar-height: 48px;
}

/* Sidebar layout */
.op-shell { display: flex; min-height: 100vh; }

.op-sidebar {
  width: var(--op-sidebar-width);
  background: var(--op-primary-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.op-sidebar-logo {
  padding: 18px 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 0.5px solid rgba(255,255,255,0.1);
  text-decoration: none;
}

.op-sidebar-logo-text {
  color: white;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1.5px;
}

.op-sidebar-section {
  padding: 16px 12px 4px;
}

.op-sidebar-section-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 4px;
}

.op-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 2px;
  transition: background 0.1s, color 0.1s;
}

.op-nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

.op-nav-item.active {
  background: rgba(255,255,255,0.15);
  color: white;
  font-weight: 500;
}

.op-nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.85;
}

.op-sidebar-bottom {
  margin-top: auto;
  padding: 12px;
  border-top: 0.5px solid rgba(255,255,255,0.1);
}

.op-tenant-badge {
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 8px 10px;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
}

/* Main content area */
.op-main {
  margin-left: var(--op-sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.op-topbar {
  height: var(--op-topbar-height);
  background: white;
  border-bottom: 0.5px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.op-topbar-title {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.op-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--op-primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--op-primary);
}

.op-content {
  padding: 28px 32px;
  flex: 1;
}

/* Page header */
.op-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.op-page-title {
  font-size: 20px;
  font-weight: 500;
  color: #1a1a1a;
}

/* Buttons */
.op-btn-primary {
  background: var(--op-primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.op-btn-primary:hover {
  background: var(--op-primary-dark);
  color: white;
}

.op-btn-secondary {
  background: white;
  color: var(--op-primary);
  border: 0.5px solid var(--op-primary);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

/* Table */
.op-table-wrap {
  background: white;
  border: 0.5px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

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

.op-table thead th {
  background: #f7f8fa;
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 0.5px solid #e0e0e0;
}

.op-table tbody tr {
  border-bottom: 0.5px solid #f0f0f0;
}

.op-table tbody tr:last-child {
  border-bottom: none;
}

.op-table tbody tr:hover {
  background: #fafafa;
}

.op-table tbody td {
  padding: 11px 16px;
  color: #444;
}

.op-table-link {
  color: var(--op-primary);
  font-weight: 500;
  text-decoration: none;
}

.op-table-link:hover { text-decoration: underline; }

/* Badges */
.op-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 20px;
  font-weight: 500;
}

.op-badge-active { background: #EAF3DE; color: #3B6D11; }
.op-badge-closed { background: #f0f0f0; color: #666; }
.op-badge-linkedin { background: #E6F1FB; color: #185FA5; }
.op-badge-digital { background: #EEEDFE; color: #534AB7; }
.op-badge-agency  { background: #FAEEDA; color: #854F0B; }
.op-badge-network { background: #E1F5EE; color: #0F6E56; }

/* Cards (detail page) */
.op-card {
  background: white;
  border: 0.5px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.op-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.op-stat-card {
  background: #f7f8fa;
  border-radius: 8px;
  padding: 14px 16px;
}

.op-stat-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}

.op-stat-value {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
}

/* Forms */
.op-form-group {
  margin-bottom: 18px;
}

.op-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  margin-bottom: 5px;
}

.op-input,
.op-select,
.op-textarea {
  width: 100%;
  border: 0.5px solid #d0d0d0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: #1a1a1a;
  background: white;
  transition: border-color 0.15s;
}

.op-input:focus,
.op-select:focus,
.op-textarea:focus {
  outline: none;
  border-color: var(--op-primary);
  box-shadow: 0 0 0 3px var(--op-primary-subtle);
}

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

/* Entry type cards (Create page) */
.op-entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 560px;
  margin: 24px 0;
}

.op-entry-card {
  border: 0.5px solid #d0d0d0;
  border-radius: 10px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.op-entry-card:hover {
  border-color: var(--op-primary);
  box-shadow: 0 0 0 3px var(--op-primary-subtle);
}

.op-entry-card-title {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.op-entry-card-desc {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}

.op-entry-card-btn {
  display: inline-block;
  margin-top: 14px;
  background: var(--op-primary);
  color: white;
  border-radius: 5px;
  padding: 6px 16px;
  font-size: 12px;
}

/* Branding injection placeholder */
/* Tenant primary color is injected via <style> tag in _Layout.cshtml */
