/* ============================================
   ENLITE PRIME - Page-Specific Styles
   ============================================ */

/* ============================================
   AUTH PAGES (standalone)
   ============================================ */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
  padding: 24px;
}

.auth-card {
  background: var(--ep-card-bg);
  border-radius: var(--ep-radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 440px;
  padding: 40px;
}

.auth-card .auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-card .auth-logo .logo-icon {
  width: 56px;
  height: 56px;
  background: var(--ep-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 12px;
}

.auth-card .auth-logo h4 {
  color: var(--ep-text-primary);
  font-weight: 500;
  margin: 0;
}

.auth-card .auth-logo p {
  color: var(--ep-text-secondary);
  margin: 4px 0 0;
  font-size: 14px;
}

.auth-card .form-floating {
  margin-bottom: 16px;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--ep-text-secondary);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ep-divider);
}

.auth-divider span {
  padding: 0 16px;
}

.auth-social {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.auth-social .btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ============================================
   ERROR PAGES (standalone)
   ============================================ */
.error-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ep-content-bg);
  padding: 24px;
  text-align: center;
}

.error-wrapper .error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--ep-primary);
  line-height: 1;
  margin-bottom: 16px;
}

.error-wrapper .error-message {
  font-size: 24px;
  color: var(--ep-text-primary);
  margin-bottom: 8px;
}

.error-wrapper .error-desc {
  font-size: 16px;
  color: var(--ep-text-secondary);
  margin-bottom: 32px;
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-cover {
  height: 200px;
  background: linear-gradient(135deg, var(--ep-primary), var(--ep-primary-dark));
  border-radius: var(--ep-radius) var(--ep-radius) 0 0;
  position: relative;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--ep-card-bg);
  background: var(--ep-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 48px;
  font-weight: 500;
  position: absolute;
  bottom: -60px;
  left: 32px;
}

.profile-info {
  padding: 72px 32px 24px;
}

/* ============================================
   CHAT PAGE
   ============================================ */
.chat-container {
  display: flex;
  height: calc(100vh - 200px);
  min-height: 500px;
  border: 1px solid var(--ep-card-border);
  border-radius: var(--ep-radius);
  overflow: hidden;
}

.chat-sidebar {
  width: 300px;
  background: var(--ep-card-bg);
  border-right: 1px solid var(--ep-divider);
  overflow-y: auto;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--ep-content-bg);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.chat-input-area {
  padding: 16px;
  background: var(--ep-card-bg);
  border-top: 1px solid var(--ep-divider);
}

.chat-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  margin-bottom: 12px;
  font-size: 14px;
}

.chat-bubble.sent {
  background: var(--ep-primary);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-bubble.received {
  background: var(--ep-card-bg);
  color: var(--ep-text-primary);
  border: 1px solid var(--ep-card-border);
  border-bottom-left-radius: 4px;
}

.chat-contact {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--ep-divider);
  transition: background 0.2s;
}

.chat-contact:hover,
.chat-contact.active {
  background: rgba(25, 118, 210, 0.08);
}

.chat-contact .contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 500;
}

/* ============================================
   EMAIL PAGE
   ============================================ */
.email-container {
  display: flex;
  height: calc(100vh - 200px);
  min-height: 500px;
  border: 1px solid var(--ep-card-border);
  border-radius: var(--ep-radius);
  overflow: hidden;
}

.email-sidebar {
  width: 240px;
  background: var(--ep-card-bg);
  border-right: 1px solid var(--ep-divider);
  padding: 16px;
}

.email-list {
  flex: 1;
  overflow-y: auto;
  background: var(--ep-card-bg);
}

.email-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ep-divider);
  cursor: pointer;
  transition: background 0.2s;
}

.email-item:hover {
  background: rgba(25, 118, 210, 0.04);
}

.email-item.unread {
  font-weight: 500;
  background: rgba(25, 118, 210, 0.08);
}

/* ============================================
   TODO PAGE
   ============================================ */
.todo-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ep-divider);
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--ep-text-disabled);
}

