@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --bg-hover: #202020;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --border-color: #2a2a2a;
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --sidebar-width: 260px;
  --header-height: 64px;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.header-center {
  flex: 1;
  max-width: 600px;
  margin: 0 24px;
}

.search-bar {
  position: relative;
  width: 100%;
}

.search-bar svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-bar input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-secondary);
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-menu:hover {
  background: var(--bg-hover);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Layout */
.layout {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 24px 0;
  overflow-y: auto;
  position: fixed;
  left: 0;
  top: var(--header-height);
  bottom: 0;
  z-index: 90;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  padding: 0 24px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--bg-hover);
  color: var(--accent-primary);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-primary);
}

.nav-item svg {
  flex-shrink: 0;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  max-width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.view-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.text-muted {
  color: var(--text-muted);
  font-size: 14px;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

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

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

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

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
}

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

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 24px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-change {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-change.positive {
  color: var(--success);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.activity-item:hover {
  background: var(--bg-hover);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.activity-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.activity-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* Table */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: var(--bg-tertiary);
}

.table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-primary);
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background: var(--bg-tertiary);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Badges */
.badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.badge-info {
  background: rgba(6, 182, 212, 0.1);
  color: var(--info);
}

.badge-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* Filters Bar */
.filters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.select,
.input {
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.select:focus,
.input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.select-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* Applications Grid */
.applications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.application-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.application-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.user-info {
  display: flex;
  gap: 12px;
}

.user-info h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.application-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.info-row .label {
  color: var(--text-secondary);
}

.info-row .value {
  color: var(--text-primary);
  font-weight: 500;
}

.application-footer {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* Convocatoria Grid */
.convocatoria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.convocatoria-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

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

.convocatoria-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.convocatoria-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.convocatoria-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 0;
}

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 32px;
  bottom: -24px;
  width: 2px;
  background: var(--border-color);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  flex-shrink: 0;
  z-index: 1;
}

.timeline-item.completed .timeline-marker {
  background: var(--success);
  border-color: var(--success);
}

.timeline-item.active .timeline-marker {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.timeline-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.tool-card {
  padding: 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tool-card:hover {
  border-color: var(--accent-primary);
}

.tool-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.tool-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Requirements List */
.requirements-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.requirement-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.requirement-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.requirement-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.requirement-content p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Session Info */
.session-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.session-date {
  display: flex;
  gap: 20px;
  align-items: center;
}

.date-box {
  width: 80px;
  height: 80px;
  background: var(--bg-tertiary);
  border: 2px solid var(--accent-primary);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.date-day {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
}

.date-month {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.session-details h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.session-details p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

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

/* Sessions List */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.session-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  align-items: center;
}

.session-date-small {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  min-width: 100px;
}

.session-info-small {
  flex: 1;
}

.session-info-small h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.session-info-small p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Alerts List */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.alert-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

.alert-info {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--info);
}

.alert-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
}

.alert-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.alert-content p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.alert-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* Reports Grid */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.report-card {
  padding: 24px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
  transition: all 0.2s ease;
}

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

.report-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.report-card h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.report-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Student Portal Specific Styles */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.quick-action-card {
  padding: 24px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.quick-action-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.quick-action-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.quick-action-card p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Notifications List */
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.notification-item.unread {
  background: rgba(59, 130, 246, 0.05);
  border-left: 3px solid var(--accent-primary);
}

.notification-item:hover {
  background: var(--bg-hover);
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.notification-content p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.notification-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* Scholarship Status */
.scholarship-status {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.status-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.status-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.status-item .label {
  color: var(--text-secondary);
}

.status-item .value {
  color: var(--text-primary);
  font-weight: 500;
}

.status-progress {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.progress-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--success);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

/* Convocatorias Student Grid */
.convocatorias-student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.convocatoria-student-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  transition: all 0.2s ease;
}

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

.convocatoria-badge {
  position: absolute;
  top: 16px;
  right: 16px;
}

.convocatoria-student-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-right: 80px;
}

.convocatoria-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.convocatoria-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.detail-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.detail-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.detail-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.detail-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
}

.convocatoria-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Scholarship Form */
.scholarship-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

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

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.textarea {
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s ease;
}

.textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* Upload List */
.upload-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

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

.upload-icon {
  font-size: 24px;
}

.upload-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.upload-description {
  font-size: 12px;
  color: var(--text-secondary);
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* Solicitudes List */
.solicitudes-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.solicitud-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

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

.solicitud-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.solicitud-body {
  padding: 20px;
}

.solicitud-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-step {
  display: flex;
  gap: 16px;
  position: relative;
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 28px;
  bottom: -20px;
  width: 2px;
  background: var(--border-color);
}

.timeline-step:last-child::before {
  display: none;
}

.step-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-step.completed .step-marker {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.step-date {
  font-size: 12px;
  color: var(--text-muted);
}

.solicitud-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.info-item .label {
  color: var(--text-secondary);
}

.info-item .value {
  color: var(--text-primary);
  font-weight: 500;
}

.solicitud-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}

/* Beca Details Grid */
.beca-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.beca-detail-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.beca-detail-card .detail-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.beca-detail-card .detail-content {
  flex: 1;
}

.beca-detail-card .detail-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.beca-detail-card .detail-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Requirements Progress */
.requirements-progress {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.requirement-progress-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.requirement-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.requirement-header h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.requirement-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* Commitments List */
.commitments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.commitment-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.commitment-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.commitment-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.commitment-content p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Renewal Status */
.renewal-status {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.renewal-info h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.renewal-info p {
  font-size: 14px;
  color: var(--text-secondary);
}

.renewal-countdown {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.countdown-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
}

.countdown-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 4px;
}

.countdown-separator {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Renewal Requirements */
.renewal-requirements {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.renewal-requirement-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  border-left: 4px solid var(--border-color);
}

.renewal-requirement-item.completed {
  border-color: var(--success);
}

.renewal-requirement-item.pending {
  border-color: var(--warning);
}

.renewal-requirement-item .requirement-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.renewal-requirement-item.completed .requirement-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.renewal-requirement-item.pending .requirement-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.renewal-requirement-item .requirement-content {
  flex: 1;
}

.renewal-requirement-item h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.renewal-requirement-item p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.requirement-status {
  font-size: 13px;
  font-weight: 500;
}

.renewal-requirement-item.completed .requirement-status {
  color: var(--success);
}

.renewal-requirement-item.pending .requirement-status {
  color: var(--warning);
}

.filters-inline {
  display: flex;
  gap: 12px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .header-center {
    display: none;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .main-content {
    padding: 20px;
  }

  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .applications-grid,
  .convocatoria-grid,
  .convocatorias-student-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .session-info {
    flex-direction: column;
  }

  .session-actions {
    width: 100%;
    flex-direction: column;
  }

  .beca-details-grid {
    grid-template-columns: 1fr;
  }

  .renewal-countdown {
    flex-wrap: wrap;
  }

  .filters-bar {
    flex-direction: column;
  }

  .filters-bar .select,
  .filters-bar .input,
  .filters-bar .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0 16px;
  }

  .main-content {
    padding: 16px;
  }

  .card-body {
    padding: 16px;
  }

  .stat-card {
    padding: 16px;
  }

  .user-name {
    display: none;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
/* Landing Page Specific Styles */

.landing-page {
  background: var(--bg-primary);
}

/* Landing Header */
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.landing-header.scrolled {
  height: 70px;
  background: rgba(10, 10, 10, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.landing-header .landing-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-nav {
  display: flex;
  gap: 32px;
}

.landing-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.landing-nav a:hover {
  color: var(--text-primary);
}

/* Hero Section */
.hero-section {
  padding: 160px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-section .landing-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Sections */
.roles-section,
.features-section,
.process-section,
.contact-section {
  padding: 100px 0;
}

.section-title {
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-description {
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 60px;
}

/* Roles Grid */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.role-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s ease;
}

.role-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.role-card.featured {
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
}

.role-icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.role-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.role-card > p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.role-features {
  list-style: none;
  margin-bottom: 24px;
}

.role-features li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.role-features li:last-child {
  border-bottom: none;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
}

.feature-item {
  text-align: center;
  padding: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.feature-item h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.feature-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Process Timeline */
.process-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.process-step {
  text-align: center;
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.process-step:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
}

.process-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.process-step h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.process-step p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  text-align: center;
  padding: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.contact-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.contact-card h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.contact-card p {
  font-size: 16px;
  color: var(--text-secondary);
}

/* Footer */
.landing-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-section a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-bottom p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 24px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

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

.modal-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-form {
  margin-top: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

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

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

.form-links {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 14px;
}

.form-links a {
  color: var(--accent-primary);
  text-decoration: none;
}

.form-links a:hover {
  text-decoration: underline;
}

.divider {
  position: relative;
  text-align: center;
  margin: 32px 0;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
}

.divider span {
  position: relative;
  background: var(--bg-secondary);
  padding: 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.social-login {
  display: flex;
  gap: 12px;
}

.btn-social {
  flex: 1;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-social:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-section .landing-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  .landing-nav {
    display: none;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-description {
    font-size: 18px;
  }

  .section-title {
    font-size: 32px;
  }

  .roles-grid,
  .features-grid,
  .process-timeline {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-lg {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 120px 0 60px;
  }

  .hero-title {
    font-size: 32px;
  }

  .modal-content {
    padding: 24px;
  }

  .social-login {
    flex-direction: column;
  }
}

/* Chatbot Styles */
.chatbot-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  border: none;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
}

.chatbot-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(59, 130, 246, 0.6);
}

.chatbot-button.hidden {
  display: none;
}

.chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 400px;
  height: 600px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  z-index: 1001;
  overflow: hidden;
}

.chatbot-widget.active {
  display: flex;
}

.chatbot-header {
  padding: 20px;
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-header-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.chatbot-header-info p {
  font-size: 13px;
  opacity: 0.9;
}

.chatbot-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-primary);
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.chatbot-message {
  display: flex;
  gap: 12px;
  animation: messageSlideIn 0.3s ease;
}

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

.chatbot-message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.chatbot-message.bot .message-avatar {
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
}

.message-content {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

.chatbot-message.user .message-content {
  background: var(--accent-primary);
  color: white;
  border-radius: 12px 12px 0 12px;
}

.chatbot-message.bot .message-content {
  border-radius: 12px 12px 12px 0;
}

.message-content p {
  margin: 0;
  white-space: pre-wrap;
}

.quick-replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.quick-replies button {
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-replies button:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.chatbot-input {
  padding: 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
}

.chatbot-input input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.chatbot-input input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.chatbot-input input::placeholder {
  color: var(--text-muted);
}

.chatbot-input button {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--accent-primary);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chatbot-input button:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

/* Chatbot Responsive */
@media (max-width: 768px) {
  .chatbot-widget {
    width: calc(100vw - 32px);
    height: calc(100vh - 100px);
    bottom: 16px;
    right: 16px;
  }

  .chatbot-button {
    bottom: 16px;
    right: 16px;
  }

  .message-content {
    max-width: 85%;
  }
}

@media (max-width: 480px) {
  .chatbot-widget {
    width: 100vw;
    height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }

  .chatbot-button {
    width: 56px;
    height: 56px;
  }
}

/* Additional styles for student portal specific elements */
.quarter-performance-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quarter-performance-item {
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.quarter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.quarter-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-item .label {
  font-size: 13px;
  color: var(--text-secondary);
}

.stat-item .value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.performance-summary {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.performance-summary h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.trend-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trend-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.trend-item.positive {
  border-left: 4px solid var(--success);
}

.trend-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.trend-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.trend-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.documents-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.document-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.document-item:hover {
  border-color: var(--accent-primary);
}

.document-item.completed {
  border-left: 4px solid var(--success);
}

.document-item.pending {
  border-left: 4px solid var(--warning);
}

.document-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.document-item.pending .document-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.document-info {
  flex: 1;
}

.document-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.document-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

.document-status {
  flex-shrink: 0;
}

.document-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-avatar-large {
  text-align: center;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.family-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.family-member {
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: 12px;
}

.family-member h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.account-settings {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  gap: 20px;
}

.setting-info {
  flex: 1;
}

.setting-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.setting-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

.toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-hover);
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
  background-color: var(--accent-primary);
}

.toggle input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.search-help {
  display: flex;
  gap: 12px;
}

.search-help .input {
  flex: 1;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.faq-question:hover {
  background: var(--bg-hover);
}

.faq-question h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.faq-toggle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 20px;
  max-height: 500px;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.faq-answer ul,
.faq-answer ol {
  margin-left: 20px;
  margin-bottom: 12px;
}

.faq-answer li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.contact-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.resources-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.resource-item:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

.resource-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.resource-info {
  flex: 1;
}

.resource-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.resource-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

.resource-action {
  font-size: 14px;
  color: var(--accent-primary);
  font-weight: 500;
  flex-shrink: 0;
}

.requirements-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.requirements-info h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.requirements-info ul {
  margin-left: 20px;
}

.requirements-info li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Responsive para botones del header */
@media (max-width: 768px) {
    .landing-nav {
        display: none;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .header-actions .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header-actions {
        flex-direction: column;
        width: auto;
    }
    
    .header-actions .btn {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
}

/* ====== LOGO EN EL ENCABEZADO ====== */
.logo-container {
  display: flex;
  align-items: center;
  gap: 10px; /* espacio entre logo y texto */
}

.logo-img {
  width: 50px;       /* ajusta el tamaño del logo */
  height: 50px;
  object-fit: contain;
}

.landing-logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--text-light, #fff);
  margin: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

/* Galería de imágenes */
.hero-gallery {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

.gallery-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s ease, transform 1s ease;
}

.gallery-img.active {
  opacity: 1;
  transform: scale(1);
}

/* Responsivo */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-gallery {
    height: 250px;
    margin-top: 20px;
  }
}

/* ====== ICONOS CON IMÁGENES ====== */
.feature-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

.feature-img {
  width: 80px; /* puedes ajustar tamaño */
  height: 80px;
  object-fit: contain;
  border-radius: 10px; /* opcional: bordes suaves */
  transition: transform 0.3s ease;
}

.feature-item:hover .feature-img {
  transform: scale(1.05);
}

.process-step {
  background: #111;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.process-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.process-step {
  background: #111;
  border-radius: 14px;
  padding: 25px 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.process-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.process-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

.process-icon img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 50%;
  background-color: #1e1e1e;
  padding: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process-step:hover .process-icon img {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(100, 149, 237, 0.6);
}

.process-step h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 8px;
}

.process-step p {
  color: #ccc;
  font-size: 0.9rem;
}

.process-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.process-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

.process-icon img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 50%;
  background-color: #1e1e1e;
  padding: 10px;
  transition: transform 0.3s ease;
}

.process-step:hover .process-icon img {
  transform: scale(1.1);
}


.contact-card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  perspective: 1000px;
}

.contact-card-3d {
  width: 400px;
  height: 260px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s ease-in-out;
  cursor: pointer;
}

.contact-card-3d:hover {
  transform: rotateY(180deg);
}

.contact-front,
.contact-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  backface-visibility: hidden;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.5);
  padding: 20px;
}

.contact-front {
  text-align: center;
}

.contact-front .contact-icon {
  font-size: 60px;
  margin-top: 15px;
}

.contact-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #f9f9f9, #e8e8e8);
  color: #111;
  text-align: left;
  font-size: 16px;
}

.contact-back h3 {
  text-align: center;
  margin-bottom: 15px;
  color: #007bff;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-info li {
  margin-bottom: 10px;
  line-height: 1.4;
  font-weight: 500;
}

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --bg-hover: #202020;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --border-color: #2a2a2a;
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --sidebar-width: 260px;
  --header-height: 64px;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.header-center {
  flex: 1;
  max-width: 600px;
  margin: 0 24px;
}

.search-bar {
  position: relative;
  width: 100%;
}

.search-bar svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-bar input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-secondary);
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-menu:hover {
  background: var(--bg-hover);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Layout */
.layout {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 24px 0;
  overflow-y: auto;
  position: fixed;
  left: 0;
  top: var(--header-height);
  bottom: 0;
  z-index: 90;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  padding: 0 24px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--bg-hover);
  color: var(--accent-primary);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-primary);
}

.nav-item svg {
  flex-shrink: 0;
}

/* Estilos para el menú desplegable CMI */
.nav-submenu {
  display: flex;
  flex-direction: column;
}

.nav-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  width: 100%;
}

.nav-item-header:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.submenu-toggle {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-submenu.open .submenu-toggle {
  transform: rotate(180deg);
}

.nav-submenu-items {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.nav-submenu.open .nav-submenu-items {
  max-height: 500px;
  opacity: 1;
}

.nav-subitem {
  padding: 8px 24px 8px 48px !important;
  font-size: 13px;
  color: var(--text-muted) !important;
}

.nav-subitem:hover {
  background: var(--bg-hover);
  color: var(--text-primary) !important;
}

.nav-subitem.active {
  color: var(--accent-primary) !important;
  background: var(--bg-hover);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  max-width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.view-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.text-muted {
  color: var(--text-muted);
  font-size: 14px;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

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

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

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

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
}

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

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 24px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-change {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-change.positive {
  color: var(--success);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.activity-item:hover {
  background: var(--bg-hover);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.activity-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.activity-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* Table */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: var(--bg-tertiary);
}

.table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-primary);
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background: var(--bg-tertiary);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Badges */
.badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.badge-info {
  background: rgba(6, 182, 212, 0.1);
  color: var(--info);
}

.badge-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* Filters Bar */
.filters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.select,
.input {
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.select:focus,
.input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.select-sm {
  padding: 6px 12px;
  font-size: 13px;
}

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

/* Added styles for CMI Dashboard hierarchical structure */

.dashboard-cmi {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Perspectiva Styles */
.perspectiva {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.perspectiva-header {
    padding: 20px 24px;
    background: var(--bg-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    user-select: none;
    border-bottom: 1px solid var(--border-color);
}

.perspectiva-header:hover {
    background: var(--bg-hover);
}

.perspectiva-toggle {
    font-size: 16px;
    color: var(--accent-primary);
    flex-shrink: 0;
    transition: transform 0.2s ease;
    display: inline-block;
    width: 20px;
}

.perspectiva-nombre {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.perspectiva-stats {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.perspectiva-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.perspectiva.expanded .perspectiva-content {
    max-height: 10000px;
}

/* Objetivo Styles */
.objetivo {
    border-top: 1px solid var(--border-color);
}

.objetivo-header {
    padding: 16px 24px 16px 48px;
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    user-select: none;
}

.objetivo-header:hover {
    background: var(--bg-hover);
}

.objetivo-toggle {
    font-size: 14px;
    color: var(--accent-primary);
    flex-shrink: 0;
    transition: transform 0.2s ease;
    display: inline-block;
    width: 16px;
    margin-left: -12px;
}

.objetivo-nombre {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.objetivo-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.objetivo.expanded .objetivo-content {
    max-height: 5000px;
    padding: 16px 24px;
}

/* Indicadores Table Styles */
.indicadores-table {
    margin: 0;
}

.indicadores-table thead {
    background: var(--bg-tertiary);
}

.indicadores-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.indicadores-table td {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-primary);
}

.indicadores-table tbody tr {
    transition: background 0.2s ease;
}

.indicadores-table tbody tr:hover {
    background: var(--bg-tertiary);
}

/* Semáforo States */
.semaforo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
}

.semaforo.verde {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.semaforo.amarillo {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.semaforo.rojo {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Filter Bar */
.filters-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.filters-bar label {
    margin: 0;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .header-center {
    display: none;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .main-content {
    padding: 20px;
  }

  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
  }

  /* Responsive adjustments for CMI Dashboard */
    .perspectiva-header {
        padding: 16px;
        flex-wrap: wrap;
    }

    .perspectiva-nombre {
        font-size: 16px;
    }

    .perspectiva-stats {
        width: 100%;
        margin-top: 8px;
        text-align: left;
    }

    .objetivo-header {
        padding: 12px 16px 12px 40px;
        flex-wrap: wrap;
    }

    .objetivo-nombre {
        font-size: 14px;
    }

    .indicadores-table {
        font-size: 12px;
    }

    .indicadores-table th,
    .indicadores-table td {
        padding: 8px 12px;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-bar div {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-bar select,
    .filters-bar button {
        width: 100%;
    }

    /* Responsive modal for small screens */
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 16px;
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
  .header {
    padding: 0 16px;
  }

  .main-content {
    padding: 16px;
  }

  .card-body {
    padding: 16px;
  }

  .stat-card {
    padding: 16px;
  }

  .user-name {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .header-actions {
    flex-direction: column;
    width: auto;
  }

  .header-actions .btn {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

.modal.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    position: relative;

    background-image: url("img/descargar.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    border-radius: 14px;
    padding: 30px;

    width: 90%;
    max-width: 450px;

    
    max-height: none;
    overflow: hidden;

    z-index: 1001;
}


.modal-content::before {
    content: "";
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);

    z-index: 0;
}


.modal-content * {
    position: relative;
    z-index: 1;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}


.modal-content > form,
.modal-content > div {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;

    background: rgba(0,0,0,0.7);
    border: none;
    color: white;

    padding: 8px 12px;
    font-size: 20px;
    border-radius: 8px;
    cursor: pointer;

    z-index: 2000;
}

.input {
    background-color: rgba(0,0,0,0.65);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 12px;
    border-radius: 10px;
    width: 100%;
}

.input::placeholder {
    color: #ddd;
}

label {
    font-weight: bold;
    color: #f5f5f5 !important;
}
}