/* ==========================================================================
   Crextio Extended Pages Stylesheet (pages.css)
   Harmonized with Crextio Unified Design System (Bootstrap 5.3 + Dark Mode)
   Covers: People, Hiring, Devices, Apps, Calendar, Reviews, Settings, Notifications
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared Helpers & Card Enhancements
   -------------------------------------------------------------------------- */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge-online {
  background-color: rgba(34, 197, 94, 0.12);
  color: #166534;
}
.badge-online .badge-status-dot {
  background-color: #22c55e;
}

.badge-remote {
  background-color: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}
.badge-remote .badge-status-dot {
  background-color: #3b82f6;
}

.badge-leave {
  background-color: rgba(245, 196, 67, 0.2);
  color: #854d0e;
}
.badge-leave .badge-status-dot {
  background-color: #ca8a04;
}

.badge-busy {
  background-color: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}
.badge-busy .badge-status-dot {
  background-color: #ef4444;
}

/* Category Filter Buttons Track */
.filter-pill-track {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  gap: 0.25rem;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-pill-track::-webkit-scrollbar {
  display: none;
}

.filter-pill-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #52525B;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.filter-pill-btn:hover {
  color: #18181B;
  background-color: rgba(0, 0, 0, 0.04);
}

.filter-pill-btn.active {
  background-color: var(--surface-dark-pill);
  color: #FFFFFF !important;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Search Box Pill */
.search-pill-box {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.35rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 240px;
  transition: all 0.2s ease;
}

.search-pill-box:focus-within {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(245, 196, 67, 0.2);
  background-color: #FFFFFF;
}

.search-pill-input {
  border: none;
  background: transparent;
  font-size: 0.82rem;
  color: var(--text-main);
  outline: none;
  width: 100%;
}

.search-pill-input::placeholder {
  color: #A1A1AA;
}

/* --------------------------------------------------------------------------
   Page 1: People / Team Directory
   -------------------------------------------------------------------------- */
.team-member-card {
  background: var(--surface-card);
  border-radius: 1.5rem;
  padding: 1.35rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 28px -8px rgba(220, 200, 160, 0.18);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  overflow: hidden;
}

.team-member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -10px rgba(220, 200, 160, 0.32);
  border-color: rgba(245, 196, 67, 0.4);
}

.team-avatar-lg {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FFFFFF;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.skill-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  background-color: #F4F3EF;
  color: #52525B;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  margin-right: 0.3rem;
  margin-bottom: 0.3rem;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Page 2: Hiring / Candidate Kanban
   -------------------------------------------------------------------------- */
.funnel-pipeline-bar {
  display: flex;
  gap: 0.4rem;
  min-height: 38px;
  border-radius: 9999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-subtle);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.funnel-pipeline-bar::-webkit-scrollbar {
  display: none;
}

.funnel-seg {
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.73rem;
  font-weight: 600;
  transition: transform 0.15s ease;
  padding: 0.25rem 0.65rem;
  white-space: nowrap;
  min-width: fit-content;
}

.funnel-seg:hover {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .funnel-pipeline-bar {
    border-radius: 1rem;
    flex-wrap: wrap;
    height: auto;
  }
}

.kanban-board-col {
  background: rgba(250, 249, 246, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 1.35rem;
  padding: 1rem;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.kanban-count-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-dark-pill);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kanban-card {
  background: #FFFFFF;
  border-radius: 1.15rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  cursor: grab;
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220, 200, 160, 0.25);
  border-color: rgba(245, 196, 67, 0.4);
}

/* --------------------------------------------------------------------------
   Page 3: Devices / IT Inventory
   -------------------------------------------------------------------------- */
.device-asset-card {
  background: #FFFFFF;
  border-radius: 1.35rem;
  padding: 1.25rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 22px -6px rgba(220, 200, 160, 0.15);
  transition: all 0.2s ease;
}

.device-asset-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(220, 200, 160, 0.28);
}

.device-thumb-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  background: #FAF9F6;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
}

.device-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Custom Table Styles */
.crextio-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.crextio-table th {
  font-size: 0.73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #71717A;
  padding: 0.6rem 1rem;
  border: none;
}

