/* University student portal dashboard (Schools-like modern dashboard)

   Uses the palette from portal_styles.css:
   - --u-surface, --u-surface-2, --u-accent, --u-border, --u-text, --u-muted
*/

body.u-portal-mode .u-dashboard {
  display: block;
}

body.u-portal-mode .u-welcome {
  background: linear-gradient(135deg, var(--u-accent) 0%, var(--u-accent-2) 100%);
  border-radius: 14px;
  padding: 18px 20px;
  color: #fff;
  box-shadow: var(--u-shadow-sm);
  margin-bottom: 18px;
}

body.u-portal-mode .u-welcome__title {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}

body.u-portal-mode .u-welcome__subtitle {
  margin: 6px 0 0 0;
  opacity: 0.92;
  font-size: 0.95rem;
}

body.u-portal-mode .u-welcome__inner {
  display: flex;
  align-items: center;
  gap: 18px;
}

body.u-portal-mode .u-welcome__avatar {
  flex-shrink: 0;
  position: relative;
}

body.u-portal-mode .u-welcome__photo-upload {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.15),
    0 0 0 3px rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
}
body.u-portal-mode .u-welcome__photo-upload:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.18),
    0 0 0 3px rgba(255, 255, 255, 0.35);
}

body.u-portal-mode .u-welcome__photo {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}

body.u-portal-mode .u-welcome__photo-placeholder {
  width: 86px;
  height: 86px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 2.5px dashed rgba(255, 255, 255, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  transition: background 0.2s ease;
}
body.u-portal-mode .u-welcome__photo-upload:hover .u-welcome__photo-placeholder {
  background: rgba(255, 255, 255, 0.25);
}

body.u-portal-mode .u-welcome__text {
  flex: 1;
  min-width: 0;
}

/* Admission form photo upload box */
.u-photo-upload-box {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}
.u-photo-upload-box:hover {
  border-color: #667eea;
}
.u-photo-upload-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

@media (max-width: 480px) {
  body.u-portal-mode .u-welcome__inner {
    flex-direction: column;
    text-align: center;
  }
  body.u-portal-mode .u-welcome__photo-upload,
  body.u-portal-mode .u-welcome__photo,
  body.u-portal-mode .u-welcome__photo-placeholder {
    width: 66px;
    height: 66px;
    border-radius: 12px;
  }
}

body.u-portal-mode .u-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

body.u-portal-mode .u-metric-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--u-surface) 0%, var(--u-surface-2) 100%);
  border: 1px solid var(--u-border);
  border-radius: 14px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--u-shadow-sm);
}

body.u-portal-mode .u-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: 0 0 auto;
}

body.u-portal-mode .u-metric-icon--primary { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
body.u-portal-mode .u-metric-icon--warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
body.u-portal-mode .u-metric-icon--info { background: linear-gradient(135deg, #06b6d4, #0891b2); }
body.u-portal-mode .u-metric-icon--success { background: linear-gradient(135deg, #10b981, #059669); }

body.u-portal-mode .u-metric-meta {
  flex: 1;
  min-width: 0;
}

body.u-portal-mode .u-metric-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--u-text);
  line-height: 1;
}

body.u-portal-mode .u-metric-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--u-muted);
  margin-top: 4px;
}

body.u-portal-mode .u-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.0rem;
  font-weight: 800;
  color: var(--u-text);
  margin: 10px 0 12px;
}

body.u-portal-mode .u-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

body.u-portal-mode .u-action-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: var(--u-surface);
  border: 1px solid var(--u-border);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--u-shadow-sm);
}

body.u-portal-mode .u-action-card[aria-disabled='true'] {
  opacity: 0.65;
  cursor: not-allowed;
}

body.u-portal-mode .u-action-title {
  font-weight: 800;
  margin: 0;
  color: var(--u-text);
  font-size: 0.95rem;
}

body.u-portal-mode .u-action-subtitle {
  margin: 2px 0 0 0;
  color: var(--u-muted);
  font-size: 0.82rem;
}

body.u-portal-mode .u-chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

@media (max-width: 992px) {
  body.u-portal-mode .u-chart-grid {
    grid-template-columns: 1fr;
  }
}

body.u-portal-mode .u-panel {
  background: linear-gradient(135deg, var(--u-surface) 0%, var(--u-surface-2) 100%);
  border: 1px solid var(--u-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--u-shadow-sm);
}

body.u-portal-mode .u-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

body.u-portal-mode .u-panel__title {
  margin: 0;
  font-weight: 800;
  color: var(--u-text);
  font-size: 0.95rem;
}

body.u-portal-mode .u-chart {
  height: 260px;
  position: relative;
}

body.u-portal-mode .u-activity {
  list-style: none;
  padding: 0;
  margin: 0;
}

body.u-portal-mode .u-activity__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--u-border) 70%, transparent);
}

body.u-portal-mode .u-activity__item:last-child {
  border-bottom: none;
}

body.u-portal-mode .u-activity__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1e40af;
  flex: 0 0 auto;
}

body.u-portal-mode .u-activity__title {
  margin: 0;
  font-weight: 800;
  color: var(--u-text);
  font-size: 0.88rem;
}

body.u-portal-mode .u-activity__meta {
  margin: 2px 0 0 0;
  color: var(--u-muted);
  font-size: 0.78rem;
}

body.u-portal-mode .u-activity__badge {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  background: #eef2ff;
  color: #1e40af;
}

body.u-portal-mode .u-activity__badge--success {
  background: #d1fae5;
  color: #065f46;
}

body.u-portal-mode .u-activity__badge--warning {
  background: #fef3c7;
  color: #92400e;
}
