.ws-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(210,220,235,0.7);
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ws-search-trigger:hover {
  background: #fff;
  color: var(--primary, #0ea5a4);
  border-color: var(--primary, #0ea5a4);
}

.ws-search-bar {
  position: relative;
  display: flex;
  align-items: center;
}
.ws-search-bar input {
  width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.875rem;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}
.ws-search-bar.active input {
  width: 260px;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  border: 2px solid var(--primary, #0ea5a4);
  border-radius: 1rem;
  background: #fff !important;
  color: #1e293b !important;
  opacity: 1;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.ws-search-bar .ws-search-icon {
  position: absolute;
  left: 0.75rem;
  z-index: 2;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s;
}
.ws-search-bar.active .ws-search-icon {
  color: var(--primary, #0ea5a4);
}
.ws-search-bar .ws-search-clear {
  position: absolute;
  right: 0.5rem;
  z-index: 2;
  display: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #e2e8f0;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  color: #64748b;
  align-items: center;
  justify-content: center;
}
.ws-search-bar.active .ws-search-clear {
  display: flex;
}

.ws-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(420px, 92vw);
  max-height: 480px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  z-index: 100;
  display: none;
}
.ws-search-dropdown.visible {
  display: block;
  animation: wsSearchSlideIn 0.2s ease-out;
}
@keyframes wsSearchSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ws-search-category {
  padding: 0.5rem 0;
}
.ws-search-category + .ws-search-category {
  border-top: 1px solid #f1f5f9;
}
.ws-search-cat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
}
.ws-search-cat-header i {
  width: 1rem;
  text-align: center;
}
.ws-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}
.ws-search-item:hover,
.ws-search-item.active {
  background: #f8fafc;
}
.ws-search-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.ws-search-item-text {
  min-width: 0;
  flex: 1;
}
.ws-search-item-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-search-item-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-search-footer {
  padding: 0.625rem 1rem;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}
.ws-search-footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary, #0ea5a4);
  text-decoration: none;
  transition: opacity 0.15s;
}
.ws-search-footer a:hover {
  opacity: 0.8;
}

.ws-search-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #94a3b8;
}
.ws-search-empty i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
  opacity: 0.5;
}

.ws-search-loading {
  padding: 1.5rem 1rem;
  text-align: center;
  color: #94a3b8;
}
.ws-search-loading i {
  animation: wsSearchSpin 1s linear infinite;
  margin-right: 0.5rem;
}
@keyframes wsSearchSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ws-search-hint {
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: #cbd5e1;
}

.ws-search-min-hint {
  padding: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #94a3b8;
}

/* Mobile search modal */
.ws-mobile-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5vh;
}
.ws-mobile-search-overlay.visible {
  display: flex;
  animation: wsSearchFadeIn 0.2s ease-out;
}
@keyframes wsSearchFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ws-mobile-search-panel {
  width: min(500px, 92vw);
  max-height: 85vh;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 25px 80px rgba(0,0,0,0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: wsSearchSlideUp 0.25s ease-out;
}
@keyframes wsSearchSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.ws-mobile-search-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}
.ws-mobile-search-header i:first-child {
  color: var(--primary, #0ea5a4);
}
.ws-mobile-search-header input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
  color: #1e293b;
}
.ws-mobile-search-header input::placeholder {
  color: #94a3b8;
}
.ws-mobile-search-close {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.875rem;
}

.ws-mobile-search-results {
  flex: 1;
  overflow-y: auto;
  max-height: 65vh;
}

