/* ─── Dashboard Body (Top Navigation Layout) ─── */
.dashboard-body {
  background: linear-gradient(135deg, #ffffff 0%, rgba(var(--selcuk-blue-rgb), 0.15) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Header (Top bar) */
.app-header {
  height: 64px;
  background-color: var(--selcuk-blue);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  color: #ffffff;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  padding-right: 24px;
}

.brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 40px;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #ffffff;
  transition: var(--transition);
  font-family: var(--font-family);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 250px;
  justify-content: flex-end;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-item, .admin-link {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: var(--transition);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-link:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

/* Logout Safety Arrow Guide */
.logout-safety-arrow {
  position: fixed;
  top: 0;
  right: 0;
  width: 450px;
  height: 100vh;
  z-index: 10010;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  overflow: visible;
}

.logout-safety-arrow.show {
  opacity: 1;
}

.logout-arrow-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(28, 69, 139, 0.1));
}

.logout-arrow-path {
  stroke: var(--selcuk-blue);
  stroke-dasharray: 6, 4;
  stroke-width: 2;
  fill: none;
  animation: dashSlide 1s linear infinite;
}

@keyframes dashSlide {
  to { stroke-dashoffset: -20; }
}

/* Tutorial Highlight for Logout Button */
.btn-logout-icon.highlight-tutorial {
  background-color: #ffffff !important;
  color: var(--selcuk-blue) !important;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4), 0 0 20px rgba(255, 255, 255, 0.6);
  animation: pulseHighlight 2s infinite;
  transform: scale(1.1);
  z-index: 10002;
}

@keyframes pulseHighlight {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); }
  70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.user-dropdown-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info-small {
  display: flex;
  flex-direction: column;
}

.user-info-small .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-info-small .user-unit {
  font-size: 11px;
  color: var(--text-secondary);
}

.btn-logout-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-logout-icon:hover {
  background-color: #fce8e6;
  color: #d93025;
}

/* ─── Main Content ─── */
.dashboard-main {
  flex: 1;
  padding: 40px 0;
}

.main-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Welcome Hero (Boxed Version) */
.welcome-hero {
  text-align: center;
  padding: 40px;
  background-color: var(--selcuk-blue);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  color: #ffffff;
}

.welcome-hero-title {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.welcome-hero-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.dashboard-content {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: 0 1px 2px rgba(60,64,67,0.05);
}

.favorites-content {
  border-top: 4px solid #fbbc04; /* highlighting favorited content */
  background: linear-gradient(180deg, rgba(251, 188, 4, 0.05) 0%, var(--bg-color) 40px);
}



.content-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.page-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ─── Search Components ─── */
.content-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  padding: 10px 20px;
  border-radius: 40px;
  width: 100%;
  max-width: 420px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.content-search:focus-within {
  border-color: var(--selcuk-blue);
  box-shadow: 0 8px 24px rgba(28, 69, 139, 0.12);
  transform: translateY(-2px);
  background: #fff;
}

.content-search svg {
  color: #94a3b8;
  transition: color 0.3s ease;
}

.content-search:focus-within svg {
  color: var(--selcuk-blue);
}

.content-search input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.content-search input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.header-stats {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  background-color: var(--bg-surface);
  padding: 6px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

/* Services Grid */
/* ─── Service Grid & Card Redesign (Enterprise Style) ─── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

@media (max-width: 1400px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .services-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
  }
  .service-card {
    padding: 12px;
  }
  .service-icon-box {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 16px;
    border-radius: 8px;
  }
  .service-main {
    gap: 10px;
    margin-bottom: 12px;
  }
  .service-name {
    font-size: 12.5px;
  }
  .service-desc {
    font-size: 11px;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }
  .card-status-badge {
    padding: 2px 6px;
    font-size: 8px;
  }
  .service-top {
    margin-bottom: 12px;
  }
}

.service-card {
  background: linear-gradient(160deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid #eef2f6;
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(135deg, rgba(var(--selcuk-blue-rgb), 0.04) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.service-card::after {
  content: "";
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--selcuk-blue-rgb), 0.06) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: -1;
  transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), background 0.4s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(28, 69, 139, 0.08);
  border-color: rgba(var(--selcuk-blue-rgb), 0.25);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover::after {
  transform: scale(1.6);
  background: radial-gradient(circle, rgba(var(--selcuk-blue-rgb), 0.1) 0%, rgba(255, 255, 255, 0) 70%);
}

.service-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* Status Badges */
.card-status-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.sso-active {
  background-color: rgba(28, 69, 139, 0.08);
  color: var(--selcuk-blue);
}

.sso-passive {
  background-color: #f8f9fa;
  color: #6c757d;
}.service-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-fav {
  background: #fffdf0;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #d9a406;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.btn-fav:hover { background: #fff8d6; color: #fbbc04; }
.btn-fav.active { background: #fff5cc; color: #fbbc04; }

.btn-help {
  background: #f4f8ff;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #4a72b2;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.btn-help:hover {
  background: #e0ecff;
  color: var(--selcuk-blue);
}
/* Main Content Area */
.service-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
  flex: 1;
  width: 100%;
}

.service-icon-box {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background-color: var(--selcuk-blue);
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(28, 69, 139, 0.15);
}

.service-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  width: 100%;
  min-width: 0;
}

.service-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--selcuk-blue);
  line-height: 1.35;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.service-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer Area */
.service-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #f8f9fa;
}

