:root {
  --bni-red: #CF2030;
  --bni-red-dark: #a81825;
  --bni-black: #231F20;
  --bni-gray: #f5f5f5;
  --bni-gray-mid: #e0e0e0;
}

.bni-portal-header {
  background: linear-gradient(135deg, var(--bni-red) 0%, var(--bni-red-dark) 100%);
  color: #fff;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}

.bni-portal-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.bni-portal-header p {
  margin: 0;
  opacity: 0.9;
}

.bni-portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.bni-portal-nav a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  color: var(--bni-black);
  background: var(--bni-gray);
  border: 1px solid var(--bni-gray-mid);
}

.bni-portal-nav a.active,
.bni-portal-nav a:hover {
  background: var(--bni-red);
  color: #fff;
  border-color: var(--bni-red);
}

.bni-storage-bar-wrap {
  background: #fff;
  border: 1px solid var(--bni-gray-mid);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.bni-storage-bar-wrap h3 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.bni-storage-bar {
  height: 12px;
  background: var(--bni-gray);
  border-radius: 6px;
  overflow: hidden;
}

.bni-storage-bar-fill {
  height: 100%;
  background: var(--bni-red);
  border-radius: 6px;
  transition: width 0.3s ease;
}

.bni-storage-label {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #666;
}

.bni-doc-card,
.bni-event-card,
.bni-file-row {
  background: #fff;
  border: 1px solid var(--bni-gray-mid);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.bni-doc-card h4,
.bni-event-card h4 {
  margin: 0 0 0.35rem;
  color: var(--bni-black);
}

.bni-doc-card p,
.bni-event-card p {
  margin: 0 0 0.75rem;
  color: #555;
  font-size: 0.9rem;
}

.bni-btn {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
}

.bni-btn-primary {
  background: var(--bni-red);
  color: #fff;
}

.bni-btn-primary:hover {
  background: var(--bni-red-dark);
  color: #fff;
}

.bni-btn-outline {
  background: #fff;
  color: var(--bni-red);
  border: 1px solid var(--bni-red);
}

.bni-btn-danger {
  background: #fff;
  color: #c0392b;
  border: 1px solid #c0392b;
}

.bni-upload-form {
  background: #fff;
  border: 2px dashed var(--bni-gray-mid);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.bni-upload-form input[type="file"] {
  margin: 0.5rem 0 1rem;
}

.bni-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  color: var(--bni-black);
}

.bni-empty {
  text-align: center;
  padding: 2rem;
  color: #888;
  background: var(--bni-gray);
  border-radius: 10px;
}

.bni-alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.bni-alert-success {
  background: #d4edda;
  color: #155724;
}

.bni-alert-error {
  background: #f8d7da;
  color: #721c24;
}

.bni-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.bni-file-meta {
  font-size: 0.85rem;
  color: #666;
}

.bni-event-date {
  font-size: 0.85rem;
  color: var(--bni-red);
  font-weight: 600;
}

.bni-event-past {
  opacity: 0.75;
}

.bni-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.bni-home-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem 1.2rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--bni-gray-mid);
  text-decoration: none;
  color: var(--bni-black);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bni-home-card:hover {
  border-color: var(--bni-red);
  box-shadow: 0 4px 14px rgba(207, 32, 48, 0.12);
  color: var(--bni-black);
  text-decoration: none;
}

.bni-home-card-primary {
  background: linear-gradient(135deg, #1a1a2e 0%, var(--bni-red) 100%);
  color: #fff;
  border-color: transparent;
}

.bni-home-card-primary:hover {
  color: #fff;
  border-color: transparent;
}

.bni-home-card-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  opacity: 0.8;
}

.bni-home-card strong {
  font-family: Montserrat, sans-serif;
  font-size: 1.05rem;
}

.bni-home-card span:last-child {
  font-size: 0.85rem;
  opacity: 0.85;
}

.bni-portal-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  opacity: 0.9;
  margin: 0 0 0.35rem;
}

.bni-help {
  color: #666;
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.bni-doc-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bni-doc-actions,
.bni-doc-card-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.bni-doc-card-main {
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.bni-replace-form {
  display: inline;
  margin: 0;
}

.bni-video-panel {
  background: #fff;
  border: 1px solid var(--bni-gray-mid);
  border-radius: 12px;
  padding: 1.25rem;
}

.bni-video-room {
  margin-bottom: 1rem;
}

/* Unified brand footer */
.bni-brand-footer,
.o_brand_promotion.bni-brand-footer {
  text-align: center;
  padding: 1rem 1.25rem 1.5rem;
  font-size: 0.85rem;
  color: #555;
  background: transparent;
}

.bni-brand-footer a,
.o_brand_promotion.bni-brand-footer a {
  color: var(--bni-red);
  font-weight: 600;
  text-decoration: none;
}

.bni-brand-footer a:hover {
  text-decoration: underline;
}
