/* Scholarship Coach Styles - Following Kitmodo Design System */

:root {
  --bg: #0b0d10;
  --card: #141820;
  --muted: #8fa3b8;
  --text: #e7eef6;
  --accent: #6aa3ff;
  --accent-2: #7bd389;
  --warn: #f7c948;
  --danger: #ff6b6b;
  --ok: #59d185;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
  --input-bg: #0f131a;
  --border: #222b36;
}

:root[data-theme="light"] {
  --bg: #f5f7fa;
  --card: #ffffff;
  --muted: #5a6b7f;
  --text: #1a1d23;
  --accent: #2b7de9;
  --accent-2: #2a9d5f;
  --warn: #8b6914;
  --danger: #d32f2f;
  --ok: #2e7d32;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --input-bg: #f8f9fb;
  --border: #d1d9e3;
}

html, body { 
  height: 100%; 
}

body {
  margin: 0; 
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial;
  background: var(--bg);
  color: var(--text);
  transition: background .3s, color .3s;
}

.wrap { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 24px; 
}

header { 
  display: grid; 
  gap: 8px; 
  margin: 12px 0 24px; 
}

h1 { 
  font-size: clamp(1.6rem, 2.6vw, 2.2rem); 
  margin: 0; 
  letter-spacing: .2px; 
}

h2 {
  font-size: 1.2rem;
  margin: 4px 0 16px;
  letter-spacing: .3px;
}

h3 {
  font-size: 1.05rem;
  margin: 12px 0 8px;
}

h4 {
  font-size: 1rem;
  margin: 8px 0 6px;
}

p.sub { 
  color: var(--muted); 
  margin: 0; 
}

.card { 
  background: var(--card); 
  border-radius: var(--radius); 
  box-shadow: var(--shadow); 
  padding: 20px; 
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.badge { 
  display: inline-block; 
  padding: 4px 10px; 
  border-radius: 999px; 
  background: #112134; 
  border: 1px solid #2a3b52; 
  color: var(--muted); 
  font-size: .82rem; 
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.info-item {
  text-align: center;
  padding: 16px;
  background: var(--input-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.info-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

/* Notice Card */
.notice-card {
  background: linear-gradient(135deg, rgba(106, 163, 255, 0.1), rgba(123, 211, 137, 0.1));
  border: 1px solid var(--accent);
}

.notice-card ul {
  margin: 12px 0;
  padding-left: 24px;
}

.notice-card li {
  margin: 6px 0;
}

/* Buttons */
.btn-primary, .btn-secondary {
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  transition: all .2s;
  font-weight: 500;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: #5a93e8;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
  min-width: 200px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-icon {
  margin-right: 6px;
}

.action-buttons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.action-buttons button {
  flex: 1;
  min-width: 150px;
}

/* Form Elements */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 500;
}

.form-control {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 1rem;
}

.form-control:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

textarea.form-control {
  resize: vertical;
  font-family: inherit;
}

.form-hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.export-reminder {
  background: var(--warn);
  color: #000;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-reminder {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  color: #000;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 20px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  transition: all .2s;
}

.tab-btn:hover {
  background: var(--border);
}

.tab-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Filters */
.filters-section details {
  margin-top: 12px;
}

.filters-section summary {
  cursor: pointer;
  padding: 8px;
  background: var(--input-bg);
  border-radius: 8px;
  margin-bottom: 12px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

/* Scholarship List */
.scholarship-list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.scholarship-card {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: all .2s;
}

.scholarship-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.scholarship-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
  gap: 12px;
}

.scholarship-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.scholarship-amount {
  color: var(--accent-2);
  font-weight: 600;
  white-space: nowrap;
}

.scholarship-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.scholarship-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.scholarship-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.tag {
  background: rgba(106, 163, 255, 0.2);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid var(--accent);
}

.tag.effort-low {
  background: rgba(89, 209, 133, 0.2);
  color: var(--ok);
  border-color: var(--ok);
}

.tag.effort-medium {
  background: rgba(247, 201, 72, 0.2);
  color: var(--warn);
  border-color: var(--warn);
}

.tag.effort-high {
  background: rgba(255, 107, 107, 0.2);
  color: var(--danger);
  border-color: var(--danger);
}

.scholarship-eligibility {
  margin: 12px 0;
}

.scholarship-eligibility ul {
  margin: 6px 0;
  padding-left: 24px;
}

.scholarship-eligibility li {
  margin: 4px 0;
  color: var(--muted);
}

.scholarship-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.fit-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.fit-high {
  background: rgba(89, 209, 133, 0.2);
  color: var(--ok);
}

.fit-medium {
  background: rgba(247, 201, 72, 0.2);
  color: var(--warn);
}

.fit-low {
  background: rgba(106, 163, 255, 0.2);
  color: var(--accent);
}

/* Saved Scholarships */
.saved-stats {
  background: var(--input-bg);
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.saved-filters {
  margin-bottom: 16px;
}

.saved-list {
  display: grid;
  gap: 12px;
}

.saved-item {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.saved-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
  gap: 12px;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-not_started {
  background: rgba(138, 138, 138, 0.2);
  color: var(--muted);
}

.status-in_progress {
  background: rgba(247, 201, 72, 0.2);
  color: var(--warn);
}

.status-submitted {
  background: rgba(89, 209, 133, 0.2);
  color: var(--ok);
}

.saved-details {
  margin: 12px 0;
}

.tasks-checklist {
  margin: 12px 0;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}

.tasks-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  cursor: pointer;
}

.notes-section {
  margin: 12px 0;
}

.notes-section textarea {
  width: 100%;
  margin-top: 8px;
}

/* Toolkit */
.toolkit-nav {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.toolkit-btn {
  padding: 10px 18px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all .2s;
}

.toolkit-btn:hover {
  background: var(--border);
}

.toolkit-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.tool-content {
  display: none;
}

.tool-content.active {
  display: block;
}

.resume-section, .essay-section {
  margin: 16px 0;
}

/* Email Templates */
.template-list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.template-item {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.template-content {
  margin: 12px 0;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.template-content p {
  margin: 8px 0;
}

/* Interview Prep */
.interview-questions {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.question-item {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--card);
  border-radius: var(--radius);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all .2s;
}

.modal-close:hover {
  background: var(--input-bg);
  color: var(--text);
}

.modal-body {
  padding: 20px;
}

/* Notice */
.notice {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
}

/* Search Stats */
.search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.search-stats {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* Footer */
footer {
  margin: 28px 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--accent-2);
  text-decoration: none;
  text-underline-offset: 3px;
}

footer a:hover {
  text-decoration: underline;
}

.disclaimer {
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .wrap {
    padding: 16px;
  }
  
  .tab-nav {
    flex-direction: column;
  }
  
  .tab-btn {
    width: 100%;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons button {
    width: 100%;
  }
  
  .scholarship-header {
    flex-direction: column;
  }
  
  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
