/* =====================================================
   CSS VARIABLES — BizMetry Design System
   ===================================================== */

:root {
  --biz-purple-1: #667eea;
  --biz-purple-2: #764ba2;
  --biz-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --biz-gradient-soft: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);

  --toolbar-bg: #1a1f2e;
  --toolbar-strip-bg: #12172a;
  --toolbar-sep: rgba(255, 255, 255, 0.12);
  --toolbar-hover: rgba(255, 255, 255, 0.09);
  --toolbar-text: rgba(255, 255, 255, 0.75);
  --toolbar-text-bright: rgba(255, 255, 255, 0.95);

  --canvas-bg: #2e3340;
  --canvas-bg-alt: #363b4a;

  --surface-white: #ffffff;
  --surface-light: #fafbfc;
  --border-soft: #eef0f3;
  --border-medium: #e0e0e0;

  --text-primary: #2c3e50;
  --text-secondary: #555;
  --text-muted: #888;
  --text-faint: #bbb;

  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 16px 40px rgba(102, 126, 234, 0.22);
  --shadow-dropdown: 0 8px 32px rgba(0, 0, 0, 0.45);

  --radius-card: 16px;
  --radius-badge: 20px;
  --radius-sm: 6px;
  --radius-xs: 4px;

  --transition-base: all 0.18s ease;
  --transition-card: all 0.32s cubic-bezier(0.4, 0, 0.2, 1);

  --toolbar-h: 56px;
  --strip-h: 36px;
  --controls-h: 60px;
}

/* =====================================================
   BASE
   ===================================================== */

.home-container {
  background-color: var(--canvas-bg);
  min-height: 100vh;
}

/* =====================================================
   TOP TOOLBAR  (56px)
   ===================================================== */

.home-toolbar {
  background: var(--toolbar-bg);
  height: var(--toolbar-h);
  min-height: var(--toolbar-h);
  display: flex;
  align-items: center;
  padding: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.toolbar-inner {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 16px;
  gap: 10px;
}

/* Logo */
.toolbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0 4px;
}

.logo-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--biz-purple-1);
  flex-shrink: 0;
}

.logo-image {
  height: 32px;
  filter: brightness(1.05);
}

/* Separator */
.toolbar-sep {
  width: 1px;
  height: 22px;
  background: var(--toolbar-sep);
  flex-shrink: 0;
  margin: 0 4px;
}


.toolbar-spacer {
  flex: 1;
}

/* =====================================================
   ip-geolocation in toolbar
   ===================================================== */

.toolbar-geo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.toolbar-geo .ip-geo-container {
  color: var(--toolbar-text);
  font-size: 14px;
}

.toolbar-geo .ip-geo-flag {
  font-size: 1.5em;
}

.toolbar-geo .ip-geo-region {
  color: rgba(255, 255, 255, 0.90);
  font-weight: 600;
  white-space: nowrap;
}

.toolbar-geo .ip-geo-separator {
  color: rgba(255, 255, 255, 0.3);
}

.toolbar-geo .ip-geo-ip {
  color: rgba(255, 255, 255, 0.60);
  font-size: 13px;
}

.toolbar-geo .ip-geo-loading {
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
}

.toolbar-geo .ip-geo-fallback {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

/* Mode pill */
.mode-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 13px;
  font-weight: 600;
  color: var(--toolbar-text-bright);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}

.mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mode-cloud .mode-dot { background: #38bdf8; }
.mode-pce .mode-dot   { background: #fbbf24; }

/* New Profile button */
.new-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--radius-xs);
  background: var(--biz-purple-1);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
  letter-spacing: 0.2px;
}

.new-profile-btn:hover { background: #7b8ff0; }

.new-profile-btn md-icon {
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
  color: #fff !important;
}

/* Icon buttons */
.tbar-icon-wrap {
  position: relative;
  flex-shrink: 0;
}

.tbar-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
  padding: 0;
}

.tbar-icon-btn:hover {
  background: var(--toolbar-hover);
}

.tbar-icon-btn md-icon {
  font-size: 20px !important;
  width: 20px !important;
  height: 20px !important;
  color: var(--toolbar-text) !important;
}

.tbar-icon-btn:hover md-icon {
  color: var(--toolbar-text-bright) !important;
}

