@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}

body {
  background: #f0f4f8;
  min-height: 100vh;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f0f4f8; }
::-webkit-scrollbar-thumb { background: #b0bec5; border-radius: 4px; }

/* ── Header ── */
.site-header {
  background: linear-gradient(135deg, #1a237e 0%, #283593 40%, #1565c0 100%);
  box-shadow: 0 4px 24px rgba(21, 101, 192, 0.35);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.search-wrap {
  flex: 1;
  max-width: 380px;
  position: relative;
}

.search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 9px 16px 9px 36px;
  font-size: 13px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  color: #fff;
  outline: none;
  transition: all 0.2s;
}

.search-wrap input::placeholder { color: rgba(255,255,255,0.55); }

.search-wrap input:focus {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.user-info {
  text-align: right;
}

.user-info .name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.user-info .role {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #42a5f5, #7e57c2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.logout-btn {
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.2s;
}

.logout-btn:hover { color: #ef9a9a; }

/* ── Main Content ── */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 28px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a237e;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 13px;
  color: #78909c;
  margin-bottom: 32px;
}

/* ── Section ── */
.section-group {
  margin-bottom: 36px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #546e7a;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e7ef;
}

.section-label i {
  font-size: 12px;
  color: #1565c0;
}

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 16px;
}

/* ── Menu Card ── */
.menu-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.menu-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0) 60%, rgba(200,220,255,0.18) 100%);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.menu-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(21, 101, 192, 0.14);
}

.menu-card:hover::before {
  opacity: 1;
}

.menu-card:active {
  transform: translateY(-2px);
}

/* ── Card Icon ── */
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  flex-shrink: 0;
}

.menu-card:hover .card-icon {
  transform: scale(1.1) rotate(-4deg);
}

/* Icon color variants */
.icon-blue    { background: linear-gradient(135deg, #e3f0ff, #bbdefb); color: #1565c0; }
.icon-emerald { background: linear-gradient(135deg, #e8f8f0, #c8e6c9); color: #2e7d32; }
.icon-indigo  { background: linear-gradient(135deg, #ede7f6, #d1c4e9); color: #4527a0; }
.icon-orange  { background: linear-gradient(135deg, #fff3e0, #ffe0b2); color: #e65100; }
.icon-red     { background: linear-gradient(135deg, #fce4ec, #ffcdd2); color: #c62828; }
.icon-teal    { background: linear-gradient(135deg, #e0f7f4, #b2dfdb); color: #00695c; }
.icon-yellow  { background: linear-gradient(135deg, #fffde7, #fff9c4); color: #f57f17; }
.icon-purple  { background: linear-gradient(135deg, #f3e5f5, #e1bee7); color: #6a1b9a; }
.icon-cyan    { background: linear-gradient(135deg, #e0f7fa, #b2ebf2); color: #00838f; }
.icon-slate   { background: linear-gradient(135deg, #eceff1, #cfd8dc); color: #37474f; }
.icon-green   { background: linear-gradient(135deg, #f1f8e9, #dcedc8); color: #33691e; }
.icon-amber   { background: linear-gradient(135deg, #fff8e1, #ffecb3); color: #ff6f00; }
.icon-pink    { background: linear-gradient(135deg, #fce4ec, #f8bbd0); color: #ad1457; }

/* ── Card Label ── */
.card-label {
  font-size: 12px;
  font-weight: 600;
  color: #37474f;
  text-align: center;
  line-height: 1.4;
}

/* ── No Results ── */
.no-results {
  display: none;
  text-align: center;
  padding: 60px 20px;
  color: #90a4ae;
  font-size: 14px;
}

.no-results i {
  font-size: 36px;
  display: block;
  margin-bottom: 12px;
  color: #b0bec5;
}

/* ── Card Dropdown ── */
.card-dropdown-wrap {
  position: relative;
}

.menu-card.has-dropdown {
  cursor: pointer;
}

.dropdown-caret {
  font-size: 9px;
  color: #90a4ae;
  margin-top: -4px;
  transition: transform 0.2s ease;
}

.card-dropdown-wrap:hover .dropdown-caret {
  transform: rotate(180deg);
  color: #1565c0;
}

.card-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 250px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  padding-top: 10px;
}

.card-dropdown-wrap:hover .card-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.card-dropdown-inner {
  background: #fff;
  border: 1px solid #e0e7ef;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(21, 101, 192, 0.16);
  overflow: hidden;
  position: relative;
}

.card-dropdown-inner::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid #e0e7ef;
  border-top: 1px solid #e0e7ef;
}

.card-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #37474f;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border-bottom: 1px solid #f0f4f8;
}

.card-dropdown-item:last-child {
  border-bottom: none;
}

.card-dropdown-item i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e3f0ff, #bbdefb);
  color: #1565c0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.card-dropdown-item:hover {
  background: #f0f7ff;
  color: #1565c0;
}

.card-dropdown-item:hover i {
  background: linear-gradient(135deg, #1565c0, #283593);
  color: #fff;
}

/* ── Ripple animation ── */
@keyframes ripple {
  to { transform: scale(2.8); opacity: 0; }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .header-inner { padding: 0 16px; }
  .user-info { display: none; }
  .main-content { padding: 20px 16px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
  .card-icon { width: 46px; height: 46px; font-size: 18px; }
}
