/* --- LAYOUT PRINCIPAL --- */
.app-container {
  display: flex;
  height: 100vh;
  padding: 16px;
  gap: 16px;
  background: var(--bg-app);
}

/* --- SIDEBAR COLLAPSIBLE --- */
.sidebar {
  width: 90px;
  background: var(--bg-sidebar);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  position: relative;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  z-index: 50;
}

.sidebar:hover {
  width: 250px;
}

.logo-area {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  height: 48px;
}

.logo-area svg {
  width: 48px;
  height: 48px;
  color: white;
  flex-shrink: 0;
}

.logo-text, .nav-label, .profile-text, .logout-btn {
  opacity: 0;
  transition: opacity 0.2s ease, width 0.2s;
  white-space: nowrap;
  pointer-events: none;
}

.sidebar:hover .logo-text,
.sidebar:hover .nav-label,
.sidebar:hover .profile-text,
.sidebar:hover .logout-btn {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.1s;
}

.logo-text {
  font-size: 0.9rem;
  letter-spacing: 2px;
  font-weight: 500;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: none;
  color: var(--text-gray);
  padding: 12px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-white);
  transform: scale(1.02);
}

.nav-item.active {
  color: var(--text-white);
  font-weight: 600;
}

.nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* --- BOTTOM PROFILE --- */
.profile-box {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: 16px;
  margin-top: auto;
  white-space: nowrap;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2b36;
}

.profile-text {
  display: flex;
  flex-direction: column;
}

.profile-text .name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-white);
}

.profile-text .status {
  font-size: 0.75rem;
  color: var(--primary-green);
}

.logout-btn {
  color: var(--text-gray);
  background: transparent;
  border: none;
  cursor: pointer;
}

/* --- MAIN CONTENT AREA --- */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 20px 16px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-sidebar);
  padding: 10px 16px;
  border-radius: 12px;
  width: 300px;
  gap: 12px;
}

.search-bar input {
  background: transparent;
  border: none;
  color: var(--text-white);
  outline: none;
  flex: 1;
}

.search-bar input::placeholder {
  color: var(--text-dark);
}

.shortcut {
  font-size: 0.75rem;
  color: var(--text-dark);
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: 4px;
}

.top-icons {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text-gray);
}

.datetime {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.datetime .date { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--text-white); }
.datetime .time { margin: 0; font-size: 0.8rem; color: var(--text-gray); }

/* --- CONTENT PANEL --- */
.content-panel {
  flex: 1;
  background: var(--bg-panel);
  border-radius: 24px;
  padding: 32px;
  overflow-y: auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 1.8rem;
}

.section-header .cyan-text { color: var(--primary-cyan); }
.section-header .blue-text { color: var(--primary-blue); }

.pill-controls {
  display: flex;
  gap: 12px;
}

.pill-btn {
  background: var(--bg-card);
  color: var(--text-gray);
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
}

.pill-btn.active {
  background: var(--primary-cyan);
  color: black;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

/* --- HORARIO GRID --- */
.schedule-grid {
  display: grid;
  grid-template-columns: 60px repeat(5, 1fr);
  gap: 16px;
}

.time-col {
  display: flex;
  flex-direction: column;
  gap: 40px; /* Represents roughly an hour gap vertically */
  padding-top: 50px; /* OFFSET for headers */
  color: var(--text-dark);
  font-size: 0.8rem;
  text-align: right;
  padding-right: 16px;
}

.day-col {
  display: flex;
  flex-direction: column;
  position: relative;
}

.day-col h4 {
  color: var(--text-gray);
  text-transform: uppercase;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.class-block {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  position: absolute;
  width: 100%;
  border-left: 4px solid var(--accent-color);
}

.class-block h5 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.class-info-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-gray);
  font-size: 0.75rem;
  margin-bottom: 4px;
}
.class-info-line svg { width: 14px; height: 14px; }

/* --- LOGROS GRID --- */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.achievement-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 16px;
  border: 1px solid var(--border-color);
}

.achievement-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--icon-glow);
}

.achievement-details {
  flex: 1;
}

.achievement-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.achievement-header h4 { font-size: 0.95rem; }
.achievement-header span { font-size: 0.7rem; color: var(--text-dark); text-transform: uppercase; }

.achievement-desc {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-bottom: 16px;
  line-height: 1.4;
}

.achievement-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-hover);
  border-radius: 2px;
}

.progress-fill {
  height: 100%;
  background: white;
  border-radius: 2px;
}

/* --- LOGIN SCREEN --- */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: var(--bg-app);
}

