:root {
  --bg: #f4f8fb;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #0f172a;
  --muted: #4b5563;
  --sky: #0284c7;
  --sky-soft: #e0f2fe;
  --emerald: #059669;
  --indigo: #4f46e5;
  --amber: #f59e0b;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.portal-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.portal-hero {
  overflow: hidden;
  padding: 40px;
}
.portal-hero-title {
  margin: 10px 0;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
}
.portal-lead {
  margin: 0 0 16px 0;
  font-size: 18px;
  color: var(--muted);
}
.portal-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(2,132,199,0.12), transparent 35%),
    radial-gradient(circle at 85% 0%, rgba(79,70,229,0.12), transparent 30%),
    linear-gradient(120deg, rgba(255,255,255,0.85), rgba(236,253,245,0.6));
  opacity: 0.9;
  z-index: 0;
}
.portal-hero > * {
  position: relative;
  z-index: 1;
}

.portal-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  background: var(--sky-soft);
  color: var(--sky);
}
.portal-pill.portal-pill-soft {
  background: #f0f9ff;
  color: var(--text);
  margin-top: 14px;
}
.portal-pill.portal-pill-muted {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.portal-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 10px;
}
.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-size: 13px;
}
.portal-btn-primary {
  background: linear-gradient(135deg, var(--sky), #0ea5e9);
  color: #fff;
  box-shadow: var(--shadow);
}
.portal-btn-ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--sky);
}
.portal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.portal-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}
.portal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: #cbd5e1;
}
.portal-dot.on { background: var(--emerald); }
.portal-dot.off { background: #cbd5e1; }

.portal-grid-3,
.portal-grid-2 {
  display: grid;
  gap: 16px;
  margin: 26px 0;
}
@media (min-width: 768px) {
  .portal-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .portal-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.portal-eyebrow {
  margin: 0 0 6px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.portal-eyebrow.portal-eyebrow-sky { color: var(--sky); }
.portal-eyebrow.portal-eyebrow-green { color: var(--emerald); }
.portal-eyebrow.portal-eyebrow-indigo { color: var(--indigo); }
.portal-eyebrow.portal-eyebrow-amber { color: var(--amber); }

.portal-card h3 {
  margin: 4px 0 8px 0;
  font-size: 20px;
}
.portal-muted { color: var(--muted); }
.portal-list {
  padding-left: 16px;
  margin: 6px 0 0 0;
}
.portal-list li { margin: 6px 0; }

.portal-section-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  margin-top: 12px;
}
.portal-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 800;
}
.portal-section-sub {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: var(--muted);
}

.portal-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0 18px 0;
}
.portal-meta-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}
.portal-meta-card label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #64748b;
}
.portal-meta-card input,
.portal-meta-card select {
  width: 100%;
  border-radius: 10px;
}

.portal-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.portal-form-vertical {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
}

.portal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-rank-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.portal-rank-table th,
.portal-rank-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.portal-rank-table thead th {
  background: #f8fafc;
  font-weight: 700;
}

.portal-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  vertical-align: middle;
}
.portal-switch input {
  position: absolute;
  opacity: 0;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
  background: transparent !important;
}
.portal-switch .slider {
  display: block;
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #e5e7eb;
  transition: 0.2s;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px #cbd5e1;
}
.portal-switch .slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.portal-switch input:checked + .slider {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: inset 0 0 0 1px rgba(34,197,94,0.25);
}
.portal-switch input:checked + .slider:before {
  transform: translateX(24px);
}

.portal-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.portal-switch-label {
  font-weight: 700;
  color: #475569;
  font-size: 13px;
}

.portal-link-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);  /* 4열짜리 그리드 예시 */
  grid-template-rows: repeat(10, auto);   /* 3행 예시 (auto 높이) */
  gap: 10px;
}
.portal-link-grid a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}
.portal-link-grid a:hover {
  border-color: var(--sky);
  color: var(--sky);
  box-shadow: 0 8px 20px rgba(2,132,199,0.10);
}

.portal-link-activity {
  grid-row: 1;     /* 1번째 행 */
  grid-column: 1;  /* 1번째 열 */
}

.portal-link-cashbook {
  grid-row: 2;     /* 1번째 행 */
  grid-column: 1;  /* 1번째 열 */
}
.portal-link-items {
  grid-row: 2;     /* 1번째 행 */
  grid-column: 2;  /* 1번째 열 */
}
.portal-link-patrol {
  grid-row: 1;     /* 1번째 행 */
  grid-column: 2;  /* 1번째 열 */
}
.portal-link-participation {
  grid-row: 3;     /* 1번째 행 */
  grid-column: 2;  /* 1번째 열 */
}
.portal-link-funding-forecast {
  grid-row: 4;     /* 1번째 행 */
  grid-column: 1;  /* 1번째 열 */
}
.portal-link-member_manage {
  grid-row: 3;     /* 1번째 행 */
  grid-column: 1;  /* 1번째 열 */
}
.portal-link-members_admin_applications {
  grid-row: 3;     /* 1번째 행 */
  grid-column: 3;  /* 1번째 열 */
}








.portal-activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.portal-activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}
.portal-activity-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.portal-activity-text {
  font-weight: 700;
  color: var(--text);
}
.portal-activity-date {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}
