/* ============================================================
   PF Dashboard CSS — Pinheiro e Fernandes Contabilidade
   Design System: Premium · Corporate · Elegant
   ============================================================ */

:root {
  --pf-blue-deep:    #071A2D;
  --pf-blue-mid:     #0B243D;
  --pf-blue-light:   #0F3057;
  --pf-gold:         #C9A45C;
  --pf-gold-light:   #E5D2A3;
  --pf-white:        #F8F7F3;
  --pf-gray-light:   #E8E8E8;
  --pf-gray-mid:     #9CA3AF;
  --pf-text:         #17202A;
  --pf-text-muted:   #6B7280;
  --pf-sidebar-w:    260px;
  --pf-topbar-h:     64px;
  --pf-radius:       10px;
  --pf-radius-sm:    6px;
  --pf-shadow:       0 2px 12px rgba(7,26,45,0.10);
  --pf-shadow-lg:    0 8px 32px rgba(7,26,45,0.16);
  --pf-transition:   all 0.2s ease;
}

/* ── Reset / Base ───────────────────────────────────────── */
.pf-dash-layout, .pf-login-wrapper, .pf-protocolo-wrapper, .pf-cliente-wrapper {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  color: var(--pf-text);
  line-height: 1.6;
  box-sizing: border-box;
}

.pf-dash-layout *, .pf-login-wrapper *, .pf-protocolo-wrapper *, .pf-cliente-wrapper * {
  box-sizing: border-box;
}

/* ── Layout ─────────────────────────────────────────────── */
.pf-dash-layout {
  display: flex;
  min-height: 100vh;
  background: #F2F4F6;
}

.pf-dash-main {
  flex: 1;
  margin-left: var(--pf-sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.pf-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--pf-sidebar-w);
  height: 100vh;
  background: var(--pf-blue-deep);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.3s;
}

.pf-sidebar-brand {
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(201,164,92,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-sidebar-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  outline-offset: 4px;
}

.pf-sidebar-logo-img {
  height: 64px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 1024px) {
  .pf-sidebar-logo-img { height: 58px; }
}

@media (max-width: 768px) {
  .pf-sidebar-logo-img { height: 54px; }
}

.pf-sidebar-nav {
  flex: 1;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: var(--pf-transition);
  position: relative;
  cursor: pointer;
}

.pf-nav-item:hover {
  color: #fff;
  background: rgba(201,164,92,0.08);
}

.pf-nav-item.active {
  color: var(--pf-gold);
  background: rgba(201,164,92,0.12);
}

.pf-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--pf-gold);
  border-radius: 0 3px 3px 0;
}

.pf-nav-item svg { flex-shrink: 0; }

.pf-nav-logout { color: rgba(255,255,255,0.5); }
.pf-nav-logout:hover { color: #ff6b6b; background: rgba(255,107,107,0.08); }

.pf-sidebar-footer { padding: 12px 0 20px; border-top: 1px solid rgba(255,255,255,0.06); }

.pf-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--pf-gold);
  color: var(--pf-blue-deep);
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  margin-left: auto;
}

/* ── Topbar ──────────────────────────────────────────────── */
.pf-topbar {
  position: sticky;
  top: 0;
  height: var(--pf-topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--pf-gray-light);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(7,26,45,0.06);
}

.pf-sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pf-text-muted);
  display: none;
  padding: 6px;
  border-radius: var(--pf-radius-sm);
}

.pf-topbar-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--pf-text);
}

.pf-topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pf-user-avatar {
  width: 36px;
  height: 36px;
  background: var(--pf-gold);
  color: var(--pf-blue-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.pf-user-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pf-user-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.pf-user-role {
  font-size: 11px;
  color: var(--pf-text-muted);
  line-height: 1;
}

/* ── Content ─────────────────────────────────────────────── */
.pf-dash-content { flex: 1; padding: 28px 24px; }

.pf-tab-section { display: none; }
.pf-tab-section.active { display: block; }

.pf-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.pf-section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--pf-blue-deep);
  margin: 0;
}

.pf-section-header p {
  font-size: 13px;
  color: var(--pf-text-muted);
  margin: 4px 0 0;
}

/* ── Cards ───────────────────────────────────────────────── */
.pf-card {
  background: #fff;
  border-radius: var(--pf-radius);
  box-shadow: var(--pf-shadow);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(232,232,232,0.7);
}

.pf-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

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

/* ── Métricas ────────────────────────────────────────────── */
.pf-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.pf-metric-card {
  background: #fff;
  border-radius: var(--pf-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--pf-shadow);
  border: 1px solid rgba(232,232,232,0.7);
  transition: var(--pf-transition);
}

.pf-metric-card:hover {
  box-shadow: var(--pf-shadow-lg);
  transform: translateY(-2px);
}

.pf-metric-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pf-icon-blue   { background: rgba(11,36,61,0.08);  color: var(--pf-blue-mid); }
.pf-icon-gold   { background: rgba(201,164,92,0.12); color: #B8892A; }
.pf-icon-green  { background: rgba(16,185,129,0.1);  color: #059669; }
.pf-icon-purple { background: rgba(139,92,246,0.1);  color: #7C3AED; }
.pf-icon-orange { background: rgba(249,115,22,0.1);  color: #EA580C; }
.pf-icon-teal   { background: rgba(20,184,166,0.1);  color: #0D9488; }

.pf-metric-data { flex: 1; min-width: 0; }

.pf-metric-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--pf-blue-deep);
  line-height: 1.1;
}

.pf-metric-label {
  display: block;
  font-size: 12px;
  color: var(--pf-text-muted);
  margin-top: 2px;
}

/* ── Tabela ──────────────────────────────────────────────── */
.pf-table-card { padding: 0; overflow: hidden; }
.pf-table-card .pf-card-header { padding: 20px 24px 0; }

.pf-table-filters {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--pf-gray-light);
}

.pf-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.pf-table thead tr {
  background: #F7F8FA;
}

.pf-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pf-text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--pf-gray-light);
}

.pf-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(232,232,232,0.5);
  vertical-align: middle;
}

.pf-table tbody tr:hover { background: rgba(7,26,45,0.025); }
.pf-table tbody tr:last-child td { border-bottom: none; }

.pf-empty { text-align: center; color: var(--pf-text-muted); padding: 32px 16px !important; }

.pf-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: var(--pf-gray-light);
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--pf-blue-mid);
}

