/* ============================================================
   IBGPP SYS - HR Management System
   Design System & Styling
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --orange: #E85D10;
  --orange-dark: #C24A08;
  --orange-light: #FF7A35;
  --orange-pale: #FFF0E8;
  --blue-dark: #1A3C5E;
  --blue-mid: #2D6A9F;
  --blue-light: #2D9CDB;
  --green: #27AE60;
  --red: #EB5757;
  --dark: #111827;
  --white: #FFFFFF;
  
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-600: #4B5563;
  --gray-800: #1F2937;
  --gray-900: #111827;

  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-orange: 0 8px 24px rgba(232, 93, 16, 0.2);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  background-color: #F0F2F5;
  line-height: 1.5;
  height: 100%;
  overflow: hidden;
}

/* === APP CONTAINER === */
#app {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* === LOGIN PAGE === */
.login-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  background-color: var(--blue-dark);
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
}

.login-bg-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.login-circle-1 {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,93,16,0.15) 0%, rgba(26,60,94,0) 70%);
}

.login-circle-2 {
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45,156,219,0.1) 0%, rgba(26,60,94,0) 70%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(26, 60, 94, 0.95);
  backdrop-filter: blur(15px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(0);
  transition: var(--transition);
  color: var(--white);
}

.login-card .form-group label {
  color: rgba(255, 255, 255, 0.85);
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.login-logo img {
  height: 64px;
  width: auto;
  filter: brightness(0) invert(1);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  font-family: var(--font-title);
  color: var(--white);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--gray-300);
  font-size: 0.875rem;
}

/* === FORMS & INPUTS === */
.form-group {
  margin-bottom: 1.25rem;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.925rem;
  color: var(--gray-900);
  background-color: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232, 93, 16, 0.15);
}