/* Notification badge */
.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f97316;
  border: 1.5px solid var(--toolbar-bg);
  pointer-events: none;
}

/* Text buttons (user, menu) */
.tbar-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  background: transparent;
  border: none;
  color: var(--toolbar-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.tbar-text-btn:hover {
  background: var(--toolbar-hover);
  color: var(--toolbar-text-bright);
}

.tbar-user-name {
  font-size: 14px;
  font-weight: 600;
  color: inherit;
}

.tbar-caret {
  font-size: 20px !important;
  width: 20px !important;
  height: 20px !important;
  color: inherit !important;
  opacity: 0.55;
}

/* md-menu button overrides */
.tbar-user-menu > button,
.tbar-main-menu > button {
  min-width: unset !important;
  min-height: unset !important;
  line-height: unset !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* =====================================================
   DROPDOWNS
   ===================================================== */

.tbar-dropdown {
  background: #1e2535 !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-dropdown) !important;
  overflow: hidden;
  margin-top: 4px !important;
}

.dd-user-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dd-user-fullname {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
}

.dd-user-email {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 3px;
}

.dd-user-role {
  display: inline-block;
  margin-top: 7px;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(102, 126, 234, 0.2);
  color: #9fa8da;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.dd-section-label {
  padding: 8px 16px 3px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.tbar-dropdown md-menu-item > .md-button,
.tbar-dropdown md-menu-item > button {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  padding: 8px 16px !important;
  min-height: 38px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.72) !important;
  text-transform: none !important;
  transition: background 0.12s ease !important;
}

.tbar-dropdown md-menu-item > .md-button:hover,
.tbar-dropdown md-menu-item > button:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  color: rgba(255, 255, 255, 0.95) !important;
}

.tbar-dropdown md-menu-item .md-icon,
.tbar-dropdown md-menu-item md-icon {
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
  color: rgba(255, 255, 255, 0.45) !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.tbar-dropdown md-menu-item > .md-button:hover md-icon,
.tbar-dropdown md-menu-item > button:hover md-icon {
  color: rgba(255, 255, 255, 0.75) !important;
}

.tbar-dropdown .dd-divider {
  background: rgba(255, 255, 255, 0.08) !important;
  margin: 4px 0 !important;
}

.dd-danger-btn { color: #f87171 !important; }
.dd-danger-btn:hover { background: rgba(248, 113, 113, 0.1) !important; color: #fca5a5 !important; }
.dd-danger-icon { color: #f87171 !important; }
.dd-danger-btn:hover .dd-danger-icon { color: #fca5a5 !important; }

.main-dropdown { min-width: 380px !important; }

.main-dd-grid {
  display: flex;
  align-items: stretch;
}

.main-dd-col {
  flex: 1;
  padding: 6px 0;
}

.main-dd-sep {
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  align-self: stretch;
}

/* =====================================================
   INFO STRIP  (36px)
   ===================================================== */

.info-strip {
  background: var(--toolbar-strip-bg);
  height: var(--strip-h);
  min-height: var(--strip-h);
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.strip-items {
  display: flex;
  align-items: center;
  gap: 0;
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1;
}

.strip-item:first-child { padding-left: 0; }

.strip-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.38);
  font-weight: 600;
}

.strip-val {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.2px;
}

.strip-spacer { flex: 1; }

.strip-health {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.2px;
}

.health-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  box-shadow: 0 0 5px rgba(74, 222, 128, 0.5);
}

/* =====================================================
   CONTROLS BAR
   ===================================================== */

.controls-bar {
  background: var(--surface-white);
  border-bottom: 1px solid var(--border-medium);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
}

.controls-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  gap: 20px;
  flex-wrap: wrap;
  min-height: var(--controls-h);
}

.controls-left,
.controls-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.control-label {
  font-size: 10px;
  font-weight: 600;
  color: #9e9e9e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sort-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  height: 32px;
  min-width: 175px;
  padding: 0 32px 0 10px;
  font-size: 13px;
  font-weight: 500;
  color: #424242;
  background: #f5f5f5;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xs);
  cursor: pointer;
  outline: none;
  transition: var(--transition-base);
}

.sort-select:hover { background: #efefef; border-color: #bdbdbd; }
.sort-select:focus { background: white; border-color: var(--biz-purple-1); box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.12); }

.sort-select-caret {
  position: absolute;
  right: 6px;
  pointer-events: none;
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
  color: #9e9e9e !important;
}

.sort-select-sm { min-width: 72px; }

/* Search — same light-theme sizing as .sort-select, moved here (next to
   Sort By) from the top toolbar. */
.controls-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.csearch-icon {
  position: absolute;
  left: 10px;
  font-size: 16px !important;
  width: 16px !important;
  height: 16px !important;
  color: #9e9e9e !important;
  pointer-events: none;
}

.csearch-input {
  height: 32px;
  min-width: 220px;
  padding: 0 30px 0 34px;
  font-size: 13px;
  font-weight: 500;
  color: #424242;
  background: #f5f5f5;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xs);
  outline: none;
  transition: var(--transition-base);
}

.csearch-input::placeholder { color: #9e9e9e; }

.csearch-input:hover { background: #efefef; border-color: #bdbdbd; }
.csearch-input:focus { background: white; border-color: var(--biz-purple-1); box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.12); }

.csearch-clear {
  position: absolute;
  right: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  opacity: 0.6;
}

.csearch-clear:hover { background: rgba(0, 0, 0, 0.06); opacity: 1; }

.csearch-clear md-icon {
  font-size: 14px !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  margin: 0 !important;
  color: #757575 !important;
}

.control-divider {
  width: 1px;
  height: 36px;
  background: var(--border-medium);
  flex-shrink: 0;
}

.pagination-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.pagination-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: var(--radius-xs) !important;
  background: #f5f5f5 !important;
  transition: var(--transition-base) !important;
}


.pagination-btn:not([disabled]):hover { background: var(--biz-purple-1) !important; }
.pagination-btn:not([disabled]):hover md-icon { color: white !important; }
.pagination-btn[disabled] { opacity: 0.38 !important; }



.page-divider { color: #bdbdbd; }

.clear-filters-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px;
  padding: 0 14px !important;
  height: 32px !important;
  border-radius: var(--radius-badge) !important;
  background: #f97316 !important;
  color: white !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  text-transform: none !important;
  margin: 0 !important;
  transition: var(--transition-base) !important;
}

.clear-filters-btn:hover { background: #ea6c0a !important; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(249, 115, 22, 0.3); }
.clear-filters-btn md-icon { font-size: 18px !important; width: 18px !important; height: 18px !important; }

/* =====================================================
   TILES WRAPPER & GRID
   ===================================================== */

.tiles-wrapper {
  flex: 1;
  padding: 22px;
  overflow-y: auto;
  background-color: var(--canvas-bg);
  height: calc(100vh - 152px);
}

.tiles-wrapper::-webkit-scrollbar { width: 7px; }
.tiles-wrapper::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.15); border-radius: 4px; }
.tiles-wrapper::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.18); border-radius: 4px; }
.tiles-wrapper::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  max-width: 1800px;
  margin: 0 auto;
}