/* ── Badges ──────────────────────────────────────────────── */
.pf-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status-info      { background: rgba(59,130,246,0.1);  color: #1D4ED8; }
.status-warning   { background: rgba(251,191,36,0.12); color: #92400E; }
.status-primary   { background: rgba(11,36,61,0.08);   color: var(--pf-blue-mid); }
.status-success   { background: rgba(16,185,129,0.1);  color: #065F46; }
.status-secondary { background: rgba(156,163,175,0.15);color: #374151; }
.status-error     { background: rgba(239,68,68,0.1);   color: #991B1B; }
.status-orange    { background: rgba(249,115,22,0.1);  color: #9A3412; }

/* ── Forms ───────────────────────────────────────────────── */
.pf-form { display: flex; flex-direction: column; gap: 16px; }
.pf-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.pf-field { display: flex; flex-direction: column; gap: 6px; }
.pf-field-full { grid-column: 1 / -1; }
.pf-field-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }

.pf-field-row {
  display: flex;
  gap: 16px;
}

.pf-field-row .pf-field { flex: 1; }

.pf-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pf-text);
  letter-spacing: 0.2px;
}

.pf-label-optional { font-weight: 400; color: var(--pf-text-muted); }

.pf-input, .pf-select, .pf-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--pf-gray-light);
  border-radius: var(--pf-radius-sm);
  font-size: 13.5px;
  color: var(--pf-text);
  background: #fff;
  transition: var(--pf-transition);
  outline: none;
  font-family: inherit;
}

.pf-input:focus, .pf-select:focus, .pf-textarea:focus {
  border-color: var(--pf-gold);
  box-shadow: 0 0 0 3px rgba(201,164,92,0.15);
}

.pf-input-sm, .pf-select-sm { padding: 7px 12px; font-size: 13px; }
.pf-input-lg { font-size: 16px; padding: 13px 16px; }

.pf-textarea { resize: vertical; min-height: 80px; }
.pf-textarea-tall { min-height: 260px; }

.pf-input-group { position: relative; }
.pf-input-group .pf-input { padding-right: 44px; }
.pf-toggle-pass {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--pf-text-muted);
  display: flex;
}

.pf-field-hint { font-size: 12px; color: var(--pf-text-muted); }

.pf-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

