/* ============================================================
   Course User Panel – Stylesheet
   ============================================================ */

/* ─── Base ───────────────────────────────────────────────── */
.cup-btn {
    display: inline-block;
    background: #2563eb;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .2s, transform .1s;
    line-height: 1.4;
}
.cup-btn:hover { background: #1d4ed8; transform: translateY(-1px); }
.cup-btn-outline {
    background: transparent;
    border: 2px solid #2563eb;
    color: #2563eb !important;
}
.cup-btn-outline:hover { background: #2563eb; color: #fff !important; }
.cup-btn-full  { width: 100%; text-align: center; display: block; }
.cup-btn-sm    { padding: 6px 14px; font-size: 13px; }

.cup-notice {
    padding: 14px 18px;
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    border-radius: 6px;
    margin: 16px 0;
}

/* ─── Auth Box ───────────────────────────────────────────── */
.cup-auth-wrapper {
    display: flex;
    justify-content: center;
    padding: 30px 16px;
}
.cup-auth-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    padding: 32px;
    width: 100%;
    max-width: 440px;
}

/* Tabs */
.cup-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
}
.cup-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    color: #64748b;
    transition: all .2s;
}
.cup-tab.active {
    background: #fff;
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(0,0,0,.10);
}

/* Tab panes */
.cup-tab-pane { display: none; }
.cup-tab-pane.active { display: block; }

/* Form fields */
.cup-field { margin-bottom: 18px; }
.cup-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.cup-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111;
    transition: border .2s;
    box-sizing: border-box;
}
.cup-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* Messages */
.cup-msg {
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
}
.cup-msg.cup-error   { background: #fef2f2; color: #dc2626; display: block; }
.cup-msg.cup-success { background: #f0fdf4; color: #16a34a; display: block; }

/* ─── Dashboard ──────────────────────────────────────────── */
.cup-dashboard { max-width: 900px; margin: 0 auto; padding: 20px 16px; }

/* Profile card */
.cup-profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.cup-avatar {
    width: 72px; height: 72px;
    background: rgba(255,255,255,.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    flex-shrink: 0;
}
.cup-user-meta { flex: 1; min-width: 160px; }
.cup-user-meta h2 { margin: 0 0 4px; font-size: 22px; }
.cup-user-meta p  { margin: 2px 0; font-size: 14px; opacity: .85; }
.cup-member-since  { font-size: 12px !important; opacity: .7 !important; }

/* Stats row */
.cup-stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.cup-stat-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 24px;
    text-align: center;
    min-width: 130px;
}
.cup-stat-number { display: block; font-size: 28px; font-weight: 700; color: #2563eb; }
.cup-stat-label  { display: block; font-size: 12px; color: #64748b; margin-top: 4px; }

/* Section title */
.cup-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

/* Empty state */
.cup-empty-state {
    text-align: center;
    padding: 50px 20px;
    background: #f8fafc;
    border-radius: 12px;
}
.cup-empty-icon { font-size: 48px; margin-bottom: 12px; }
.cup-empty-state p { color: #64748b; margin-bottom: 20px; }

/* Courses grid */
.cup-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.cup-course-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.cup-course-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.10);
    transform: translateY(-3px);
}
.cup-course-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
.cup-course-body { padding: 16px; }
.cup-course-body h4 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}
.cup-buy-date, .cup-amount {
    font-size: 12px;
    color: #64748b;
    margin: 2px 0 8px;
}

/* ─── Loading Overlay ────────────────────────────────────── */
.cup-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    color: #fff;
    font-size: 16px;
    gap: 14px;
}
.cup-spinner {
    width: 44px; height: 44px;
    border: 4px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cup-spin .7s linear infinite;
}
@keyframes cup-spin { to { transform: rotate(360deg); } }

/* ─── Mobile ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .cup-auth-box        { padding: 22px 18px; }
    .cup-profile-card    { gap: 14px; padding: 20px; }
    .cup-courses-grid    { grid-template-columns: 1fr; }
}