.service-code {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 4px;
}

.service-action-msg {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--selcuk-blue);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.service-card:hover .service-action-msg {
  opacity: 1;
  transform: translateX(0);
}

.service-action-msg .action-arrow {
  transition: transform 0.3s ease;
}

.service-card:hover .service-action-msg .action-arrow {
  transform: translateX(4px);
}

/* Full Width Card Progress Bar */
.card-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: rgba(28, 69, 139, 0.1);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
  z-index: 10;
}

.card-progress-runner {
  position: absolute;
  top: 0;
  left: -50%;
  height: 100%;
  width: 40%;
  background: var(--selcuk-blue);
  border-radius: 4px;
}

.service-card:hover .card-progress-bar {
  transform: scaleY(1);
}

.service-card:hover .card-progress-runner {
  animation: slideFullWidth 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes slideFullWidth {
  0% { left: -50%; }
  100% { left: 120%; }
}

/* Service Hover Action */
.service-hover-action {
  margin-top: 12px;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.service-card:hover .service-hover-action {
  opacity: 1;
  transform: translateX(0);
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
  color: var(--text-secondary);
  font-size: 14px;
}

@media (max-width: 900px) {
  .app-header {
    height: 60px;
    padding: 0 16px;
    gap: 8px;
  }
  .header-left {
    min-width: auto;
    flex: 1;
    gap: 8px;
  }
  .brand-logo {
    height: 28px;
  }
  .brand-text {
    gap: 0;
  }
  .brand-title {
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .brand-subtitle {
    font-size: 10px;
  }
  .header-right {
    min-width: auto;
    flex: 0;
    gap: 8px;
    padding-left: 0;
  }
  .user-dropdown-wrap {
    padding-left: 8px;
    border-left: 1px solid var(--border-color);
    gap: 0;
  }
  
  .header-center { 
    display: none; /* Hide search on mobile header to save space */
  }
  
  .header-nav { display: none; }
  .user-info-small { display: none; }
  .dashboard-content { padding: 16px; }
  .welcome-hero-title { font-size: 22px; }
  
  .dashboard-main {
    padding: 20px 0;
  }
  .main-wrapper {
    gap: 16px;
  }

  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .content-search {
    max-width: 100%;
    padding: 8px 16px;
  }
}

/* ─── Mobile Bottom Navigation (Bottom Nav Bar) ─── */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  display: none; /* Hidden on desktop */
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 8px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

.bottom-nav-item:hover, .bottom-nav-item.active {
  color: var(--selcuk-blue);
}

.bottom-nav-icon {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.bottom-nav-item:active .bottom-nav-icon {
  transform: scale(0.9);
}

/* Empty dynamic favorite slot style */
.bottom-nav-item.placeholder {
  opacity: 0.45;
}

.bottom-nav-item.placeholder:hover {
  opacity: 0.8;
  color: #fbbc04;
}

@media (max-width: 900px) {
  .mobile-bottom-nav {
    display: flex;
  }
  
  body {
    padding-bottom: 74px !important; /* Make room for the floating nav bar */
  }

  /* Optimize layout for mobile app look */
  .dashboard-main {
    padding: 16px 0;
  }

  .welcome-hero {
    padding: 24px 16px;
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .welcome-hero-title {
    font-size: 20px;
  }

  .welcome-hero-subtitle {
    font-size: 13px;
  }

  .dashboard-content {
    padding: 16px;
    border-radius: 12px;
  }

  /* Make header look more compact like a mobile top bar */
  .app-header {
    height: 56px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
}

