/* ==========================================================================
   UltraGuard Pro — Theme: Design Tokens + Dashboard Widgets
   
   This file owns:
     1. :root CSS variables (single source of truth for all tokens)
     7–16. Dashboard-specific widget styles (not in base or components)
     18. Status pills (.ug-pill-*)
     22–26. Chart cards, skeletons, responsive breakpoints, utilities, banners
   
   Sections 2–6 (layout shell) → admin-base.css
   Sections 17, 19–21 (table/button/tab/field) → admin-components.css
   ========================================================================== */

/* ==========================================================================
   UltraGuard Pro — Extranet Theme
   Inspired by MicroOffice: generous whitespace, fluid multi-column,
   airy card layout, soft neutral palette with teal + amber accents.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS — override the base CSS variables
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --ug-primary:            #0ea5e9;   /* sky-500  — teal-blue  */
  --ug-primary-light:      #38bdf8;   /* sky-400  */
  --ug-primary-dark:       #0284c7;   /* sky-600  */
  --ug-primary-rgb:        14,165,233;

  --ug-accent:             #f59e0b;   /* amber-400 */
  --ug-accent-dark:        #d97706;   /* amber-600 */

  --ug-success:            #10b981;   /* emerald-500 */
  --ug-success-light:      #34d399;
  --ug-success-dark:       #059669;

  --ug-warning:            #f59e0b;
  --ug-warning-light:      #fcd34d;
  --ug-warning-dark:       #d97706;

  --ug-error:              #ef4444;
  --ug-error-light:        #f87171;
  --ug-error-dark:         #dc2626;

  --ug-critical:           #ef4444;
  --ug-high:               #f97316;
  --ug-medium:             #f59e0b;
  --ug-low:                #84cc16;
  --ug-safe:               #10b981;

  /* Neutrals */
  --ug-dark:               #0f172a;   /* slate-900 */
  --ug-dark-mid:           #1e293b;   /* slate-800 */
  --ug-text:               #334155;   /* slate-700 */
  --ug-text-secondary:     #64748b;   /* slate-500 */
  --ug-gray:               #64748b;
  --ug-gray-light:         #94a3b8;   /* slate-400 */
  --ug-gray-lighter:       #cbd5e1;   /* slate-300 */
  --ug-border:             #e2e8f0;   /* slate-200 */
  --ug-border-light:       #f1f5f9;   /* slate-100 */

  /* Backgrounds */
  --ug-bg-canvas:          #f8fafc;   /* slate-50  — page bg */
  --ug-bg-primary:         #ffffff;
  --ug-bg-secondary:       #f8fafc;
  --ug-bg-tertiary:        #f1f5f9;
  --ug-bg-hover:           #f1f5f9;

  /* Sidebar */
  --ug-sidebar-bg:         #ffffff;
  --ug-sidebar-width:      220px;
  --ug-sidebar-active-bg:  #eff6ff;   /* blue-50 */
  --ug-sidebar-active-fg:  #0ea5e9;
  --ug-sidebar-active-bar: #0ea5e9;

  /* Spacing — slightly larger for breathing room */
  --ug-spacing-xs:   4px;
  --ug-spacing-sm:   8px;
  --ug-spacing-md:   16px;
  --ug-spacing-lg:   24px;
  --ug-spacing-xl:   32px;
  --ug-spacing-xxl:  48px;

  /* Border radius */
  --ug-radius-sm:    6px;
  --ug-radius-md:    10px;
  --ug-radius-lg:    14px;
  --ug-radius-xl:    18px;
  --ug-radius-round: 9999px;

  /* Shadows — softer, more diffuse */
  --ug-shadow-xs:    0 1px 2px rgba(15,23,42,.04);
  --ug-shadow-sm:    0 1px 4px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --ug-shadow-md:    0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
  --ug-shadow-lg:    0 8px 24px rgba(15,23,42,.10), 0 4px 8px rgba(15,23,42,.06);
  --ug-shadow-focus: 0 0 0 3px rgba(14,165,233,.25);

  /* Transitions */
  --ug-transition-fast: 120ms ease;
  --ug-transition-base: 200ms ease;
  --ug-transition-slow: 320ms ease;

  /* Gradients */
  --ug-gradient-primary:   linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
  --ug-gradient-success:   linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --ug-gradient-warning:   linear-gradient(135deg, #f59e0b 0%, #fcd34d 100%);
  --ug-gradient-error:     linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

/* --------------------------------------------------------------------------
   
/* --------------------------------------------------------------------------
   7. EXTRANET DASHBOARD GRID
   (continues from section 1 — sections 2-6 live in admin-base.css)
   -------------------------------------------------------------------------- */
/* Full-width wrapper for the dashboard body */
.ug-dashboard-body {
  display: grid;
  grid-template-columns: 1fr 260px 280px;
  grid-template-rows: auto;
  gap: 18px;
  align-items: start;
}

/* Left column — main content */
.ug-col-main {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Middle column — tools / progress */
.ug-col-mid {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Right column — feed / events */
.ug-col-right {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* --------------------------------------------------------------------------
   8. STATS ROW — summary numbers at the top
   -------------------------------------------------------------------------- */
.ug-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 0;
}

.ug-stat-card {
  background: var(--ug-bg-primary);
  border: 1px solid var(--ug-border);
  border-radius: var(--ug-radius-lg);
  padding: 18px 20px;
  box-shadow: var(--ug-shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow var(--ug-transition-fast), transform var(--ug-transition-fast);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.ug-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ug-stat-color, var(--ug-primary));
  border-radius: var(--ug-radius-lg) var(--ug-radius-lg) 0 0;
}

.ug-stat-card:hover {
  box-shadow: var(--ug-shadow-md);
  /* transform removed — causes recompositing on stat grid scroll */
}

.ug-stat-card.stat-success { --ug-stat-color: var(--ug-success); }
.ug-stat-card.stat-warning { --ug-stat-color: var(--ug-warning); }
.ug-stat-card.stat-error   { --ug-stat-color: var(--ug-error); }
.ug-stat-card.stat-primary { --ug-stat-color: var(--ug-primary); }
.ug-stat-card.stat-info    { --ug-stat-color: #8b5cf6; }

.ug-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--ug-radius-md);
  background: color-mix(in srgb, var(--ug-stat-color, var(--ug-primary)) 12%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ug-stat-icon .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  color: var(--ug-stat-color, var(--ug-primary));
}

.ug-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ug-dark);
  line-height: 1;
  letter-spacing: -0.5px;
}

.ug-stat-label {
  font-size: 12px;
  color: var(--ug-text-secondary);
  font-weight: 500;
  line-height: 1.3;
}

.ug-stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--ug-radius-round);
}

