:root {
    --sp-blue:#2563eb;
    --sp-indigo:#4f46e5;
    --sp-violet:#7c3aed;
    --sp-cyan:#06b6d4;
    --sp-green:#22c55e;
    --sp-orange:#f97316;
    --sp-red:#ef4444;
    --sp-slate:#0f172a;
    --sp-muted:#64748b;
    --sp-bg:#f5f7fb;
    --sp-card:#ffffff;
    --sp-border:#e2e8f0;
    --sp-shadow:0 18px 45px rgba(15,23,42,.12);
}

.sp-public {
    background: linear-gradient(180deg,#eff6ff 0%,#f8fafc 45%,#ffffff 100%);
    border-radius: 22px;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--sp-slate);
    box-shadow: 0 10px 35px rgba(30,64,175,.08);
}

.sp-hero {
    background:
        radial-gradient(circle at top left, rgba(34,211,238,.34), transparent 35%),
        radial-gradient(circle at bottom right, rgba(168,85,247,.34), transparent 30%),
        linear-gradient(135deg,#1d4ed8 0%,#4f46e5 50%,#7c3aed 100%);
    color: #fff;
    padding: 34px 28px;
    position: relative;
}

.sp-hero-inner {
    display:flex;
    justify-content:space-between;
    gap:20px;
    align-items:center;
}

.sp-kicker {
    letter-spacing:.16em;
    text-transform:uppercase;
    font-size:12px;
    font-weight:700;
    opacity:.88;
}

.sp-hero h1 {
    margin:8px 0 8px;
    font-size:34px;
    line-height:1.15;
    font-weight:800;
}

.sp-hero p {
    margin:0;
    max-width:720px;
    font-size:16px;
    opacity:.94;
}

.sp-hero-badge {
    min-width:150px;
    background: rgba(255,255,255,.16);
    border:1px solid rgba(255,255,255,.28);
    border-radius:22px;
    padding:18px;
    text-align:center;
    backdrop-filter: blur(8px);
}

.sp-hero-badge span {
    display:block;
    font-size:13px;
    opacity:.9;
}

.sp-hero-badge strong {
    display:block;
    font-size:24px;
    margin-top:4px;
}

.sp-nav {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    padding:14px 18px;
    background:#ffffff;
    border-bottom:1px solid var(--sp-border);
    position: sticky;
    top:0;
    z-index:1;
}

.sp-nav a {
    text-decoration:none;
    color:#334155;
    padding:10px 14px;
    border-radius:999px;
    background:#f1f5f9;
    font-weight:700;
    transition:.2s;
}

.sp-nav a:hover,
.sp-nav a.active {
    background: linear-gradient(135deg,var(--sp-blue),var(--sp-violet));
    color:#fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37,99,235,.22);
}

.sp-content {
    padding:24px;
}

.sp-grid {
    display:grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap:16px;
    margin-bottom:20px;
}

.sp-card {
    background: var(--sp-card);
    border:1px solid var(--sp-border);
    border-radius:18px;
    box-shadow: 0 10px 28px rgba(15,23,42,.06);
}

.sp-stat {
    padding:18px;
    display:flex;
    align-items:center;
    gap:14px;
    min-height:92px;
}

.sp-stat-icon {
    width:48px;
    height:48px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:22px;
    font-weight:800;
}

.sp-blue .sp-stat-icon { background:linear-gradient(135deg,#2563eb,#06b6d4); }
.sp-green .sp-stat-icon { background:linear-gradient(135deg,#16a34a,#22c55e); }
.sp-orange .sp-stat-icon { background:linear-gradient(135deg,#ea580c,#f97316); }
.sp-purple .sp-stat-icon { background:linear-gradient(135deg,#7c3aed,#ec4899); }
.sp-red .sp-stat-icon { background:linear-gradient(135deg,#dc2626,#f43f5e); }
.sp-cyan .sp-stat-icon { background:linear-gradient(135deg,#0891b2,#22d3ee); }

.sp-stat-value {
    font-size:28px;
    font-weight:900;
    color:#0f172a;
}

.sp-stat-label {
    font-size:13px;
    color:var(--sp-muted);
    font-weight:700;
}

.sp-panel {
    background:#fff;
    border:1px solid var(--sp-border);
    border-radius:20px;
    box-shadow: 0 12px 30px rgba(15,23,42,.07);
    margin-bottom:20px;
    overflow:hidden;
}

.sp-panel-head {
    padding:16px 18px;
    background: linear-gradient(90deg,#f8fafc,#eef2ff);
    border-bottom:1px solid var(--sp-border);
}

.sp-panel-head h2 {
    margin:0;
    font-size:19px;
    font-weight:800;
    color:#1e293b;
}

.sp-panel-body {
    padding:18px;
}

.sp-table-wrap {
    overflow-x:auto;
}

.sp-table {
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    font-size:14px;
}

.sp-table th {
    background:#f1f5f9;
    color:#334155;
    padding:12px;
    text-align:left;
    border-bottom:1px solid var(--sp-border);
    white-space:nowrap;
}

.sp-table td {
    padding:12px;
    border-bottom:1px solid #edf2f7;
    vertical-align:top;
}

.sp-table tr:hover td {
    background:#f8fafc;
}

.sp-empty {
    text-align:center;
    color:#64748b;
    padding:26px !important;
}

.sp-badge {
    display:inline-block;
    padding:5px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
}

.sp-badge-blue { background:#dbeafe; color:#1d4ed8; }
.sp-badge-green { background:#dcfce7; color:#15803d; }
.sp-badge-orange { background:#ffedd5; color:#c2410c; }
.sp-badge-red { background:#fee2e2; color:#b91c1c; }
.sp-badge-purple { background:#ede9fe; color:#6d28d9; }

.sp-actions {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.sp-btn {
    display:inline-block;
    padding:10px 14px;
    border-radius:12px;
    background:linear-gradient(135deg,#2563eb,#7c3aed);
    color:#fff !important;
    text-decoration:none;
    font-weight:800;
    box-shadow: 0 10px 22px rgba(79,70,229,.22);
}

.sp-note {
    padding:14px;
    border-radius:16px;
    background:#fff7ed;
    border:1px solid #fed7aa;
    color:#9a3412;
    font-weight:700;
}

.studyplanner-public {
    font-family: Arial, Helvetica, sans-serif;
}

@media (max-width: 992px) {
    .sp-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .sp-hero-inner { flex-direction:column; align-items:flex-start; }
}

@media (max-width: 640px) {
    .sp-content { padding:14px; }
    .sp-hero { padding:24px 18px; }
    .sp-hero h1 { font-size:26px; }
    .sp-grid { grid-template-columns:1fr; }
    .sp-nav { overflow-x:auto; flex-wrap:nowrap; }
    .sp-nav a { white-space:nowrap; }
}

.sp-note-green { background:#dcfce7; border-color:#86efac; color:#166534; }
.sp-note-orange { background:#fff7ed; border-color:#fed7aa; color:#9a3412; }
.sp-note-red { background:#fee2e2; border-color:#fecaca; color:#991b1b; }
.sp-public .form-group { margin-bottom:14px; }
.sp-public .form-control {
    width:100%;
    max-width:100%;
    padding:10px 12px;
    border:1px solid #cbd5e1;
    border-radius:12px;
    background:#fff;
}
.sp-public textarea.form-control { min-height:92px; }
button.sp-btn { border:0; cursor:pointer; }
@media (max-width: 640px) {
    .sp-table th, .sp-table td { padding:9px; font-size:12px; }
    .sp-btn { width:100%; text-align:center; box-sizing:border-box; }
}
