/* ==========================================================================
   VIDABRICKS HR MANAGEMENT SYSTEM - MODULE SPECIFIC STYLES
   Dashboard, Profile, Payroll Calculator, Certificates, Calendar, Vault
   ========================================================================== */

/* --------------------------------------------------------------------------
   DASHBOARD MODULE
   -------------------------------------------------------------------------- */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 1300px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

@media (max-width: 1100px) {
  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }
}

.timeline-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.timeline-feed::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 15px;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.timeline-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
  background: var(--bg-card);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.timeline-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-navy-900);
}

.timeline-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Upcoming Dates List in Dashboard */
.dates-badge-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.date-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
}

.date-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.date-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   EMPLOYEE DIRECTORY & PROFILE MODULE
   -------------------------------------------------------------------------- */
.filter-toolbar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

.search-field-wrap {
  position: relative;
  min-width: 260px;
}

.search-field-wrap input {
  padding-left: 2.4rem;
}

.search-field-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.employee-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all var(--transition-fast);
  position: relative;
}

.employee-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.emp-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.emp-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.emp-card-meta h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-navy-900);
}

.emp-card-id {
  font-size: 0.78rem;
  color: var(--brand-gold-dark);
  font-weight: 600;
  font-family: ui-monospace, monospace;
}

.emp-card-role {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.emp-details-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
}

.emp-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Detailed Employee Profile Header */
.profile-hero {
  background: linear-gradient(135deg, var(--brand-navy-900), var(--brand-navy-800));
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  color: #ffffff;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.profile-hero-pattern {
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 250px;
  height: 250px;
  border: 40px solid rgba(197, 155, 39, 0.08);
  border-radius: var(--radius-full);
  pointer-events: none;
}

.profile-hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.profile-avatar-block {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.profile-avatar-hero {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--brand-gold);
  box-shadow: var(--shadow-lg);
  display: block;
}

.profile-avatar-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.profile-avatar-wrapper:hover .avatar-upload-overlay {
  opacity: 1;
}

.avatar-upload-overlay {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  gap: 0.2rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  border: 2px solid var(--brand-gold);
  user-select: none;
}

.avatar-badge-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--brand-gold);
  color: var(--brand-navy-900);
  border: 2px solid #ffffff;
  border-radius: var(--radius-full);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.avatar-badge-btn:hover {
  transform: scale(1.12);
  background: #dfb235;
}

/* Photo Upload Dropzone in Forms/Modals */
.photo-upload-zone {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.15rem;
  background: var(--bg-subtle, #f8fafc);
  border: 2px dashed var(--border-color, #cbd5e1);
  border-radius: var(--radius-lg, 12px);
  transition: all 0.2s ease;
  cursor: pointer;
}

.photo-upload-zone:hover, .photo-upload-zone.dragover {
  border-color: var(--brand-gold, #c59b27);
  background: rgba(197, 155, 39, 0.06);
}

.photo-upload-preview {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2.5px solid var(--brand-gold);
  box-shadow: var(--shadow-sm);
  background: #ffffff;
  flex-shrink: 0;
}

.profile-hero-info h1 {
  color: #ffffff;
  font-size: 1.65rem;
  margin-bottom: 0.25rem;
}

.profile-badges-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.profile-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   DOCUMENT MANAGEMENT & GOOGLE DRIVE INTEGRATION
   -------------------------------------------------------------------------- */
.drive-banner-card {
  background: linear-gradient(135deg, #e6f4ea, #f1f8e9);
  border: 1px solid var(--drive-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.drive-banner-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.drive-icon-large {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.doc-expiry-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 900px) {
  .doc-expiry-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

.doc-expiry-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.doc-expiry-box:hover,
.doc-expiry-box.active {
  border-color: var(--brand-navy-900);
  background: var(--bg-subtle);
}

/* --------------------------------------------------------------------------
   PAYROLL CALCULATOR & SALARY BREAKDOWN
   -------------------------------------------------------------------------- */
.payroll-calculator-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-xs);
}

.calc-formula-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  text-align: center;
}

@media (max-width: 900px) {
  .calc-formula-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.calc-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.calc-block.highlight {
  background: var(--brand-gold-light);
  border-color: var(--brand-gold-border);
}

.calc-operator {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-muted);
}

.calc-block-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.calc-block-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-navy-900);
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   CERTIFICATE & NOC LIVE PREVIEW
   -------------------------------------------------------------------------- */
.certificate-preview-container {
  background: #525659;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

.official-letterhead {
  background: #ffffff;
  width: 760px;
  min-height: 1020px;
  padding: 3.5rem 4rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  color: #1a202c;
  font-family: 'Times New Roman', Times, serif;
  line-height: 1.6;
  position: relative;
}

.letterhead-header {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 1.25rem;
  margin-bottom: 2.25rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.letterhead-logo-block h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #0f172a;
}

.letterhead-logo-block p {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.letterhead-company-info {
  text-align: right;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.35;
}

.letterhead-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
}

.letterhead-title {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.letterhead-body {
  flex: 1;
  font-size: 1.05rem;
  text-align: justify;
}

.letterhead-body p {
  margin-bottom: 1.25rem;
}

.letterhead-footer {
  margin-top: 3.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  font-family: 'Inter', sans-serif;
}

.letterhead-seal-stamp {
  width: 110px;
  height: 110px;
  border: 3px double #b45309;
  border-radius: var(--radius-full);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #b45309;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  transform: rotate(-12deg);
  opacity: 0.85;
  user-select: none;
}

.letterhead-signature {
  text-align: right;
  font-size: 0.88rem;
}

.signature-line {
  width: 180px;
  border-bottom: 1px solid #1a202c;
  margin: 2.5rem 0 0.5rem auto;
}

/* --------------------------------------------------------------------------
   CALENDAR & IMPORTANT DATES MODULE
   -------------------------------------------------------------------------- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.calendar-day-header {
  background: var(--bg-subtle);
  padding: 0.85rem 0.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.calendar-cell {
  background: #ffffff;
  min-height: 110px;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.calendar-cell.other-month {
  background: #fcfdfe;
  opacity: 0.45;
}

.calendar-cell.today {
  background: #fffdf5;
}

.calendar-cell-date {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--brand-navy-900);
  margin-bottom: 0.25rem;
}

.calendar-event-pill {
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   LOGIN SCREEN
   -------------------------------------------------------------------------- */
.login-page-wrap {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #1e293b, #090d16);
  padding: 2rem;
}

.login-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  max-width: 460px;
  width: 100%;
  padding: 2.75rem 2.5rem;
}

.login-header-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
}




/* --------------------------------------------------------------------------
   CLICKABLE ATTENDANCE TOGGLE GROUP (1-CLICK DIRECT SELECTION)
   -------------------------------------------------------------------------- */
.attendance-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: #f1f5f9;
  padding: 0.2rem 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

.att-click-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #64748b;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
  user-select: none;
}

.att-click-btn:hover {
  background: #ffffff;
  color: var(--brand-navy-900);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Status Active Highlights */
.att-click-btn.active.status-present {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.att-click-btn.active.status-late {
  background: #f59e0b;
  color: #ffffff;
  border-color: #d97706;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.att-click-btn.active.status-half-day {
  background: #eab308;
  color: #713f12;
  border-color: #ca8a04;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(234, 179, 8, 0.3);
}

.att-click-btn.active.status-absent {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.att-click-btn.active.status-on-leave {
  background: #8b5cf6;
  color: #ffffff;
  border-color: #7c3aed;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.att-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