.ug-stat-delta.up {
  background: rgba(16,185,129,.12);
  color: var(--ug-success-dark);
}

.ug-stat-delta.down {
  background: rgba(239,68,68,.10);
  color: var(--ug-error-dark);
}

/* --------------------------------------------------------------------------
   9. ICON GRID (like the Helpdesk / Productivity tiles)
   -------------------------------------------------------------------------- */
.ug-icon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.ug-icon-tile {
  background: var(--ug-bg-primary);
  border: 1px solid var(--ug-border);
  border-radius: var(--ug-radius-lg);
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  text-decoration: none;
  color: var(--ug-text);
  transition: box-shadow var(--ug-transition-fast),
              transform var(--ug-transition-fast),
              background var(--ug-transition-fast);
  cursor: pointer;
}

.ug-icon-tile:hover {
  box-shadow: var(--ug-shadow-md);
  background: var(--ug-bg-hover);
  color: var(--ug-primary);
}

.ug-icon-tile-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--ug-radius-md);
  background: var(--ug-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ug-transition-fast);
}

.ug-icon-tile:hover .ug-icon-tile-icon {
  background: color-mix(in srgb, var(--ug-primary) 10%, transparent);
}

.ug-icon-tile-icon .dashicons {
  font-size: 22px;
  width: 22px;
  height: 22px;
  color: var(--ug-text-secondary);
  transition: color var(--ug-transition-fast);
}

.ug-icon-tile:hover .ug-icon-tile-icon .dashicons {
  color: var(--ug-primary);
}

.ug-icon-tile-label {
  font-size: 12.5px;
  font-weight: 600;
  color: inherit;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   10. PROGRESS BARS
   -------------------------------------------------------------------------- */
.ug-progress-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}


.ug-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.ug-progress-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ug-text);
}

.ug-progress-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--ug-dark);
}