.form-control::placeholder {
  color: var(--gray-400);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.btn-primary {
  background-color: var(--orange);
  color: var(--white);
  box-shadow: var(--shadow-orange);
}

.btn-primary:hover {
  background-color: var(--orange-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--gray-200);
  color: var(--gray-800);
}

.btn-secondary:hover {
  background-color: var(--gray-300);
}

.btn-danger {
  background-color: var(--red);
  color: var(--white);
}

.btn-danger:hover {
  background-color: #d32f2f;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* === DASHBOARD LAYOUT === */
.sidebar {
  width: 260px;
  background-color: var(--blue-dark);
  color: var(--white);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

.sidebar-brand {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.sidebar-brand img {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
}

.sidebar-brand span {
  display: none;
}

.sidebar-menu {
  list-style: none;
  padding: 1.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
}

.sidebar-menu-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.sidebar-menu-item a:hover {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-menu-item.active a {
  color: var(--white);
  background-color: var(--orange);
  box-shadow: var(--shadow-orange);
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background-color: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--white);
}

.user-info {
  overflow: hidden;
}

.user-info .user-name {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-info .user-role {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  background: none;
  border: none;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: var(--transition);
  text-align: left;
}

.btn-logout:hover {
  color: var(--red);
}

.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.top-nav {
  height: 70px;
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  flex-shrink: 0;
}

.top-nav h2 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--blue-dark);
  font-weight: 700;
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.system-date {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* === VIEW CONTROLLER === */
.content-body {
  flex-grow: 1;
  padding: 2rem;
  overflow-y: auto;
  background-color: #F3F4F6;
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view-section.active {
  display: block;
}

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

/* === DASHBOARD VIEW === */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--blue-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

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

.metric-card.primary {
  border-left-color: var(--orange);
}

.metric-card.success {
  border-left-color: var(--green);
}

.metric-card-info h3 {
  font-size: 0.825rem;
  text-transform: uppercase;
  color: var(--gray-600);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.metric-card-info .value {
  font-size: 2rem;
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--gray-900);
}

.metric-card-icon {
  width: 48px;
  height: 48px;
  background-color: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-dark);
}

.metric-card.primary .metric-card-icon {
  color: var(--orange);
  background-color: var(--orange-pale);
}

.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.chart-card {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.chart-card h3 {
  font-family: var(--font-title);
  font-size: 1.125rem;
  color: var(--blue-dark);
  font-weight: 600;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 0.75rem;
}

.chart-container {
  position: relative;
  flex-grow: 1;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-placeholder {
  text-align: center;
  color: var(--gray-400);
  font-size: 0.875rem;
}

/* Custom visual chart stats list */
.custom-progress-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.progress-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 500;
}

.progress-bar-bg {
  height: 8px;
  background-color: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--blue-mid);
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.progress-bar-fill.orange {
  background-color: var(--orange);
}

.progress-bar-fill.green {
  background-color: var(--green);
}

.dashboard-list-card {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.dashboard-list-card h3 {
  font-family: var(--font-title);
  font-size: 1.125rem;
  color: var(--blue-dark);
  font-weight: 600;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 0.75rem;
}

/* === LIST VIEW === */
.search-filter-bar {
  background-color: var(--white);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.search-input-group {
  flex-grow: 2;
  min-width: 250px;
}

.filter-input-group {
  flex-grow: 1;
  min-width: 150px;
}

.table-container {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
}

.custom-table th {
  background-color: var(--gray-50);
  color: var(--gray-600);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.custom-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-800);
}

.custom-table tbody tr {
  transition: var(--transition);
}

.custom-table tbody tr:hover {
  background-color: var(--gray-50);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success {
  background-color: #E2F7ED;
  color: var(--green);
}

.badge-danger {
  background-color: #FDE8E8;
  color: var(--red);
}

.badge-info {
  background-color: #E6F3FB;
  color: var(--blue-light);
}

.actions-cell {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gray-100);
  color: var(--gray-800);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background-color: var(--gray-200);
}

.btn-icon.edit:hover {
  background-color: var(--orange-pale);
  color: var(--orange);
}

.btn-icon.view:hover {
  background-color: #E6F3FB;
  color: var(--blue-mid);
}

/* === WIZARD FORM VIEW === */
.wizard-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--gray-100);
  padding-bottom: 1.5rem;
  gap: 1rem;
  overflow-x: auto;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-400);
  white-space: nowrap;
  position: relative;
  cursor: pointer;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.825rem;
  font-weight: 600;
  transition: var(--transition);
}

.wizard-step.active {
  color: var(--blue-dark);
}

.wizard-step.active .step-num {
  border-color: var(--orange);
  background-color: var(--orange);
  color: var(--white);
}

.wizard-step.completed {
  color: var(--green);
}

.wizard-step.completed .step-num {
  border-color: var(--green);
  background-color: var(--green);
  color: var(--white);
}

.wizard-pane {
  display: none;
}

.wizard-pane.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.form-section-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--blue-dark);
  font-weight: 600;
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed var(--gray-200);
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section-title span {
  font-size: 1rem;
  color: var(--orange);
}

.wizard-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  border-top: 1px solid var(--gray-200);
  padding-top: 1.5rem;
}

/* === DETAIL VIEW / MODAL === */
.detail-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 2.5rem;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.profile-title-area {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.profile-avatar-lg {
  width: 80px;
  height: 80px;
  background-color: var(--blue-dark);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 700;
  border: 4px solid var(--orange-pale);
}

.profile-name-role h1 {
  font-family: var(--font-title);
  font-size: 1.75rem;
  color: var(--blue-dark);
  font-weight: 700;
}

.profile-name-role p {
  color: var(--gray-600);
  font-size: 1rem;
  font-weight: 500;
}

.detail-actions-top {
  display: flex;
  gap: 0.75rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.detail-section {
  background-color: var(--gray-50);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

.detail-section h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--blue-dark);
  margin-bottom: 1rem;
  border-bottom: 1px dashed var(--gray-300);
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-section h3 svg {
  color: var(--orange);
}

.detail-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-info-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.detail-info-item .label {
  font-weight: 600;
  color: var(--gray-600);
}

.detail-info-item .value {
  color: var(--gray-900);
  text-align: right;
  max-width: 60%;
  word-wrap: break-word;
}

/* File display styling */
.uploaded-docs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-item-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.doc-name {
  font-weight: 500;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.doc-actions a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
}

.doc-actions a:hover {
  color: var(--orange-dark);
}

/* File input custom styles */
.file-upload-box {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  background-color: var(--gray-50);
  transition: var(--transition);
  margin-bottom: 1rem;
  position: relative;
}

.file-upload-box:hover {
  border-color: var(--orange);
  background-color: var(--orange-pale);
}

.file-upload-box input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-icon {
  font-size: 2rem;
  color: var(--gray-400);
  margin-bottom: 0.5rem;
}

.file-upload-box p {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.file-upload-box .file-info-label {
  font-weight: 600;
  color: var(--blue-dark);
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

/* === MODAL DIALOGS === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  padding: 2rem;
  animation: modalScale 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalScale {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--blue-dark);
  font-weight: 700;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
  padding-top: 1rem;
}

/* === TOAST ALERTS === */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background-color: var(--white);
  color: var(--gray-800);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border-left: 5px solid var(--blue-dark);
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 280px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--orange); }

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--orange);
  animation: spin 1s linear infinite;
  display: inline-block;
}

.spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

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

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem;
  color: var(--gray-600);
}

/* === OUTLOOK STYLE EMAIL CLIENT === */
.email-client-container {
  display: flex;
  height: calc(100vh - 160px);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.email-sidebar {
  width: 240px;
  background-color: var(--gray-50);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
}

.email-sidebar-btn {
  margin: 0 1.25rem 1.5rem 1.25rem;
}

.email-folder-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.email-folder-item {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
}

.email-folder-item:hover, .email-folder-item.active {
  background-color: rgba(26, 60, 94, 0.05);
  color: var(--blue-dark);
  border-left: 3px solid var(--blue-mid);
}

.email-accounts-section {
  margin-top: 2rem;
  padding: 0 1.5rem;
  flex-grow: 1;
  overflow-y: auto;
}

.email-accounts-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
  letter-spacing: 0.08em;
}

.email-account-badge-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--gray-700);
  padding: 0.5rem 0;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.email-account-badge-item:hover {
  color: var(--blue-dark);
}