.todo-item .todo-text {
  flex: 1;
  margin-left: 12px;
  font-size: 14px;
  color: var(--ep-text-primary);
}

.todo-item .todo-priority {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 12px;
}

/* ============================================
   TIMELINE PAGE
   ============================================ */
.timeline {
  position: relative;
  padding: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--ep-divider);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  margin-bottom: 32px;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-item .timeline-content {
  width: 45%;
  background: var(--ep-card-bg);
  border: 1px solid var(--ep-card-border);
  border-radius: var(--ep-radius);
  padding: 20px;
}

.timeline-item .timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--ep-card-bg);
  z-index: 1;
}

/* ============================================
   CALENDAR PAGE
   ============================================ */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--ep-divider);
  border: 1px solid var(--ep-divider);
  border-radius: var(--ep-radius);
  overflow: hidden;
}

.calendar-header-cell {
  background: var(--ep-primary);
  color: #fff;
  padding: 10px;
  text-align: center;
  font-weight: 500;
  font-size: 13px;
}

.calendar-cell {
  background: var(--ep-card-bg);
  padding: 8px;
  min-height: 80px;
  font-size: 13px;
}

.calendar-cell.today {
  background: rgba(25, 118, 210, 0.08);
}

.calendar-cell.other-month {
  opacity: 0.4;
}

.calendar-cell .day-number {
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--ep-text-primary);
}

.calendar-event {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 2px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   E-COMMERCE
   ============================================ */
.product-card {
  background: var(--ep-card-bg);
  border: 1px solid var(--ep-card-border);
  border-radius: var(--ep-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-card .product-image {
  height: 200px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ep-text-disabled);
  font-size: 48px;
}

.product-card .product-info {
  padding: 16px;
}

.product-card .product-name {
  font-weight: 500;
  font-size: 15px;
  color: var(--ep-text-primary);
  margin-bottom: 4px;
}

.product-card .product-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--ep-primary);
}

.product-card .product-old-price {
  text-decoration: line-through;
  color: var(--ep-text-secondary);
  font-size: 14px;
  margin-left: 8px;
}

/* Invoice */
.invoice-wrapper {
  background: var(--ep-card-bg);
  border: 1px solid var(--ep-card-border);
  border-radius: var(--ep-radius);
  padding: 40px;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.gallery-item {
  border-radius: var(--ep-radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.gallery-item .gallery-image {
  height: 200px;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ep-text-disabled);
  font-size: 48px;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-item .gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  padding: 16px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* ============================================
   BLOG
   ============================================ */
.blog-card {
  background: var(--ep-card-bg);
  border: 1px solid var(--ep-card-border);
  border-radius: var(--ep-radius);
  overflow: hidden;
}

.blog-card .blog-image {
  height: 180px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 48px;
}

.blog-card .blog-content {
  padding: 20px;
}

.blog-card .blog-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--ep-text-primary);
  margin-bottom: 8px;
}

.blog-card .blog-excerpt {
  font-size: 14px;
  color: var(--ep-text-secondary);
  margin-bottom: 12px;
}

.blog-card .blog-meta {
  font-size: 12px;
  color: var(--ep-text-secondary);
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-card {
  background: var(--ep-card-bg);
  border: 1px solid var(--ep-card-border);
  border-radius: var(--ep-radius);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-2px);
}

.contact-card .contact-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: 500;
}

.contact-card .contact-name {
  font-weight: 500;
  font-size: 16px;
  color: var(--ep-text-primary);
}

.contact-card .contact-role {
  font-size: 13px;
  color: var(--ep-text-secondary);
}

/* ============================================
   DATA TABLE
   ============================================ */
.data-table-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  flex-wrap: wrap;
  gap: 12px;
}

.data-table-controls .dt-search {
  position: relative;
}

.data-table-controls .dt-search input {
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--ep-divider);
  border-radius: var(--ep-radius-sm);
  font-size: 13px;
  background: var(--ep-card-bg);
  color: var(--ep-text-primary);
}