/* min-width: 0 overrides the grid item's default min-width: auto (= its
   content's min-content size) — without it, a card with long unwrappable
   text (title, pills, template badge) forces its whole 1fr column wider
   than the others, breaking equal-width columns. */
.profile-tile { width: 100%; min-width: 0; }

/* =====================================================
   PROFILE CARD
   ===================================================== */

.profile-card {
  width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  max-height: 320px;
  height: 320px;
  transition: var(--transition-card);
  position: relative;
  background: var(--surface-white);
  border: 1.5px solid var(--border-medium);
  box-shadow: var(--shadow-card);
}

.profile-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--biz-purple-1);
}

/* Inactive profiles read as visibly "off" — lower contrast, desaturated,
   not just a small red label — while staying legible and interactive. */
.profile-card--disabled { opacity: 0.6; filter: saturate(0.55); }
.profile-card--disabled:hover { opacity: 0.8; }

.profile-card-content {
  flex: 1;
  min-width: 0;
  padding: 16px !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  background: var(--surface-white);
}

.profile-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.profile-icon-badge {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-icon-badge md-icon { color: var(--biz-purple-1); font-size: 22px !important; width: 22px !important; height: 22px !important; }

.profile-header-content { flex: 1; min-width: 0; }

.profile-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.1px;
}