.ug-progress-track {
  height: 7px;
  background: var(--ug-border-light);
  border-radius: var(--ug-radius-round);
  overflow: hidden;
}

.ug-progress-fill {
  height: 100%;
  border-radius: var(--ug-radius-round);
  background: var(--ug-primary);
  transition: width 0.6s cubic-bezier(.25,.8,.25,1);
}

.ug-progress-fill.pct-success { background: var(--ug-success); }
.ug-progress-fill.pct-warning { background: var(--ug-warning); }
.ug-progress-fill.pct-error   { background: var(--ug-error); }
.ug-progress-fill.pct-primary { background: var(--ug-primary); }

/* --------------------------------------------------------------------------
   11. FEED CARD — news / activity list
   -------------------------------------------------------------------------- */
.ug-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ug-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ug-border-light);
  text-decoration: none;
  color: inherit;
  transition: background var(--ug-transition-fast);
}

.ug-feed-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ug-feed-item:first-child {
  padding-top: 0;
}

.ug-feed-thumb {
  width: 76px;
  height: 60px;
  border-radius: var(--ug-radius-md);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--ug-bg-tertiary);
}

.ug-feed-thumb-placeholder {
  width: 76px;
  height: 60px;
  border-radius: var(--ug-radius-md);
  background: var(--ug-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ug-feed-thumb-placeholder .dashicons {
  font-size: 22px;
  width: 22px;
  height: 22px;
  color: var(--ug-gray-lighter);
}

.ug-feed-body {
  flex: 1;
  min-width: 0;
}

.ug-feed-category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ug-primary);
  margin-bottom: 5px;
}

.ug-feed-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ug-dark);
  line-height: 1.35;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.ug-feed-excerpt {
  font-size: 12px;
  color: var(--ug-text-secondary);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.ug-feed-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
}

.ug-feed-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--ug-gray-light);
}

.ug-feed-meta-item .dashicons {
  font-size: 13px;
  width: 13px;
  height: 13px;
}

/* --------------------------------------------------------------------------
   12. TOPIC LIST (Recent Topics style)
   -------------------------------------------------------------------------- */
.ug-topic-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ug-topic-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ug-border-light);
  text-decoration: none;
  color: inherit;
  transition: background var(--ug-transition-fast);
}

.ug-topic-item:last-child  { border-bottom: none; padding-bottom: 0; }
.ug-topic-item:first-child { padding-top: 0; }

.ug-topic-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--ug-radius-round);
  background: var(--ug-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ug-primary);
  flex-shrink: 0;
  overflow: hidden;
}

.ug-topic-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ug-topic-body { flex: 1; min-width: 0; }

.ug-topic-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ug-dark);
  line-height: 1.35;
  margin: 0 0 3px;
}

.ug-topic-author {
  font-size: 11px;
  color: var(--ug-gray-light);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   13. EVENTS LIST
   -------------------------------------------------------------------------- */
.ug-events-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ug-event-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--ug-border-light);
}

.ug-event-item:last-child  { border-bottom: none; padding-bottom: 0; }
.ug-event-item:first-child { padding-top: 0; }

.ug-event-date {
  width: 44px;
  height: 44px;
  border-radius: var(--ug-radius-md);
  background: var(--ug-primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.ug-event-date-day   { font-size: 18px; font-weight: 800; line-height: 1; }
.ug-event-date-month { font-size: 9px;  font-weight: 700; text-transform: uppercase; letter-spacing: .8px; opacity: .85; }

.ug-event-date.ev-feb { background: var(--ug-primary); }
.ug-event-date.ev-mar { background: var(--ug-success); }
.ug-event-date.ev-apr { background: var(--ug-accent);  color: #fff; }

.ug-event-body { flex: 1; min-width: 0; }

.ug-event-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ug-dark);
  margin: 0 0 3px;
  line-height: 1.3;
}

.ug-event-meta {
  font-size: 11px;
  color: var(--ug-text-secondary);
}

.ug-event-price {
  font-size: 11px;
  font-weight: 700;
  color: var(--ug-gray-light);
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   14. TEAM MEMBERS WIDGET
   -------------------------------------------------------------------------- */
.ug-members-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.ug-members-tab {
  padding: 5px 12px;
  border-radius: var(--ug-radius-round);
  font-size: 11px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: var(--ug-bg-tertiary);
  color: var(--ug-text-secondary);
  transition: background var(--ug-transition-fast), color var(--ug-transition-fast);
}

.ug-members-tab.active {
  background: var(--ug-primary);
  color: #fff;
}

.ug-member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ug-border-light);
}