.email-account-badge-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.email-account-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.email-unread-badge {
  background: var(--blue-mid);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* Middle Column: Email List */
.email-list-pane {
  width: 350px;
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.email-list-search {
  padding: 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  background-color: var(--gray-50);
}

.email-list-scroll {
  flex-grow: 1;
  overflow-y: auto;
}

.email-item-card {
  padding: 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-left: 3px solid transparent;
}

.email-item-card:hover {
  background-color: var(--gray-50);
}

.email-item-card.active {
  background-color: rgba(45, 156, 219, 0.04);
  border-left-color: var(--blue-mid);
}

.email-item-card.unread {
  background-color: rgba(45, 156, 219, 0.01);
}

.email-item-card.unread .email-item-sender,
.email-item-card.unread .email-item-subject {
  font-weight: 700;
  color: var(--black);
}

.email-item-card.unread .email-item-sender::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--blue-mid);
  border-radius: 50%;
  margin-right: 6px;
}

.email-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.email-item-sender {
  font-size: 0.875rem;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.email-item-date {
  color: var(--gray-400);
  font-size: 0.75rem;
  white-space: nowrap;
}

.email-item-subject {
  font-size: 0.875rem;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-item-preview {
  font-size: 0.8rem;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-item-company-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.65rem;
  color: var(--white);
  font-weight: 700;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Right Column: Email Reader */
.email-reader-pane {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.email-reader-empty {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-300);
  gap: 1.25rem;
  background-color: var(--gray-50);
}

.email-reader-empty i {
  font-size: 4rem;
  color: var(--gray-200);
}

.email-reader-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--gray-200);
  background-color: var(--white);
}

.email-reader-subject {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
}

.email-reader-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 0.875rem;
}

.email-reader-sender-to {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.email-reader-sender-to strong {
  color: var(--gray-800);
}

.email-reader-sender-to span {
  color: var(--gray-400);
  font-size: 0.8rem;
}

.email-reader-date {
  color: var(--gray-400);
  font-size: 0.8rem;
}

.email-reader-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background-color: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.email-reader-actions {
  display: flex;
  gap: 0.5rem;
}

.email-reader-body-container {
  padding: 2rem;
  overflow-y: auto;
  flex-grow: 1;
  background-color: var(--white);
}

.email-reader-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--gray-800);
}

/* Email Compose Overlay / Modal */
.email-compose-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.email-compose-overlay.active {
  display: flex;
}
#email-reader-content {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.email-account-badge-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--gray-700);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
  cursor: pointer;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.email-account-badge-item:hover, .email-account-badge-item.active {
  background-color: rgba(26, 60, 94, 0.05);
  color: var(--blue-dark);
}