.crextio-table td {
  background: #FFFFFF;
  padding: 0.85rem 1rem;
  font-size: 0.83rem;
  vertical-align: middle;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.crextio-table tr td:first-child {
  border-left: 1px solid var(--border-subtle);
  border-top-left-radius: 1rem;
  border-bottom-left-radius: 1rem;
}

.crextio-table tr td:last-child {
  border-right: 1px solid var(--border-subtle);
  border-top-right-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

.crextio-table tr:hover td {
  background-color: #FCFBF9;
}

/* --------------------------------------------------------------------------
   Page 4: Apps / Connected Integrations
   -------------------------------------------------------------------------- */
.app-integration-card {
  background: #FFFFFF;
  border-radius: 1.5rem;
  padding: 1.4rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 24px -6px rgba(220, 200, 160, 0.16);
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.app-integration-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -8px rgba(220, 200, 160, 0.3);
  border-color: rgba(245, 196, 67, 0.4);
}

.app-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

/* Form switch toggle override */
.form-check-input:checked {
  background-color: var(--accent-yellow);
  border-color: var(--accent-yellow);
}

/* --------------------------------------------------------------------------
   Page 5: Calendar / Master Schedule Timeline
   -------------------------------------------------------------------------- */
.calendar-time-slot {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px dashed var(--border-dashed);
  min-width: 0;
}

.calendar-time-label {
  width: 72px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #71717A;
  flex-shrink: 0;
  padding-top: 4px;
}

.cal-event-pill {
  flex-grow: 1;
  border-radius: 1.15rem;
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  transition: all 0.2s ease;
  min-width: 0;
  flex-wrap: wrap;
}

.cal-event-pill.event-gold {
  background: rgba(245, 196, 67, 0.16);
  border: 1px solid rgba(245, 196, 67, 0.4);
  color: #18181B;
}

.cal-event-pill.event-dark {
  background: var(--surface-dark-pill);
  color: #FFFFFF;
}

.cal-event-pill.event-subtle {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  color: #18181B;
}

/* --------------------------------------------------------------------------
   Page 6: Reviews / Appraisal Scores & OKRs
   -------------------------------------------------------------------------- */
.review-score-hero {
  background: linear-gradient(135deg, #1C1C20 0%, #2A2A33 100%);
  border-radius: 1.5rem;
  padding: 1.75rem;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}

.star-rating {
  color: var(--accent-yellow);
  display: inline-flex;
  gap: 2px;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Page 7: Settings / Workspace Preferences
   -------------------------------------------------------------------------- */
.settings-nav-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.15rem;
  border-radius: 1rem;
  color: #52525B;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.settings-nav-pill:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #18181B;
}

.settings-nav-pill.active {
  background: var(--surface-dark-pill);
  color: #FFFFFF;
  font-weight: 600;
}

.form-control-crextio {
  border-radius: 0.9rem;
  border: 1px solid var(--border-subtle);
  background-color: #FAF9F6;
  font-size: 0.85rem;
  padding: 0.65rem 0.95rem;
  transition: all 0.2s ease;
}

.form-control-crextio:focus {
  background-color: #FFFFFF;
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(245, 196, 67, 0.2);
  outline: none;
}

/* --------------------------------------------------------------------------
   Page 8: Notifications / Alert Feed
   -------------------------------------------------------------------------- */
.notification-card-item {
  background: #FFFFFF;
  border-radius: 1.25rem;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.85rem;
  transition: all 0.2s ease;
  position: relative;
}

.notification-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220, 200, 160, 0.22);
}

.notification-card-item.is-unread {
  border-left: 4px solid var(--accent-yellow);
  background: #FFFDF8;
}

.noti-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Dark Mode Overrides (data-theme="dark")
   ========================================================================== */
[data-theme="dark"] .filter-pill-track {
  background-color: rgba(26, 26, 34, 0.85);
  border-color: #2E2E3A;
}

[data-theme="dark"] .filter-pill-btn {
  color: #A1A1AA;
}

[data-theme="dark"] .filter-pill-btn:hover {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .filter-pill-btn.active {
  background-color: #F5C443;
  color: #121216 !important;
}

[data-theme="dark"] .search-pill-box {
  background-color: #1A1A22;
  border-color: #2E2E3A;
}

[data-theme="dark"] .search-pill-input {
  color: #F4F4F7;
}

[data-theme="dark"] .team-member-card,
[data-theme="dark"] .kanban-card,
[data-theme="dark"] .device-asset-card,
[data-theme="dark"] .app-integration-card,
[data-theme="dark"] .notification-card-item {
  background-color: #1C1C24;
  border-color: #2A2A36;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .team-member-card:hover,
[data-theme="dark"] .kanban-card:hover,
[data-theme="dark"] .device-asset-card:hover,
[data-theme="dark"] .app-integration-card:hover,
[data-theme="dark"] .notification-card-item:hover {
  border-color: rgba(245, 196, 67, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .kanban-board-col {
  background-color: #16161E;
  border-color: #262632;
}

[data-theme="dark"] .skill-tag {
  background-color: #262632;
  color: #D4D4D8;
}

[data-theme="dark"] .crextio-table td {
  background-color: #1C1C24;
  border-color: #2A2A36;
  color: #D4D4D8;
}

[data-theme="dark"] .crextio-table tr:hover td {
  background-color: #242430;
}

[data-theme="dark"] .device-thumb-wrapper {
  background-color: #22222C;
  border-color: #2E2E3A;
}

[data-theme="dark"] .cal-event-pill.event-subtle {
  background: #20202A;
  border-color: #2E2E3C;
  color: #F4F4F7;
}

[data-theme="dark"] .settings-nav-pill {
  color: #A1A1AA;
}

[data-theme="dark"] .settings-nav-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

[data-theme="dark"] .settings-nav-pill.active {
  background-color: #F5C443;
  color: #121216;
}

[data-theme="dark"] .form-control-crextio {
  background-color: #1A1A22;
  border-color: #2E2E3A;
  color: #F4F4F7;
}

[data-theme="dark"] .notification-card-item.is-unread {
  background-color: #222018;
  border-left-color: #F5C443;
}

/* Status Badges in Dark Mode */
[data-theme="dark"] .badge-online {
  background-color: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

[data-theme="dark"] .badge-remote {
  background-color: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

[data-theme="dark"] .badge-leave {
  background-color: rgba(245, 196, 67, 0.22);
  color: #FDE68A;
}

[data-theme="dark"] .badge-busy {
  background-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

[data-theme="dark"] .crextio-table th {
  color: #A1A1AA;
}

[data-theme="dark"] .kanban-count-badge {
  background: #2D2D3C;
  color: #F4F4F7;
}

[data-theme="dark"] .kanban-col-header {
  border-bottom-color: #2E2E3C;
}

[data-theme="dark"] .form-check-input {
  background-color: #262634;
  border-color: #38384A;
}

[data-theme="dark"] .form-check-input:checked {
  background-color: var(--accent-yellow);
  border-color: var(--accent-yellow);
}