.ug-member-item:last-child  { border-bottom: none; padding-bottom: 0; }
.ug-member-item:first-child { padding-top: 0; }

.ug-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--ug-radius-round);
  background: var(--ug-gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.ug-member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ug-member-info { flex: 1; min-width: 0; }

.ug-member-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ug-dark);
  margin: 0 0 2px;
}

.ug-member-status {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ug-gray-light);
}

.ug-member-status.online { color: var(--ug-success); }

.ug-member-badge {
  width: 26px;
  height: 26px;
  border-radius: var(--ug-radius-round);
  background: var(--ug-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ug-member-badge .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  color: var(--ug-gray-light);
}

/* Member count badge on widget title */
.ug-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ug-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: var(--ug-radius-round);
  padding: 0 6px;
}

/* --------------------------------------------------------------------------
   15. DONUT CHART ROW (Skills / Metrics circles)
   -------------------------------------------------------------------------- */
.ug-donut-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 12px;
  padding: 8px 0 4px;
}

.ug-donut-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.ug-donut-chart {
  position: relative;
  width: 80px;
  height: 80px;
}

.ug-donut-chart svg {
  transform: rotate(-90deg);
  overflow: visible;
}

.ug-donut-bg   { fill: none; stroke: var(--ug-border); stroke-width: 8; }
.ug-donut-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset .8s cubic-bezier(.25,.8,.25,1);
}

.ug-donut-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ug-dark);
}

.ug-donut-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ug-text-secondary);
  text-align: center;
}

/* --------------------------------------------------------------------------
   16. CARD SECTION HEADER — slim, clean
   -------------------------------------------------------------------------- */
.ug-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.ug-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ug-dark);
  margin: 0;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ug-card-title-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--ug-radius-sm);
  background: var(--ug-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ug-card-title-icon .dashicons {
  font-size: 15px;
  width: 15px;
  height: 15px;
  color: var(--ug-primary);
}

.ug-card-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ug-primary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--ug-radius-round);
  background: color-mix(in srgb, var(--ug-primary) 8%, transparent);
  transition: background var(--ug-transition-fast);
  cursor: pointer;
  border: none;
}

.ug-card-action:hover {
  background: color-mix(in srgb, var(--ug-primary) 14%, transparent);
  color: var(--ug-primary-dark);
}

.ug-card-action .dashicons {
  font-size: 13px;
  width: 13px;
  height: 13px;
}

/* --------------------------------------------------------------------------
   18. BADGE / STATUS PILLS
   -------------------------------------------------------------------------- */
.ug-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--ug-radius-round);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.ug-pill-success { background: rgba(16,185,129,.12); color: var(--ug-success-dark); }
.ug-pill-warning { background: rgba(245,158,11,.12);  color: var(--ug-warning-dark); }
.ug-pill-error   { background: rgba(239,68,68,.10);   color: var(--ug-error-dark); }
.ug-pill-primary { background: rgba(14,165,233,.10);  color: var(--ug-primary-dark); }
.ug-pill-purple  { background: rgba(139,92,246,.10);  color: #7c3aed; }
.ug-pill-neutral { background: var(--ug-bg-tertiary); color: var(--ug-text-secondary); }

.ug-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   22. CHART CARD
   -------------------------------------------------------------------------- */
.ug-chart-card {
  background: var(--ug-bg-primary);
  border: 1px solid var(--ug-border);
  border-radius: var(--ug-radius-lg);
  padding: 20px 22px;
  box-shadow: var(--ug-shadow-xs);
}

.ug-chart-wrap {
  position: relative;
  height: 200px;
}

/* --------------------------------------------------------------------------
   23. LOADING SKELETON
   -------------------------------------------------------------------------- */
@keyframes ug-skeleton-pulse {
  0%   { opacity: 1; }
  50%  { opacity: .45; }
  100% { opacity: 1; }
}

.ug-skeleton {
  background: var(--ug-bg-tertiary);
  border-radius: var(--ug-radius-sm);
  animation: ug-skeleton-pulse 1.6s ease infinite;
}

.ug-skeleton-text  { height: 14px; border-radius: 4px; }
.ug-skeleton-title { height: 20px; width: 55%; border-radius: 4px; }
.ug-skeleton-rect  { border-radius: var(--ug-radius-md); }
.ug-skeleton-circle { border-radius: 50%; }

/* --------------------------------------------------------------------------
   24. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */

/* Tablet landscape → drop right sidebar column */
/* Tablet portrait → single-column content, keep mid */
/* Mobile → collapsed sidebar + stacked layout */
/* --------------------------------------------------------------------------
   25. UTILITY CLASSES
   -------------------------------------------------------------------------- */
.ug-divider {
  border: none;
  border-top: 1px solid var(--ug-border-light);
  margin: 14px 0;
}

.ug-view-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ug-primary);
  text-decoration: none;
  margin-top: 14px;
  padding: 6px 0;
  border: none;
  background: none;
  cursor: pointer;
  transition: color var(--ug-transition-fast);
  font-family: var(--ug-font-family);
}