.profile-project {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

/* Angular Material's own md-icon base style applies "margin: 0 auto" — inside
   this flex row (icon + text, lots of leftover width), that auto margin eats
   all the free space and shoves the icon away from the text. Confirmed live
   via devtools: this was the actual cause of the "misaligned" folder icon. */
.profile-project md-icon { flex-shrink: 0; margin: 0 !important; font-size: 13px !important; width: 13px !important; height: 13px !important; color: var(--text-faint) !important; }
.profile-project span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.profile-status-badge {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: var(--radius-badge);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.status-enabled  { background: rgba(76, 175, 80, 0.12);  color: #2e7d32; }
.status-disabled { background: rgba(244, 67, 54, 0.12);  color: #c62828; }

.profile-description {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 400;
}

.profile-description:empty { display: none; }

.profile-card-divider { margin: 2px 0 !important; }

.profile-pills-row { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }

.template-badge {
  display: inline-flex;
  align-items: center;
  background: var(--biz-gradient-soft);
  color: var(--biz-purple-1);
  border: 1px solid rgba(102, 126, 234, 0.18);
  padding: 4px 10px;
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: 600;
  align-self: flex-start;
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.template-badge md-icon { font-size: 13px !important; width: 13px !important; height: 13px !important; margin-right: 4px; color: var(--biz-purple-1) !important; }

.profile-card-footer {
  padding: 8px 16px !important;
  background: #f8f9fb;
  border-top: 1px solid #ececf0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.footer-info-compact { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: #aaa; gap: 8px; min-width: 0; }
.info-item { display: flex; align-items: center; gap: 5px; font-weight: 500; min-width: 0; }
.info-item md-icon { font-size: 14px !important; width: 14px !important; height: 14px !important; color: #d0d0d0 !important; }
.footer-info-compact .bm-user-name { max-width: 120px; }

.footer-actions-compact { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.footer-actions-compact .action-icon-btn {
  width: 30px !important; height: 30px !important; min-width: 30px !important; min-height: 30px !important;
  margin: 0 !important;
  border-radius: var(--radius-xs) !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: background 0.18s ease !important;
}
.footer-actions-compact .action-icon-btn md-icon { font-size: 17px !important; width: 17px !important; height: 17px !important; color: var(--biz-purple-1) !important; }
.footer-actions-compact .action-icon-btn:hover { background: rgba(102, 126, 234, 0.1) !important; }
.footer-actions-compact .action-icon-btn.md-icon-button:not([disabled]):hover { background: rgba(102, 126, 234, 0.1) !important; }

.profile-toggle-compact { margin: 0 !important; flex: 1; }
.profile-toggle-compact.md-checked .md-thumb { background-color: var(--biz-purple-1) !important; }
.profile-toggle-compact.md-checked .md-bar  { background-color: rgba(102, 126, 234, 0.4) !important; }

.card-delete-btn  { color: #d32f2f !important; }
.card-delete-icon { color: #d32f2f !important; }

/* =====================================================
   EMPTY STATE
   ===================================================== */

.empty-state-container { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 200px); width: 100%; padding: 40px 20px; }

.empty-state { text-align: center; max-width: 560px; background: var(--surface-white); border-radius: var(--radius-card); padding: 56px 40px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); animation: fadeIn 0.4s ease; }


.empty-state-icon md-icon { font-size: 56px; color: var(--biz-purple-1); width: 56px; height: 56px; }
.empty-state-title { font-size: 22px; font-weight: 600; color: #424242; margin: 0 0 14px; }
.empty-state-description { font-size: 14px; color: #757575; line-height: 1.65; margin: 0 0 36px; }

.empty-state-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; align-items: center; }
.empty-state-actions .md-button { margin: 0 !important; min-width: 170px; height: 42px; padding: 0 22px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 8px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; transition: var(--transition-base); }
.empty-state-actions .md-button md-icon { font-size: 18px !important; width: 18px !important; height: 18px !important; margin: 0 !important; flex-shrink: 0; }
.empty-state-actions .md-primary { background-color: var(--biz-purple-1) !important; color: white !important; }
.empty-state-actions .md-accent  { background-color: var(--biz-purple-2) !important; color: white !important; }
.empty-state-actions .md-button:hover { opacity: 0.88; transform: translateY(-2px); }

/* =====================================================
   TOOLTIPS
   ===================================================== */

/* Tooltip look: standardized in common/styles/shared-components.css (.md-tooltip) */
md-tooltip { pointer-events: none; white-space: normal !important; max-width: 320px !important; }
md-tooltip ._md-content { height: auto !important; max-height: none !important; overflow: visible !important; white-space: normal !important; }
md-menu-content.tbar-dropdown { max-height: none !important; overflow-y: visible !important; }
._md-open-menu-container.md-active { max-height: none !important; }

/* =====================================================
   ANIMATIONS
   ===================================================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1);    box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
  50%       { transform: scale(1.05); box-shadow: 0 8px 28px rgba(102,126,234,0.18); }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (min-width: 1600px) { .profiles-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1200px) and (max-width: 1599px) { .profiles-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px)  and (max-width: 1199px) { .profiles-grid { grid-template-columns: repeat(3, 1fr); } }

@media (max-width: 1100px) {
  .strip-item:nth-child(n+3) { display: none; }
  .toolbar-geo { display: none; }
}

@media (max-width: 900px)  { .strip-items { display: none; } }

@media (max-width: 860px) {
  .mode-pill span:not(.mode-dot) { display: none; }
  .mode-pill { padding: 0 8px; }
}

@media (max-width: 720px) {
  .tbar-user-name { display: none; }
  .new-profile-btn span { display: none; }
  .new-profile-btn { padding: 0 8px; min-width: 32px; }
}

@media (min-width: 600px) and (max-width: 899px) {
  .profiles-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .tiles-wrapper  { padding: 16px; }
  .profile-card   { min-height: 320px; max-height: 320px; height: 320px; }
}

@media (max-width: 768px) {
  .controls-content { flex-direction: column; gap: 12px; }
  .controls-left, .controls-right { width: 100%; }
  .control-divider { display: none; }
}

@media (max-width: 599px) {
  .profiles-grid { grid-template-columns: 1fr; gap: 14px; }
  .tiles-wrapper  { padding: 12px; }
  .profile-card   { min-height: 300px; max-height: 300px; height: 300px; }
  .profile-title        { font-size: 14px; }
  .profile-project      { font-size: 11px; }
  .profile-card-content { padding: 12px !important; gap: 8px; }
  .profile-description  { font-size: 12px; }
  .profile-card-footer  { padding: 7px 12px !important; }
  .empty-state          { padding: 36px 20px; }
  
  .empty-state-icon md-icon { font-size: 44px; width: 44px; height: 44px; }
  .empty-state-title    { font-size: 19px; }
  .empty-state-actions  { flex-direction: column; gap: 10px; }
  .empty-state-actions .md-button { width: 100%; min-width: 100%; }
}

/* ── Notifications badge en main menu ── */
.dd-notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 8px;
    background: #e53935;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    line-height: 1;
}

/* ── Icono "apps" del main menu ── */
.tbar-main-menu .tbar-text-btn md-icon:not(.tbar-caret) {
  color: var(--toolbar-text-bright) !important;
  opacity: 1 !important;
}

.tbar-main-menu .tbar-text-btn:hover md-icon:not(.tbar-caret) {
  color: white !important;
}
/* ── Suppress Angular Material auto-focus highlight on menu open ──────────
   $mdMenu moves focus to the first focusable element when the menu opens.
   The focus trap span above absorbs that focus, but as a belt-and-suspenders
   defense we also nullify the .md-focused background on main-dropdown items
   so no item ever appears pre-selected visually.                            */
.main-dropdown md-menu-item > .md-button.md-focused,
.main-dropdown md-menu-item > button.md-focused,
.main-dropdown md-menu-item > .md-button:focus,
.main-dropdown md-menu-item > button:focus {
  background: transparent !important;
  color: rgba(255, 255, 255, 0.72) !important;
}
.main-dropdown md-menu-item > .md-button.md-focused md-icon,
.main-dropdown md-menu-item > button.md-focused md-icon,
.main-dropdown md-menu-item > .md-button:focus md-icon,
.main-dropdown md-menu-item > button:focus md-icon {
  color: rgba(255, 255, 255, 0.45) !important;
}