/* ── Buttons ─────────────────────────────────────────────── */
.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border: 1.5px solid transparent;
  border-radius: var(--pf-radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--pf-transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.pf-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.pf-btn-primary {
  background: var(--pf-blue-deep);
  color: #fff;
  border-color: var(--pf-blue-deep);
}
.pf-btn-primary:hover:not(:disabled) { background: var(--pf-blue-light); }

.pf-btn-outline {
  background: transparent;
  color: var(--pf-blue-deep);
  border-color: var(--pf-blue-deep);
}
.pf-btn-outline:hover:not(:disabled) { background: var(--pf-blue-deep); color: #fff; }

.pf-btn-ghost {
  background: transparent;
  color: var(--pf-text-muted);
  border-color: transparent;
}
.pf-btn-ghost:hover { background: var(--pf-gray-light); color: var(--pf-text); }

.pf-btn-success { background: #059669; color: #fff; border-color: #059669; }
.pf-btn-success:hover { background: #047857; }

.pf-btn-warning { background: #D97706; color: #fff; border-color: #D97706; }
.pf-btn-warning:hover { background: #B45309; }

.pf-btn-error   { background: #DC2626; color: #fff; border-color: #DC2626; }
.pf-btn-error:hover { background: #B91C1C; }

.pf-btn-whatsapp { background: #25D366; color: #fff; border-color: #25D366; }
.pf-btn-whatsapp:hover { background: #1FAD53; }

.pf-btn-sm  { padding: 7px 14px; font-size: 12.5px; }
.pf-btn-xs  { padding: 5px 10px; font-size: 12px; }
.pf-btn-full { width: 100%; }

/* ── Alerts ──────────────────────────────────────────────── */
.pf-alert {
  padding: 12px 16px;
  border-radius: var(--pf-radius-sm);
  font-size: 13.5px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.pf-alert-success { background: rgba(16,185,129,0.08); color: #065F46; border-color: rgba(16,185,129,0.2); }
.pf-alert-error   { background: rgba(239,68,68,0.07);  color: #991B1B; border-color: rgba(239,68,68,0.2); }
.pf-alert-warning { background: rgba(251,191,36,0.09); color: #78350F; border-color: rgba(251,191,36,0.2); }
.pf-alert-info    { background: rgba(59,130,246,0.07); color: #1E40AF; border-color: rgba(59,130,246,0.2); }

/* ── Login ───────────────────────────────────────────────── */
.pf-login-wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--pf-blue-deep);
}

.pf-login-card {
  flex: 0 0 480px;
  background: #fff;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.pf-login-bg {
  flex: 1;
  background: linear-gradient(135deg, var(--pf-blue-mid) 0%, var(--pf-blue-deep) 100%);
  display: flex;
  align-items: center;
  padding: 48px;
}

.pf-login-bg-text h2 {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 12px;
}

.pf-login-bg-text p { color: var(--pf-gold-light); font-size: 15px; }

.pf-login-logo { margin-bottom: 16px; }

.pf-logo-text {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--pf-blue-deep);
  letter-spacing: -0.5px;
}

.pf-logo-sub { font-size: 13px; color: var(--pf-gold); font-weight: 500; }

.pf-login-title { font-size: 26px; font-weight: 700; margin: 8px 0 4px; color: var(--pf-blue-deep); }
.pf-login-desc  { font-size: 14px; color: var(--pf-text-muted); margin-bottom: 8px; }

.pf-field-row { flex-direction: row; align-items: center; justify-content: space-between; }
.pf-link-small { font-size: 13px; color: var(--pf-gold); text-decoration: none; }
.pf-link-small:hover { text-decoration: underline; }

.pf-login-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--pf-gray-light);
  font-size: 12px;
  color: var(--pf-text-muted);
  text-align: center;
  line-height: 1.8;
}

.pf-login-footer a { color: var(--pf-gold); text-decoration: none; }

/* ── Modais ──────────────────────────────────────────────── */
.pf-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pf-modal.open { display: flex; }

.pf-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7,26,45,0.6);
  backdrop-filter: blur(3px);
}

.pf-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--pf-shadow-lg);
  animation: pf-modal-in 0.25s ease;
}

@keyframes pf-modal-in {
  from { opacity: 0; transform: translateY(-16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

.pf-modal-header h3 { font-size: 17px; font-weight: 600; margin: 0; }

.pf-modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--pf-text-muted);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
}

.pf-modal-close:hover { background: var(--pf-gray-light); }

.pf-modal-content .pf-form { padding: 24px; }

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

/* ── Notificações ────────────────────────────────────────── */
.pf-notif-list { display: flex; flex-direction: column; gap: 2px; }

.pf-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-radius: var(--pf-radius-sm);
  border: 1px solid var(--pf-gray-light);
  margin-bottom: 6px;
  transition: var(--pf-transition);
}

.pf-notif-unread { background: rgba(201,164,92,0.05); border-color: rgba(201,164,92,0.3); }

.pf-notif-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.pf-notif-body { flex: 1; }
.pf-notif-body p { margin: 0 0 4px; font-size: 13.5px; }
.pf-notif-time { font-size: 12px; color: var(--pf-text-muted); }

/* ── Timeline ─────────────────────────────────────────────── */
.pf-timeline { display: flex; flex-direction: column; gap: 0; margin-top: 12px; }

.pf-timeline-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px 10px 26px;
  position: relative;
  border-left: 2px solid var(--pf-gray-light);
}

.pf-timeline-item::before {
  content: '';
  position: absolute;
  left: -5px; top: 14px;
  width: 8px; height: 8px;
  background: var(--pf-gold);
  border-radius: 50%;
}

.pf-timeline-date { font-size: 11px; color: var(--pf-text-muted); }
.pf-timeline-item p { margin: 0; font-size: 13px; }

/* ── Protocolo (página pública) ──────────────────────────── */
.pf-protocolo-wrapper { max-width: 800px; margin: 0 auto; padding: 48px 20px; }

.pf-protocolo-hero { text-align: center; margin-bottom: 40px; }
.pf-protocolo-hero h1 { font-size: 32px; font-weight: 700; color: var(--pf-blue-deep); margin-bottom: 12px; }
.pf-protocolo-hero p  { font-size: 15px; color: var(--pf-text-muted); max-width: 560px; margin: 0 auto; }

.pf-protocolo-card {
  background: #fff;
  border-radius: 14px;
  padding: 36px;
  box-shadow: var(--pf-shadow-lg);
  border: 1px solid var(--pf-gray-light);
  margin-bottom: 40px;
}

.pf-protocolo-card .pf-form { gap: 20px; }

.pf-protocolo-found {
  background: #fff;
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--pf-shadow-lg);
  border: 1px solid var(--pf-gray-light);
}

.pf-protocolo-found-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.pf-protocolo-num-label { font-size: 12px; color: var(--pf-text-muted); margin-bottom: 4px; }
.pf-protocolo-num { font-size: 22px; font-weight: 700; color: var(--pf-blue-deep); font-family: monospace; }

.pf-protocolo-details { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.pf-detail-row {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--pf-gray-light);
  align-items: baseline;
}

.pf-detail-label { font-size: 12.5px; font-weight: 600; color: var(--pf-text-muted); min-width: 140px; }

.pf-detail-obs {
  background: rgba(201,164,92,0.06);
  border-left: 3px solid var(--pf-gold);
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  margin-top: 8px;
}

.pf-detail-obs p { margin: 0; font-size: 14px; }

.pf-protocolo-not-found {
  text-align: center;
  padding: 48px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--pf-shadow);
}

.pf-not-found-icon { color: #DC2626; margin-bottom: 16px; }
.pf-protocolo-not-found h3 { font-size: 18px; color: var(--pf-text); margin-bottom: 8px; }
.pf-protocolo-not-found p  { color: var(--pf-text-muted); margin-bottom: 20px; }

.pf-protocolo-contact {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--pf-gray-light);
  display: flex;
  align-items: center;
  gap: 16px;
}

.pf-protocolo-contact p { margin: 0; font-size: 14px; color: var(--pf-text-muted); }

.pf-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.pf-info-item {
  background: #fff;
  border-radius: var(--pf-radius);
  padding: 20px;
  box-shadow: var(--pf-shadow);
  border: 1px solid var(--pf-gray-light);
}

.pf-info-icon { color: var(--pf-gold); margin-bottom: 10px; }
.pf-info-item p { margin: 0; font-size: 13.5px; color: var(--pf-text-muted); }
.pf-info-item a { color: var(--pf-gold); }

/* ── Área do cliente ─────────────────────────────────────── */
.pf-cliente-wrapper { max-width: 900px; margin: 0 auto; padding: 40px 20px; }

.pf-cliente-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.pf-cliente-greeting h1 { font-size: 26px; font-weight: 700; margin: 0 0 4px; color: var(--pf-blue-deep); }
.pf-cliente-greeting p  { margin: 0; font-size: 14px; color: var(--pf-text-muted); }

.pf-processos-grid { display: flex; flex-direction: column; gap: 20px; }

.pf-processo-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--pf-shadow);
  border: 1px solid var(--pf-gray-light);
}

.pf-processo-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}

.pf-protocolo-badge {
  display: inline-block;
  font-size: 11px;
  background: rgba(11,36,61,0.07);
  color: var(--pf-blue-mid);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: monospace;
  margin-bottom: 4px;
}

.pf-processo-titulo { font-size: 17px; font-weight: 600; margin: 0; color: var(--pf-blue-deep); }

.pf-processo-info { display: flex; gap: 24px; margin-bottom: 14px; flex-wrap: wrap; }
.pf-info-row { display: flex; flex-direction: column; gap: 2px; }
.pf-info-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--pf-text-muted); }

.pf-processo-obs {
  background: rgba(201,164,92,0.06);
  border-left: 3px solid var(--pf-gold);
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 14px;
}

.pf-proxima-etapa {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  margin-bottom: 14px;
  color: var(--pf-text-muted);
}

.pf-processo-historico h4, .pf-processo-docs h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pf-text-muted);
  margin: 16px 0 8px;
}

.pf-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--pf-blue-mid);
  text-decoration: none;
  padding: 6px 12px;
  background: rgba(11,36,61,0.04);
  border-radius: 6px;
  margin: 4px 4px 4px 0;
  transition: var(--pf-transition);
}

.pf-doc-link:hover { background: rgba(11,36,61,0.1); }

.pf-cliente-cta {
  text-align: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--pf-gray-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pf-cliente-cta p { margin: 0; color: var(--pf-text-muted); }

/* ── Blog editor / aprovação ─────────────────────────────── */
.pf-blog-editor-wrap { margin-bottom: 24px; }

.pf-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.pf-approval-list { display: flex; flex-direction: column; gap: 20px; }

.pf-approval-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--pf-shadow);
  border: 1px solid var(--pf-gray-light);
}

.pf-approval-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--pf-text-muted);
}

.pf-approval-title { font-size: 18px; font-weight: 600; margin: 0 0 8px; color: var(--pf-blue-deep); }
.pf-approval-excerpt { font-size: 14px; color: var(--pf-text-muted); margin-bottom: 14px; }