.login-box {
  background: var(--bg-panel);
  padding: 48px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  min-width: 380px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.login-logo {
  width: 64px;
  height: 64px;
  color: white;
  margin-bottom: 8px;
}

.login-box p {
  color: var(--text-gray);
  margin-bottom: 24px;
}

.google-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  color: black;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
  width: 100%;
  justify-content: center;
}

.google-btn img {
  width: 24px;
  height: 24px;
}

.google-btn:hover {
  transform: scale(1.02);
}

.google-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* --- CAMPUS VIEW (PREMIUM ACADEMIC) --- */
.campus-view {
  display: flex;
  justify-content: center;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 10px;
}

.campus-main {
  width: 100%;
  max-width: 600px;
}

/* UPDATES BAR (CARDS INSTEAD OF CIRCLES) */
.updates-bar {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 24px;
  scrollbar-width: none;
}
.updates-bar::-webkit-scrollbar { display: none; }

.update-card {
  min-width: 110px;
  height: 160px;
  border-radius: 20px;
  background: var(--bg-card);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-position: center;
  background-size: cover;
  transition: transform 0.2s;
}

.update-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-cyan);
}

.create-update {
  justify-content: center;
  align-items: center;
  background: var(--bg-panel);
  border: 2px dashed var(--border-color);
  text-align: center;
}

.create-update:hover { border-color: var(--text-white); }

.create-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.create-update span { font-size: 0.75rem; color: var(--text-gray); }

.update-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
}

.update-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--primary-cyan);
  position: absolute;
  top: 12px; left: 12px;
  background: var(--bg-app);
  z-index: 2;
}

.update-name {
  position: relative;
  z-index: 2;
  font-size: 0.75rem;
  color: white;
  font-weight: 600;
}

/* PREMIUM POSTS */
.feed-post {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

.premium-card {
  background: var(--bg-card);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  padding: 24px;
  margin-bottom: 32px;
}

.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-panel);
  margin-right: 16px;
}

.post-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-author {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-white);
}

.badge {
  font-size: 0.7rem;
  background: rgba(0, 240, 255, 0.1);
  color: var(--primary-cyan);
  padding: 2px 8px;
  border-radius: 12px;
  margin-right: 6px;
}

.post-time {
  color: var(--text-dark);
  font-size: 0.85rem;
}

.post-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #d1d5db;
  margin-bottom: 20px;
}

.post-image-premium {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--bg-panel);
}

.post-image-premium img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
  display: block;
}

.post-actions-pills {
  display: flex;
  gap: 12px;
}

.pill-action {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 8px 16px;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.2s;
}

.pill-action:hover {
  background: var(--bg-hover);
  color: var(--text-white);
  border-color: var(--text-dark);
}

.zap-btn:hover { color: var(--primary-yellow); border-color: var(--primary-yellow); }
.save-btn:hover { color: var(--primary-cyan); border-color: var(--primary-cyan); }


/* NETWORK WIDGET */
.campus-sidebar {
  width: 320px;
  display: none;
}
@media (min-width: 1000px) { .campus-sidebar { display: block; } }

.widget-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.widget-header h3 { font-size: 1.1rem; }
.widget-desc { font-size: 0.85rem; color: var(--text-gray); margin-bottom: 20px; }

.network-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.network-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  transition: 0.2s;
}
.network-item:hover { background: var(--bg-hover); }

.network-item img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-app);
}

.net-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.net-name { font-weight: 600; font-size: 0.85rem; color: var(--text-white); }
.net-reason { font-size: 0.75rem; color: var(--text-gray); }

.net-add {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-white);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.net-add:hover { background: var(--primary-cyan); color: black; border-color: var(--primary-cyan); }

.net-view-all {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px dashed var(--border-color);
  color: var(--text-white);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}
.net-view-all:hover {
  background: rgba(255,255,255,0.05);
}

/* --- MI CARRERA VIEW --- */
.career-view {
  max-width: 900px;
  margin: 0 auto;
}

.career-dashboard {
  margin-top: 24px;
}

.progress-card {
  padding: 32px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.progress-details h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.uni-name {
  color: var(--text-gray);
  font-size: 0.95rem;
}

.progress-badge {
  background: rgba(0, 240, 255, 0.1);
  color: var(--primary-cyan);
  padding: 8px 16px;
  font-size: 0.95rem;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.progress-bar-container {
  height: 16px;
  background: var(--bg-app);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-purple), var(--primary-cyan));
  border-radius: 8px;
  transition: width 1s ease-out;
}

.progress-text {
  font-size: 1.1rem;
  color: var(--text-gray);
}

.progress-text strong {
  color: var(--text-white);
  font-weight: 700;
}