.ug-view-all:hover { color: var(--ug-primary-dark); }

.ug-view-all .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
}

.ug-text-xs   { font-size: 11px; }
.ug-text-sm   { font-size: 12px; }
.ug-text-md   { font-size: 14px; }
.ug-text-muted { color: var(--ug-text-secondary); }
.ug-text-dark  { color: var(--ug-dark); }
.ug-text-success { color: var(--ug-success); }
.ug-text-error   { color: var(--ug-error); }
.ug-text-warning { color: var(--ug-warning); }
.ug-text-primary { color: var(--ug-primary); }

.ug-fw-500  { font-weight: 500; }
.ug-fw-600  { font-weight: 600; }
.ug-fw-700  { font-weight: 700; }

.ug-gap-xs  { gap: 4px; }
.ug-gap-sm  { gap: 8px; }
.ug-gap-md  { gap: 14px; }
.ug-gap-lg  { gap: 20px; }

.ug-mt-xs { margin-top: 4px; }
.ug-mt-sm { margin-top: 8px; }
.ug-mt-md { margin-top: 16px; }
.ug-mt-lg { margin-top: 24px; }

.ug-mb-0  { margin-bottom: 0 !important; }
.ug-mb-sm { margin-bottom: 8px; }
.ug-mb-md { margin-bottom: 14px; }

.ug-flex        { display: flex; }
.ug-flex-col    { flex-direction: column; }
.ug-items-center { align-items: center; }
.ug-justify-between { justify-content: space-between; }
.ug-flex-1      { flex: 1; min-width: 0; }
.ug-truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------------------
   26. FREE BANNER & UPGRADE PROMPTS
   (Previously incorrectly injected into admin-utilities.css by PHP)
   -------------------------------------------------------------------------- */
.ultraguard-free-footer {
  background: #fffbeb;
  border-top: 1px solid #fde68a;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: all .3s ease;
}

.ultraguard-footer-dismissed { display: none; }