.pf-approval-content-preview {
  border: 1px solid var(--pf-gray-light);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.pf-content-preview-inner {
  max-height: 200px;
  overflow: hidden;
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  position: relative;
}

.pf-btn-read-more {
  display: block;
  width: 100%;
  padding: 8px;
  text-align: center;
  background: #F7F8FA;
  border: none;
  border-top: 1px solid var(--pf-gray-light);
  cursor: pointer;
  font-size: 12.5px;
  color: var(--pf-text-muted);
}

.pf-btn-read-more:hover { background: var(--pf-gray-light); }

.pf-approval-actions { margin-top: 16px; }

.pf-approval-obs-field {
  margin-bottom: 14px;
  animation: pf-fade-in 0.2s ease;
}

@keyframes pf-fade-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.pf-approval-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Empty state ─────────────────────────────────────────── */
.pf-empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--pf-text-muted);
}

.pf-empty-state svg { margin-bottom: 16px; color: var(--pf-gray-mid); }
.pf-empty-state h3 { font-size: 16px; margin: 0 0 8px; color: var(--pf-text); }
.pf-empty-state p  { margin: 0 0 20px; font-size: 14px; }

/* ── Toast ───────────────────────────────────────────────── */
#pf-toast-wrap {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.pf-toast {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--pf-shadow-lg);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  max-width: 360px;
}

.pf-toast.show { opacity: 1; transform: translateY(0); }

.pf-toast-success { background: #065F46; color: #fff; }
.pf-toast-error   { background: #991B1B; color: #fff; }
.pf-toast-warning { background: #92400E; color: #fff; }
.pf-toast-info    { background: var(--pf-blue-mid); color: #fff; }

/* ── Spin ────────────────────────────────────────────────── */
.pf-spin {
  animation: pf-spin 0.8s linear infinite;
  transform-origin: center;
}

@keyframes pf-spin { to { transform: rotate(360deg); } }

/* ── Misc ─────────────────────────────────────────────────── */
.pf-muted { color: var(--pf-text-muted); font-size: 13.5px; }
.pf-obs-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pf-config-card { max-width: 720px; }

/* ── Responsive ─────────────────────────────────────────────*/
@media (max-width: 1024px) {
  .pf-dash-main { margin-left: 0; }

  .pf-sidebar {
    transform: translateX(-100%);
  }

  .pf-sidebar.open {
    transform: translateX(0);
  }

  .pf-sidebar-toggle { display: flex; }
}

@media (max-width: 768px) {
  .pf-login-wrapper { flex-direction: column; }
  .pf-login-card { flex: none; padding: 40px 28px; }
  .pf-login-bg { display: none; }

  .pf-metrics-grid { grid-template-columns: 1fr 1fr; }
  .pf-form-grid { grid-template-columns: 1fr; }
  .pf-field-row { flex-direction: column; }
  .pf-modal-content { max-width: 100%; }

  .pf-table th, .pf-table td { padding: 10px 12px; font-size: 13px; }

  .pf-protocolo-found-header { flex-direction: column; }
  .pf-protocolo-contact { flex-direction: column; text-align: center; }

  .pf-approval-btns { flex-direction: column; }
  .pf-approval-btns .pf-btn { width: 100%; }

  .pf-dash-content { padding: 20px 16px; }
  .pf-topbar { padding: 0 16px; }
}

@media (max-width: 480px) {
  .pf-metrics-grid { grid-template-columns: 1fr; }
  .pf-btn-full { font-size: 15px; padding: 13px; }
}

/* ═══════════════════════════════════════════════════════════
   AGENDA MODULE
   ═══════════════════════════════════════════════════════════ */

.pf-agenda-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pf-agenda-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pf-agenda-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pf-agenda-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--pf-gray-light);
  background: var(--pf-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--pf-transition);
  color: var(--pf-text);
}

.pf-agenda-nav-btn:hover {
  background: var(--pf-blue-deep);
  border-color: var(--pf-blue-deep);
  color: #fff;
}

.pf-agenda-month-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--pf-blue-deep);
  min-width: 180px;
  text-align: center;
}

.pf-agenda-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* Calendar */
.pf-agenda-cal {
  background: var(--pf-white);
  border-radius: var(--pf-radius);
  border: 1px solid var(--pf-gray-light);
  overflow: hidden;
  box-shadow: var(--pf-shadow);
}

.pf-cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--pf-blue-deep);
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pf-cal-header-day {
  padding: 10px 0;
  text-align: center;
}

.pf-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--pf-gray-light);
}