/* Results page styles */
.ws-results-hero {
  background: linear-gradient(135deg, var(--primary, #0ea5a4) 0%, var(--primary-alt, #0d9488) 100%);
  color: white;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.ws-results-hero h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.ws-results-hero p {
  opacity: 0.85;
  font-size: 1rem;
}
.ws-results-search-box {
  max-width: 600px;
  margin: 1.5rem auto 0;
  position: relative;
}
.ws-results-search-box input {
  width: 100%;
  padding: 0.875rem 1.25rem 0.875rem 3rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 1rem;
  background: rgba(255,255,255,0.95);
  color: #1e293b;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.ws-results-search-box input::placeholder {
  color: #94a3b8;
}
.ws-results-search-box input:focus {
  border-color: rgba(255,255,255,0.8);
  background: #fff;
}
.ws-results-search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.7);
}

.ws-results-grid {
  max-width: 1100px;
  margin: -1.5rem auto 2rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .ws-results-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.ws-results-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s, transform 0.2s;
}
.ws-results-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.ws-results-card-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.ws-results-card-header i {
  font-size: 1rem;
}
.ws-results-card-header h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  margin: 0;
}
.ws-results-card-header .ws-results-count {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
}
.ws-results-card-body {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ws-results-card-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f8fafc;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.ws-results-card-item:last-child {
  border-bottom: none;
}
.ws-results-card-item:hover {
  background: #f8fafc;
}
.ws-results-card-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  flex-shrink: 0;
}
.ws-results-card-item-text {
  min-width: 0;
  flex: 1;
}
.ws-results-card-item-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #1e293b;
}
.ws-results-card-item-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
}
.ws-results-card-item-arrow {
  color: #cbd5e1;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Category icon color variants */
.ws-cat-students { background: #dbeafe; color: #2563eb; }
.ws-cat-teachers { background: #fce7f3; color: #db2777; }
.ws-cat-classes { background: #d1fae5; color: #059669; }
.ws-cat-subjects { background: #fef3c7; color: #d97706; }
.ws-cat-exams { background: #ede9fe; color: #7c3aed; }
.ws-cat-assignments { background: #fee2e2; color: #dc2626; }
.ws-cat-library { background: #e0f2fe; color: #0284c7; }
.ws-cat-academic_years { background: #f0fdf4; color: #16a34a; }
.ws-cat-fees { background: #fff7ed; color: #ea580c; }
.ws-cat-pages { background: #f1f5f9; color: #475569; }
.ws-cat-notices { background: #fefce8; color: #ca8a04; }

.ws-results-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: #94a3b8;
}
.ws-results-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  opacity: 0.4;
}
.ws-results-empty h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.ws-results-empty p {
  color: #94a3b8;
}

/* Results toolbar */
.ws-results-toolbar {
  max-width: 1100px;
  margin: 0 auto 1rem;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.ws-results-count-text {
  font-size: 0.8125rem;
  color: #64748b;
  font-weight: 500;
}
.ws-results-view-toggle {
  display: flex;
  gap: 0.25rem;
  background: #f1f5f9;
  border-radius: 0.5rem;
  padding: 0.125rem;
}
.ws-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.15s;
  font-size: 0.8125rem;
}
.ws-view-btn:hover {
  color: #475569;
}
.ws-view-btn.active {
  background: #fff;
  color: var(--primary, #0ea5a4);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* List view */
.ws-results-list {
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}
.ws-results-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  border-radius: 0.75rem;
}
.ws-results-list-item:first-child {
  border-top: 1px solid #f1f5f9;
}
.ws-results-list-item:hover {
  background: #f8fafc;
}
.ws-results-list-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.ws-results-list-text {
  min-width: 0;
  flex: 1;
}
.ws-results-list-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-results-list-subtitle {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.125rem;
}
.ws-results-list-category {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}
.ws-results-list-category i {
  font-size: 0.625rem;
}
.ws-results-list-arrow {
  color: #cbd5e1;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Pagination */
.ws-results-pagination {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}
.ws-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: all 0.15s;
}
.ws-page-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.ws-page-btn.active {
  background: var(--primary, #0ea5a4);
  color: #fff;
  border-color: var(--primary, #0ea5a4);
}
.ws-page-ellipsis {
  padding: 0 0.375rem;
  color: #94a3b8;
  font-size: 0.875rem;
}