.data-table-controls .dt-search .material-icons {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--ep-text-secondary);
}

/* ============================================
   WIDGETS PAGE
   ============================================ */
.weather-widget {
  background: linear-gradient(135deg, #2196f3, #00bcd4);
  border-radius: var(--ep-radius-lg);
  padding: 24px;
  color: #fff;
}

.weather-widget .temp {
  font-size: 48px;
  font-weight: 300;
}

.weather-widget .condition {
  font-size: 16px;
  opacity: 0.9;
}

.social-widget {
  text-align: center;
  padding: 24px;
}

.social-widget .social-count {
  font-size: 28px;
  font-weight: 700;
  color: var(--ep-text-primary);
}

.social-widget .social-label {
  font-size: 13px;
  color: var(--ep-text-secondary);
}

/* ============================================
   STEPPER
   ============================================ */
.stepper {
  display: flex;
  align-items: center;
  padding: 20px 0;
}

.stepper-step {
  display: flex;
  align-items: center;
  flex: 1;
}

.stepper-step .step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ep-divider);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: var(--ep-text-secondary);
  flex-shrink: 0;
}

.stepper-step.active .step-circle {
  background: var(--ep-primary);
  color: #fff;
}

.stepper-step.completed .step-circle {
  background: var(--ep-success);
  color: #fff;
}

.stepper-step .step-label {
  margin-left: 12px;
  font-size: 13px;
  color: var(--ep-text-secondary);
}

.stepper-step.active .step-label {
  color: var(--ep-text-primary);
  font-weight: 500;
}

.stepper-step .step-line {
  flex: 1;
  height: 2px;
  background: var(--ep-divider);
  margin: 0 12px;
}

.stepper-step.completed .step-line {
  background: var(--ep-success);
}

/* ============================================
   TEXT EDITOR
   ============================================ */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  background: var(--ep-content-bg);
  border-bottom: 1px solid var(--ep-divider);
}

.toolbar-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--ep-radius-sm);
  padding: 6px 8px;
  cursor: pointer;
  color: var(--ep-text-secondary);
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.toolbar-btn:hover {
  background: rgba(25, 118, 210, 0.08);
  color: var(--ep-text-primary);
}

.toolbar-btn.active {
  background: rgba(25, 118, 210, 0.15);
  color: var(--ep-primary);
  border-color: var(--ep-primary);
}

.toolbar-btn .material-icons {
  font-size: 20px;
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background: var(--ep-divider);
  margin: 0 4px;
}

.toolbar-select {
  border: 1px solid var(--ep-divider);
  border-radius: var(--ep-radius-sm);
  padding: 4px 8px;
  font-size: 13px;
  background: var(--ep-card-bg);
  color: var(--ep-text-primary);
  cursor: pointer;
}

.toolbar-color {
  width: 28px;
  height: 28px;
  border: 1px solid var(--ep-divider);
  border-radius: var(--ep-radius-sm);
  padding: 2px;
  cursor: pointer;
  background: var(--ep-card-bg);
}

.editor-content {
  min-height: 300px;
  padding: 20px;
  outline: none;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ep-text-primary);
  background: var(--ep-card-bg);
}

.editor-content:focus {
  outline: none;
}

.editor-content blockquote {
  border-left: 4px solid var(--ep-primary);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--ep-text-secondary);
  font-style: italic;
}

.editor-footer {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--ep-content-bg);
  border-top: 1px solid var(--ep-divider);
  font-size: 12px;
  color: var(--ep-text-secondary);
}

/* ============================================
   RESPONSIVE for pages
   ============================================ */
@media (max-width: 767.98px) {
  .chat-container {
    flex-direction: column;
    height: auto;
  }

  .chat-sidebar {
    width: 100%;
    max-height: 250px;
  }

  .email-container {
    flex-direction: column;
    height: auto;
  }

  .email-sidebar {
    width: 100%;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    flex-direction: row;
    padding-left: 40px;
  }

  .timeline-item .timeline-content {
    width: 100%;
  }

  .timeline-item .timeline-dot {
    left: 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}