.pf-cal-cell {
  background: #fff;
  min-height: 90px;
  padding: 6px 8px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.pf-cal-cell:hover { background: #f0f4f8; }
.pf-cal-cell.pf-cal-other-month { background: #fafafa; opacity: 0.55; cursor: default; }
.pf-cal-cell.pf-cal-today { background: rgba(201,164,92,0.07); }
.pf-cal-cell.pf-cal-today .pf-cal-day-num {
  background: var(--pf-gold);
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.pf-cal-day-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--pf-text);
  margin-bottom: 4px;
}

.pf-cal-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-cal-event {
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-weight: 500;
}

.pf-cal-event-reuniao    { background: rgba(14,165,233,0.15); color: #0369a1; }
.pf-cal-event-prazo      { background: rgba(239,68,68,0.12);  color: #b91c1c; }
.pf-cal-event-entrega    { background: rgba(16,185,129,0.12); color: #065f46; }
.pf-cal-event-interno    { background: rgba(139,92,246,0.12); color: #6d28d9; }
.pf-cal-event-outro      { background: rgba(107,114,128,0.12);color: #374151; }

.pf-cal-more {
  font-size: 10px;
  color: var(--pf-text-muted);
  margin-top: 2px;
  cursor: pointer;
}

/* Sidebar */
.pf-agenda-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pf-agenda-sidebar-section {
  background: var(--pf-white);
  border-radius: var(--pf-radius);
  border: 1px solid var(--pf-gray-light);
  box-shadow: var(--pf-shadow);
  overflow: hidden;
}

.pf-agenda-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--pf-text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--pf-gray-light);
  background: #f8f9fa;
  margin: 0;
}

.pf-agenda-card {
  padding: 12px 16px;
  border-bottom: 1px solid var(--pf-gray-light);
  cursor: pointer;
  transition: background 0.15s;
}

.pf-agenda-card:last-child { border-bottom: none; }
.pf-agenda-card:hover { background: #f0f4f8; }

.pf-agenda-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.pf-agenda-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-text);
  margin: 0;
  line-height: 1.4;
}

.pf-agenda-card-meta {
  font-size: 11px;
  color: var(--pf-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pf-agenda-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}

.pf-agenda-badge-pendente    { background: rgba(245,158,11,0.12); color: #92400e; }
.pf-agenda-badge-confirmado  { background: rgba(16,185,129,0.12); color: #065f46; }
.pf-agenda-badge-concluido   { background: rgba(107,114,128,0.1); color: #374151; }
.pf-agenda-badge-cancelado   { background: rgba(239,68,68,0.1);   color: #991b1b; }

.pf-agenda-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--pf-text-muted);
  font-size: 13px;
}

/* Agenda responsive */
@media (max-width: 1024px) {
  .pf-agenda-layout { grid-template-columns: 1fr; }
  .pf-cal-cell { min-height: 70px; }
}

@media (max-width: 640px) {
  .pf-agenda-topbar { flex-direction: column; align-items: flex-start; }
  .pf-cal-cell { min-height: 52px; padding: 4px; }
  .pf-cal-event { display: none; }
  .pf-cal-more { display: block; }
}

/* ═══════════════════════════════════════════════════════════
   DRIVE / ARQUIVOS MODULE
   ═══════════════════════════════════════════════════════════ */

.pf-drive-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pf-drive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pf-drive-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pf-drive-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--pf-text-muted);
}

.pf-drive-breadcrumb a {
  color: var(--pf-blue-deep);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.pf-drive-breadcrumb a:hover { color: var(--pf-gold); }
.pf-drive-breadcrumb-sep { color: var(--pf-gray-mid); font-size: 12px; }

.pf-drive-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pf-drive-filters .pf-input {
  height: 36px;
  font-size: 13px;
  min-width: 0;
  flex: 1;
}

.pf-drive-content { }

/* Folder grid */
.pf-drive-folders-section {
  margin-bottom: 28px;
}

.pf-drive-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--pf-text-muted);
  margin: 0 0 12px;
}

.pf-drive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.pf-drive-folder-card {
  background: var(--pf-white);
  border: 1px solid var(--pf-gray-light);
  border-radius: var(--pf-radius);
  padding: 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.pf-drive-folder-card:hover {
  box-shadow: 0 4px 16px rgba(7,26,45,0.1);
  border-color: rgba(201,164,92,0.3);
  transform: translateY(-1px);
}

.pf-drive-folder-icon {
  color: var(--pf-gold);
  flex-shrink: 0;
}

.pf-drive-folder-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.pf-drive-folder-count {
  font-size: 11px;
  color: var(--pf-text-muted);
}

.pf-drive-folder-menu-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pf-text-muted);
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.pf-drive-folder-card:hover .pf-drive-folder-menu-btn { opacity: 1; }
.pf-drive-folder-menu-btn:hover { color: var(--pf-text); background: var(--pf-gray-light); }

/* File list */
.pf-drive-files-section { }

.pf-drive-files-list {
  background: var(--pf-white);
  border-radius: var(--pf-radius);
  border: 1px solid var(--pf-gray-light);
  box-shadow: var(--pf-shadow);
  overflow: hidden;
}

.pf-drive-files-head {
  display: grid;
  grid-template-columns: 2fr 80px 100px 120px 80px 100px;
  gap: 0;
  padding: 10px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid var(--pf-gray-light);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pf-text-muted);
}

.pf-drive-file-row {
  display: grid;
  grid-template-columns: 2fr 80px 100px 120px 80px 100px;
  gap: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--pf-gray-light);
  align-items: center;
  transition: background 0.15s;
}

.pf-drive-file-row:last-child { border-bottom: none; }
.pf-drive-file-row:hover { background: #f8f9fa; }

.pf-drive-file-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pf-drive-file-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
}

.pf-drive-icon-pdf  { background: rgba(239,68,68,0.1);   color: #dc2626; }
.pf-drive-icon-img  { background: rgba(16,185,129,0.1);  color: #059669; }
.pf-drive-icon-doc  { background: rgba(37,99,235,0.1);   color: #1d4ed8; }
.pf-drive-icon-xls  { background: rgba(16,185,129,0.1);  color: #065f46; }
.pf-drive-icon-zip  { background: rgba(245,158,11,0.1);  color: #b45309; }
.pf-drive-icon-file { background: rgba(107,114,128,0.1); color: #4b5563; }

.pf-drive-file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--pf-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-drive-cell {
  font-size: 12px;
  color: var(--pf-text-muted);
}

.pf-drive-vis-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

.pf-drive-vis-badge.visible  { background: rgba(16,185,129,0.1); color: #065f46; }
.pf-drive-vis-badge.hidden   { background: rgba(107,114,128,0.1); color: #6b7280; }

.pf-drive-actions-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.pf-drive-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--pf-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.pf-drive-action-btn:hover { background: var(--pf-gray-light); color: var(--pf-text); }
.pf-drive-action-btn.danger:hover { background: rgba(239,68,68,0.1); color: #dc2626; }

/* Dropdown */
.pf-drive-dropdown {
  position: relative;
}

.pf-drive-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border: 1px solid var(--pf-gray-light);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 160px;
  padding: 4px 0;
  z-index: 200;
  display: none;
}

.pf-drive-dropdown-menu.open { display: block; }

.pf-drive-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--pf-text);
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.pf-drive-dropdown-item:hover { background: #f0f4f8; }
.pf-drive-dropdown-item.danger { color: #dc2626; }
.pf-drive-dropdown-item.danger:hover { background: rgba(239,68,68,0.06); }

/* Upload dropzone */
.pf-drive-dropzone {
  border: 2px dashed var(--pf-gray-mid);
  border-radius: var(--pf-radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fafafa;
}

.pf-drive-dropzone.dragging {
  border-color: var(--pf-gold);
  background: rgba(201,164,92,0.05);
}

.pf-drive-dropzone-icon { color: var(--pf-text-muted); margin-bottom: 12px; }
.pf-drive-dropzone p { margin: 0 0 4px; font-size: 14px; font-weight: 500; color: var(--pf-text); }
.pf-drive-dropzone small { font-size: 12px; color: var(--pf-text-muted); }

/* Upload progress */
.pf-upload-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.pf-upload-item {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 10px 14px;
}

.pf-upload-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.pf-upload-item-name {
  font-weight: 500;
  color: var(--pf-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.pf-upload-item-pct {
  font-size: 11px;
  color: var(--pf-text-muted);
  white-space: nowrap;
}

.pf-upload-progress {
  height: 4px;
  background: var(--pf-gray-light);
  border-radius: 2px;
  overflow: hidden;
}

.pf-upload-progress-bar {
  height: 100%;
  background: var(--pf-gold);
  border-radius: 2px;
  transition: width 0.2s;
}

.pf-upload-progress-bar.done   { background: #10b981; }
.pf-upload-progress-bar.error  { background: #ef4444; }

/* Empty state */
.pf-drive-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--pf-text-muted);
}

.pf-drive-empty-icon { margin-bottom: 12px; opacity: 0.4; }
.pf-drive-empty p { font-size: 14px; margin: 0; }

/* Drive responsive */
@media (max-width: 1024px) {
  .pf-drive-files-head,
  .pf-drive-file-row {
    grid-template-columns: 2fr 80px 100px 80px 100px;
  }
  .pf-drive-files-head > *:nth-child(4),
  .pf-drive-file-row > *:nth-child(4) { display: none; }
}

@media (max-width: 768px) {
  .pf-drive-toolbar { flex-direction: column; align-items: flex-start; }
  .pf-drive-filters { width: 100%; }
  .pf-drive-filters .pf-input { flex: 1 1 120px; }

  .pf-drive-files-head,
  .pf-drive-file-row {
    grid-template-columns: 1fr 80px 80px;
  }
  .pf-drive-files-head > *:nth-child(n+3):not(:last-child),
  .pf-drive-file-row > *:nth-child(n+3):not(:last-child) { display: none; }

  .pf-drive-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ── Utility & Aliases ───────────────────────────────────────────────────── */

/* Scroll lock when modal is open */
.pf-no-scroll { overflow: hidden !important; }

/* Back-to-site link in sidebar */
.pf-panel-back { color: rgba(255,255,255,0.5) !important; }
.pf-panel-back:hover { color: var(--pf-gold) !important; background: rgba(201,164,92,0.08) !important; }

/* Button danger alias */
.pf-btn-danger { background: #DC2626; color: #fff; border-color: #DC2626; }
.pf-btn-danger:hover { background: #B91C1C; }

/* Header actions row in section headers */
.pf-header-actions { display: flex; align-items: center; gap: 12px; }

/* Status badge (inline chip, used in agenda cards) */
.pf-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.pf-badge-xs { font-size: 10px; padding: 1px 6px; }

/* Agenda: class name aliases (template uses -side-, CSS defines -sidebar-) */
.pf-agenda-side-section {
  background: var(--pf-white);
  border-radius: var(--pf-radius);
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--pf-gray-light);
}
.pf-agenda-side-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--pf-text-muted);
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--pf-gray-light);
  margin: 0;
}

/* Agenda card sub-elements */
.pf-agenda-card-time {
  font-size: 11px;
  color: var(--pf-text-muted);
  margin: 4px 0 2px;
}
.pf-agenda-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

/* Calendar head alias (template uses pf-cal-head-cell, CSS has pf-cal-header-day) */
.pf-cal-head-cell {
  padding: 10px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pf-text-muted);
}

/* ── Agenda nav buttons ──────────────────────────────────────── */
.pf-agenda-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.pf-agenda-nav-btn {
  width: auto !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  background: var(--pf-white);
  border: 1px solid var(--pf-gray-light);
  border-radius: var(--pf-radius);
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pf-text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pf-agenda-nav-btn:hover { background: var(--pf-blue-deep); border-color: var(--pf-blue-deep); color: #fff; }
.pf-agenda-nav-label { font-size: 15px; font-weight: 600; color: var(--pf-text); text-align: center; }

/* ── Blog internal sub-tabs ──────────────────────────────────── */
.pf-blog-tabs { margin-top: 16px; }
.pf-blog-tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--pf-gray-light);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pf-blog-tab-btn {
  padding: 10px 18px;
  border: none;
  background: none;
  border-radius: var(--pf-radius) var(--pf-radius) 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--pf-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, background 0.15s;
  margin-bottom: -2px;
  border-bottom: 2px solid transparent;
}
.pf-blog-tab-btn:hover { color: var(--pf-text); background: var(--pf-bg); }
.pf-blog-tab-btn.active { color: var(--pf-primary); border-bottom-color: var(--pf-primary); font-weight: 600; }
.pf-blog-tab-pane { display: none; }
.pf-blog-tab-pane.active { display: block; }

/* ── Blog post cards (Meus Posts / Todos os Posts) ───────────── */
.pf-posts-list { display: flex; flex-direction: column; gap: 10px; }
.pf-post-card {
  background: var(--pf-white);
  border: 1px solid var(--pf-gray-light);
  border-radius: var(--pf-radius);
  padding: 14px 18px;
  transition: box-shadow 0.15s;
}
.pf-post-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.pf-post-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pf-post-card-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pf-post-card-title { font-size: 14px; font-weight: 600; color: var(--pf-text); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.pf-post-card-date, .pf-post-card-author, .pf-post-card-cat { font-size: 12px; color: var(--pf-text-muted); }
.pf-post-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.pf-post-card-obs {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  color: #78350f;
}

/* ── Rich text editor (blog-aprovacao.php) ───────────────────── */
.pf-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: var(--pf-bg);
  border: 1px solid var(--pf-gray-light);
  border-bottom: none;
  border-radius: var(--pf-radius) var(--pf-radius) 0 0;
}
.pf-editor-btn {
  padding: 4px 10px;
  background: var(--pf-white);
  border: 1px solid var(--pf-gray-light);
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  color: var(--pf-text);
  transition: background 0.12s, border-color 0.12s;
  line-height: 1.4;
}
.pf-editor-btn:hover { background: var(--pf-primary); color: #fff; border-color: var(--pf-primary); }
.pf-editor-area {
  min-height: 220px;
  padding: 14px 16px;
  border: 1px solid var(--pf-gray-light);
  border-radius: 0 0 var(--pf-radius) var(--pf-radius);
  background: var(--pf-white);
  font-size: 14px;
  line-height: 1.7;
  color: var(--pf-text);
  outline: none;
  overflow-y: auto;
}
.pf-editor-area:empty:before {
  content: attr(placeholder);
  color: var(--pf-text-muted);
  pointer-events: none;
}
.pf-editor-area[data-empty="1"]:before {
  content: 'Escreva o conteúdo do post...';
  color: var(--pf-text-muted);
  pointer-events: none;
}
.pf-editor-area:focus { border-color: var(--pf-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.pf-editor-area h2 { font-size: 1.3em; font-weight: 700; margin: 1em 0 .4em; }
.pf-editor-area h3 { font-size: 1.1em; font-weight: 600; margin: 1em 0 .3em; }
.pf-editor-area ul, .pf-editor-area ol { padding-left: 1.5em; margin: .5em 0; }
.pf-editor-area a { color: var(--pf-primary); text-decoration: underline; }

/* ── Approval content preview expand ─────────────────────────── */
.pf-approval-content-preview { position: relative; max-height: 160px; overflow: hidden; transition: max-height 0.3s ease; }
.pf-approval-content-preview.pf-preview-expanded { max-height: 2000px; }
.pf-btn-read-more {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px;
  background: none;
  border: none;
  color: var(--pf-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}
.pf-btn-read-more:hover { text-decoration: underline; }

/* ── Notification delete button ──────────────────────────────── */
.pf-notif-delete {
  opacity: 0.4;
  transition: opacity 0.15s;
  margin-left: 2px;
  color: var(--pf-text-muted);
}
.pf-notif-item:hover .pf-notif-delete { opacity: 0.8; }
.pf-notif-delete:hover { opacity: 1 !important; color: var(--pf-error, #DC2626); }

/* ── Modal body & size variants ──────────────────────────────── */
.pf-modal-body { padding: 24px; }
.pf-modal-lg   { max-width: 760px; }
.pf-modal-sm   { max-width: 440px; }
.pf-modal-title { font-size: 17px; font-weight: 600; margin: 0; }

/* ── field-full for two-col forms ────────────────────────────── */
.pf-field-full { grid-column: 1 / -1; }

/* Form group alias (agenda uses pf-form-group, base CSS uses pf-field) */
.pf-form-group { margin-bottom: 16px; }
.pf-form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--pf-text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.pf-form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.pf-form-row .pf-form-group { flex: 1; min-width: 140px; }

/* ── Client access section in modal ────────────────────────── */
.pf-acesso-section { background: #f8f9fa; border-radius: var(--pf-radius-sm); padding: 14px 16px !important; margin-top: 8px !important; }
.pf-btn-error { background: #DC2626; color: #fff; border-color: #DC2626; }
.pf-btn-error:hover { background: #B91C1C; border-color: #B91C1C; }

/* ── Drive filter selects ────────────────────────────────────── */
.pf-drive-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.pf-drive-filters select { min-width: 180px; flex: 1 1 180px; }
.pf-drive-filters button { white-space: nowrap; }

/* ── Client panel logo brand bar ────────────────────────────── */
.pf-cliente-brand { text-align: center; padding: 32px 20px 24px; border-bottom: 1px solid var(--pf-gray-light); margin-bottom: 32px; }
.pf-cliente-brand a { display: inline-flex; line-height: 0; }
.pf-cliente-logo-img { height: 64px; width: auto; object-fit: contain; display: block; }
@media (max-width: 1024px) { .pf-cliente-logo-img { height: 58px; } }
@media (max-width: 768px)  { .pf-cliente-logo-img { height: 54px; } }
.pf-form-row-3 .pf-form-group { flex: 1; min-width: 110px; }

/* Targeted hardening pass: agenda, drive and compact controls */
.pf-drive-toolbar {
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.pf-drive-toolbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pf-drive-filters {
  min-height: 56px;
  align-items: stretch;
  margin: 8px 0 20px;
  overflow: visible;
}

.pf-drive-filters select,
.pf-drive-filters .pf-input,
.pf-drive-filters button {
  min-height: 44px;
  height: 44px;
  line-height: 1.45;
  padding-top: 10px;
  padding-bottom: 10px;
}

.pf-drive-grid.pf-drive-folders {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.pf-drive-folder-card {
  min-height: 92px;
  padding: 18px 16px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
  border-color: rgba(7,26,45,0.08);
}

.pf-drive-folder-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  flex: 1;
}

.pf-drive-item-menu {
  position: relative;
  margin-left: auto;
}

.pf-drive-menu-btn {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--pf-text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.pf-drive-menu-btn:hover {
  background: #f2f4f6;
  border-color: var(--pf-gray-light);
  color: var(--pf-blue-deep);
}

.pf-drive-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 158px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--pf-gray-light);
  border-radius: 8px;
  box-shadow: var(--pf-shadow-lg);
  z-index: 30;
}

.pf-drive-dropdown.open { display: block; }

.pf-agenda-layout {
  align-items: start;
}

.pf-cal-grid {
  border-left: 1px solid var(--pf-gray-light);
  border-top: 1px solid var(--pf-gray-light);
}

.pf-cal-cell {
  border-right: 1px solid var(--pf-gray-light);
  border-bottom: 1px solid var(--pf-gray-light);
}

.pf-agenda-card {
  overflow: visible;
}

.pf-agenda-card-header {
  gap: 8px;
}

.pf-agenda-card-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-agenda-card-actions {
  flex-wrap: wrap;
}

.pf-btn-icon {
  width: 32px;
  min-width: 32px;
  padding-left: 0;
  padding-right: 0;
}

.pf-cal-event {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 42px 20px 8px;
  min-height: 40px;
  line-height: 1.15;
}

.pf-cal-event-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-cal-event-time {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.8;
}

.pf-cal-event-actions {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 3px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.pf-cal-event:hover .pf-cal-event-actions {
  opacity: 1;
  pointer-events: auto;
}

.pf-cal-event-action {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 16px;
  padding: 0;
  cursor: pointer;
}

.pf-cal-event-cancel { background: #dc2626; }
.pf-cal-event-done { background: #059669; }

.pf-card-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--pf-gray-light);
  font-size: 12px;
  color: var(--pf-text-muted);
}

.pf-page-btn {
  border: 1px solid var(--pf-gray-light);
  background: #fff;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  cursor: pointer;
}

.pf-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#tab-agenda > .pf-section-header {
  display: none;
  margin: 0;
}

#tab-agenda .pf-agenda-wrap {
  margin-top: 0;
}

.pf-visual-editor {
  min-height: 280px;
  padding: 14px 16px;
  border: 1px solid var(--pf-gray-light);
  border-radius: 8px;
  background: #fff;
  color: var(--pf-text);
  line-height: 1.65;
  outline: none;
  overflow-y: auto;
}

.pf-visual-editor:focus {
  border-color: var(--pf-gold);
  box-shadow: 0 0 0 3px rgba(201,164,92,0.12);
}

.pf-visual-editor h2,
.pf-visual-editor h3 {
  margin: 0.8em 0 0.35em;
  color: var(--pf-blue-deep);
}

/* Drive files: polished cards, clear actions and mobile-friendly layout */
.pf-drive-files-list {
  display: grid;
  gap: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.pf-drive-list-header {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) 96px 72px 108px 92px 118px minmax(138px, 0.7fr);
  gap: 10px;
  align-items: center;
  padding: 0 16px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--pf-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pf-drive-file-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) 96px 72px 108px 92px 118px minmax(138px, 0.7fr);
  gap: 10px;
  align-items: center;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(7,26,45,0.08);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(7,26,45,0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pf-drive-file-row:hover {
  background: #fff;
  border-color: rgba(201,164,92,0.28);
  box-shadow: 0 12px 30px rgba(7,26,45,0.09);
  transform: translateY(-1px);
}

.pf-drive-file-name {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  font-size: 13px;
  white-space: normal;
}

.pf-drive-file-preview {
  width: 76px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(7,26,45,0.08);
  border-radius: 8px;
  background: #f7f9fb;
  text-decoration: none;
}

.pf-drive-file-preview:hover {
  border-color: rgba(201,164,92,0.45);
}

.pf-drive-file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pf-drive-file-preview-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef3f8;
  color: var(--pf-blue-deep);
  font-size: 20px;
}

.pf-drive-file-preview-icon.is-pdf {
  background: rgba(220,38,38,0.08);
  color: #b91c1c;
}

.pf-drive-file-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.pf-drive-file-link {
  color: var(--pf-blue-deep);
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-drive-file-link:hover {
  color: var(--pf-gold);
}

.pf-drive-file-sub {
  display: none;
  color: var(--pf-text-muted);
  font-size: 12px;
}

.pf-drive-file-tipo,
.pf-drive-file-size,
.pf-drive-file-autor,
.pf-drive-file-date,
.pf-drive-file-vis {
  min-width: 0;
  color: var(--pf-text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-drive-file-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pf-drive-file-actions .pf-btn {
  flex: 1 1 64px;
  min-height: 32px;
  padding-left: 10px;
  padding-right: 10px;
  border-color: var(--pf-gray-light);
  background: #fff;
  color: var(--pf-blue-deep);
  font-size: 12px;
}

.pf-drive-file-actions .pf-btn:hover {
  border-color: var(--pf-gold);
  color: var(--pf-blue-deep);
  background: rgba(201,164,92,0.08);
}

.pf-drive-file-actions .pf-file-delete:hover {
  border-color: #dc2626;
  color: #b91c1c;
  background: rgba(220,38,38,0.06);
}

.pf-drive-folder-link,
.pf-drive-file-link,
.pf-drive-file-preview,
.pf-nav-item {
  touch-action: manipulation;
}

body.pf-is-navigating .pf-dash-main {
  cursor: progress;
}

body.pf-is-navigating .pf-dash-content {
  opacity: 0.92;
  transition: opacity 0.12s ease;
}

@media (max-width: 1180px) {
  .pf-drive-list-header {
    display: none;
  }

  .pf-drive-file-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .pf-drive-file-tipo,
  .pf-drive-file-size,
  .pf-drive-file-autor,
  .pf-drive-file-date,
  .pf-drive-file-vis {
    display: none;
  }

  .pf-drive-file-sub {
    display: inline;
  }

  .pf-drive-file-actions {
    justify-content: flex-start;
    padding-left: 90px;
  }
}

@media (max-width: 640px) {
  .pf-drive-file-row {
    padding: 14px;
    border-radius: 8px;
  }

  .pf-drive-file-preview {
    width: 64px;
    height: 52px;
  }

  .pf-drive-file-actions {
    padding-left: 0;
  }

  .pf-drive-file-actions .pf-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Mobile hardening: prevent horizontal clipping and convert dense tables to cards */
@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .pf-dash-layout {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .pf-dash-main {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    margin-left: 0;
    overflow-x: hidden;
  }

  .pf-topbar {
    width: 100%;
    min-width: 0;
    gap: 12px;
    padding: 0 18px;
  }

  .pf-topbar-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .pf-topbar-user {
    min-width: 0;
    max-width: 48%;
  }

  .pf-user-info {
    min-width: 0;
  }

  .pf-user-name,
  .pf-user-role {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .pf-dash-content {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 22px 16px 96px;
  }

  .pf-section-header {
    display: grid;
    gap: 10px;
    align-items: start;
  }

  .pf-section-header p {
    max-width: 100%;
  }

  .pf-header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .pf-header-actions .pf-btn,
  .pf-section-header .pf-btn {
    max-width: 100%;
    white-space: normal;
  }

  .pf-card,
  .pf-table-card,
  .pf-blog-card,
  .pf-drive-wrap,
  .pf-agenda-wrap {
    max-width: 100%;
    overflow: hidden;
  }

  .pf-metrics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pf-metric-card {
    width: 100%;
    min-width: 0;
  }

  .pf-table-card {
    border-radius: 10px;
  }

  .pf-table-filters {
    padding: 14px;
    gap: 8px;
  }

  .pf-table-filters .pf-input,
  .pf-table-filters .pf-select,
  .pf-table-filters select,
  .pf-table-filters input {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  .pf-table-wrap {
    overflow-x: auto;
    max-width: 100%;
  }

  .pf-table {
    min-width: 720px;
  }

  .pf-table th,
  .pf-table td {
    white-space: normal;
    word-break: normal;
  }

  .pf-blog-tab-nav {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .pf-blog-tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .pf-blog-post-card,
  .pf-blog-approval-card {
    max-width: 100%;
    overflow: hidden;
  }

  .pf-blog-post-actions,
  .pf-approval-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .pf-blog-post-actions .pf-btn,
  .pf-approval-actions .pf-btn {
    flex: 1 1 120px;
    min-width: 0;
  }

  .pf-drive-toolbar,
  .pf-drive-toolbar-right,
  .pf-drive-search-form,
  .pf-drive-filters {
    width: 100%;
    min-width: 0;
  }

  .pf-drive-toolbar-right {
    justify-content: stretch;
  }

  .pf-drive-search-form .pf-input,
  .pf-drive-filters .pf-input,
  .pf-drive-filters select {
    width: 100%;
    min-width: 0;
  }

  .pf-drive-toolbar-right .pf-btn {
    flex: 1 1 140px;
  }

  .pf-drive-grid.pf-drive-folders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .pf-drive-folder-card {
    min-width: 0;
  }

  .pf-drive-file-link {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 430px) {
  .pf-topbar {
    padding: 0 14px;
  }

  .pf-user-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .pf-user-name {
    max-width: 118px;
  }

  .pf-user-role {
    max-width: 118px;
  }

  .pf-drive-grid.pf-drive-folders {
    grid-template-columns: 1fr 1fr;
  }
}