.ultraguard-footer-content {
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ultraguard-footer-warning {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 280px;
}

.ultraguard-footer-warning .dashicons-warning {
  color: #f59e0b;
  font-size: 22px;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.ultraguard-footer-message strong {
  color: #92400e;
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.ultraguard-footer-message p {
  margin: 0;
  color: #78716c;
  font-size: 12px;
  line-height: 1.5;
}

.ultraguard-upgrade-link { color: #b45309; font-weight: 600; text-decoration: underline; }
.ultraguard-upgrade-link:hover { color: #92400e; }

.ultraguard-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ultraguard-dismiss-footer {
  color: #a8a29e;
  padding: 4px;
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.ultraguard-dismiss-footer:hover { color: #78716c; }
.ultraguard-dismiss-footer .dashicons { font-size: 16px; width: 16px; height: 16px; }

.ultraguard-footer-branding {
  padding: 8px 20px;
  background: #fef3c7;
  color: #a8a29e;
  font-size: 11px;
  text-align: center;
  border-top: 1px solid #fde68a;
}
.ultraguard-footer-branding a { color: #b45309; text-decoration: none; }
.ultraguard-footer-branding a:hover { text-decoration: underline; }

/* Sidebar upgrade CTA */
.ultraguard-sidebar-upgrade-cta {
  padding: 14px;
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  border-top: 1px solid #fde68a;
}

.ultraguard-sidebar-upgrade-content {
  text-align: center;
}

.ultraguard-sidebar-upgrade-content .dashicons-warning {
  color: #f59e0b;
  font-size: 28px;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
}

.ultraguard-sidebar-upgrade-content h4 {
  margin: 0 0 6px;
  color: #92400e;
  font-size: 13px;
  font-weight: 600;
}

.ultraguard-sidebar-upgrade-content p {
  margin: 0 0 12px;
  color: #78716c;
  font-size: 11px;
  line-height: 1.4;
}

/* ── Sidebar CTA icon ── */
.ultraguard-sidebar-upgrade-content .ug-cta-icon {
  color: #f59e0b;
  font-size: 24px;
  width: 24px;
  height: 24px;
  margin-bottom: 6px;
  display: block;
}

/* ── CTA button group ── */
.ug-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.ug-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  line-height: 1.3;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ug-cta-btn-primary {
  background: #f59e0b;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(245,158,11,0.3);
}

.ug-cta-btn-primary:hover {
  background: #d97706;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(245,158,11,0.4);
}

.ug-cta-btn-link {
  background: transparent;
  color: #94a3b8 !important;
  font-size: 11px;
  padding: 4px 8px;
}

.ug-cta-btn-link:hover {
  color: #f59e0b !important;
  text-decoration: none;
}

/* License badge */
.ultraguard-logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ultraguard-license-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.ultraguard-badge-pro { background: #4f46e5; color: #fff; }
.ultraguard-badge-free { background: #6b7280; color: #fff; }

/* ==========================================================================
   DASHBOARD GRID — COMPREHENSIVE RESPONSIVE FIXES
   ========================================================================== */

/* Laptop/wide tablet: drop to 2 columns */
/* Tablet: single column */
/* Mobile stats row */
/* Security score widget responsive */
/* Quick tiles wrap on mobile */
/* Module status list: readable on mobile */
/* Coverage bars: label wraps on mobile */
/* Recommendation cards: single column on mobile */

/* ── Responsive breakpoints (consolidated) ──────────────────────────── */

@media screen and (max-width: 1280px) {
.ug-dashboard-body {
    grid-template-columns: 1fr 260px;
  }

  .ug-col-right {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1200px) {
.ug-dashboard-body {
    grid-template-columns: 1fr 260px;
  }
  .ug-col-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media screen and (max-width: 1024px) {
.ug-dashboard-body {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ug-col-mid,
  .ug-col-right {
    grid-column: 1;
  }
}

@media (max-width: 1024px) {
.ug-dashboard-body {
    grid-template-columns: 1fr;
  }
  .ug-col-mid,
  .ug-col-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .ug-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 782px) {
.ug-dashboard-body {
    gap: 10px;
  }

  .ug-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .ug-stat-card {
    padding: 14px 16px;
  }

  .ug-stat-value {
    font-size: 22px;
  }

  .ug-stat-label {
    font-size: 11px;
  }

  .ug-icon-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
  }
.ug-score-ring-wrap {
    width: 100px;
    height: 100px;
  }

  .ug-score-number {
    font-size: 28px;
  }
.ug-quick-tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .ug-quick-tile {
    padding: 12px;
  }

  .ug-quick-tile-icon {
    font-size: 20px;
    width: 20px;
    height: 20px;
  }

  .ug-quick-tile-label {
    font-size: 11px;
  }
.ug-module-status-item {
    padding: 8px 0;
    font-size: 12.5px;
  }

  .ug-module-status-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
.ug-coverage-header {
    flex-wrap: wrap;
    gap: 4px;
  }

  .ug-coverage-label {
    flex: 1 1 60%;
    font-size: 12px;
  }

  .ug-coverage-value {
    font-size: 12px;
  }
.ug-recommendations-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ug-recommendation-card {
    padding: 12px;
  }
}

@media (max-width: 782px) {
.ug-dashboard-body {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .ug-col-mid,
  .ug-col-right {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .ug-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .ug-icon-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
.ug-stats-row {
    grid-template-columns: 1fr;
  }

  .ug-stat-value {
    font-size: 20px;
  }

  .ug-icon-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
.ug-stats-row {
    grid-template-columns: 1fr;
  }
  .ug-stat-value { font-size: 22px; }
  .ug-icon-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 360px) {
.ug-quick-tiles {
    grid-template-columns: 1fr;
  }
}
