/* GITAM Original Theme */
:root {
  --primary: #007467; /* Official GITAM Green */
  --primary-dark: #005a4f;
  --accent: #FFD700; /* Gold */
  --bg-page: #f4f6f8; /* Light Gray Background */
  --bg-white: #ffffff;
  --text-main: #333333;
  --text-muted: #666666;
  --success: #2e7d32;
  --danger: #c62828;
  --card-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Centered Search View */
#searchView {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.search-box {
  max-width: 450px;
  width: 100%;
  background: white;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-top: 4px solid var(--primary);
}

.brand {
  margin-bottom: 3rem;
  color: var(--text-inverse);
}

.logo-icon {
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 12px;
  margin: 0 auto 1.5rem;
}

.logo-icon svg {
  color: white;
  width: 100%;
  height: 100%;
}

.brand h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.brand p {
  opacity: 0.8;
  font-size: 1rem;
}

.minimal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.minimal-form input {
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  background: white;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  color: var(--text-main);
}

.minimal-form input:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

.minimal-form button {
  padding: 1rem;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.minimal-form button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Prominent GPA Cards */
.gpa-container {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.gpa-card {
  background: var(--primary);
  color: white;
  padding: 1.5rem 3rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  flex: 1;
  max-width: 300px;
  border: 2px solid var(--accent);
}

.gpa-label {
  display: block;
  font-size: 1rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-weight: 700;
}

.gpa-value {
  font-size: 2.5rem;
  font-weight: 800;
  display: block;
}

.minimal-footer {
  margin-top: 4rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
}

/* Hidden Utility */
.hidden {
  display: none !important;
}

/* Main App View */
#mainView {
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.student-summary {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.3);
  object-fit: cover;
  background: white;
}

.header-text h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.header-text p {
  opacity: 0.9;
  font-family: monospace;
  font-size: 1.1rem;
}

.outline-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.5);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.outline-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
}

/* Tabs & Content */
.content-wrapper {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 2rem;
  flex: 1;
  width: 100%;
}

/* GITAM Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.tab-btn.active {
  background: transparent;
  border-bottom: 3px solid var(--primary);
  color: var(--primary);
}

.tab-btn:hover:not(.active) {
  background: rgba(0,0,0,0.02);
  color: var(--primary);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Info Grid */
.user-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.info-group {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.info-group h3 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.detail-row .label {
  color: var(--text-light);
  font-weight: 500;
}

.detail-row .value {
  color: var(--text-main);
  font-weight: 600;
  text-align: right;
}

/* Results Controls */
.results-controls {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.control-group {
  flex: 1;
}

.control-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-light);
}

.select-wrapper select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text-main);
  background: white;
}

.primary-btn {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.primary-btn:hover {
  background: var(--primary-light);
}

/* Enterprise Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 0 0 1px #e0e0e0;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  min-width: 600px; /* Ensure readability */
}

.results-table th {
  background: var(--primary);
  color: white;
  font-weight: 600;
  padding: 1rem;
  text-align: left;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--primary-dark);
}

.results-table td {
  padding: 1rem;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
  color: var(--text-main);
}

.results-table tr:last-child td {
  border-bottom: none;
}

.results-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.results-table tr:hover {
  background-color: rgba(0, 116, 103, 0.05); /* Light Primary Tint */
}

.message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 500;
}
.message.error { background: #ffebee; color: var(--error); }
.message.success { background: #e8f5e9; color: var(--success); }

/* User Details Grid Improvement */
.user-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.info-group {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-top: 4px solid var(--primary);
  transition: transform 0.2s;
}

.info-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.info-group h3 {
  color: var(--primary);
  border-bottom: 2px solid #eee;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  border-bottom: 1px dashed #eee;
  padding-bottom: 0.5rem;
}

.detail-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.detail-row .label {
  color: var(--text-muted);
  font-weight: 500;
}

.detail-row .value {
  color: var(--text-main);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

/* GITAM Logo */
.logo-img {
  max-height: 80px;
  margin-bottom: 1rem;
}
.app-header .logo-img {
  max-height: 50px;
  margin-bottom: 0;
  margin-right: 1rem;
  background: white;
  padding: 5px;
  border-radius: 4px;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  max-width: 120px;
  margin-bottom: 1.5rem;
  animation: pulse 1.5s infinite ease-in-out;
}

.loader-content p {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}
