/* ============================================
   Yaser USMLE Prep - Study Progress Styles
   ألوان مستوحاة من الهيدر في الصورة
   ============================================ */

/* Color System */
:root {
    --yaser-navy: #142e54;
    --yaser-navy-soft: #1b3a6d;
    --yaser-navy-softer: #1f3c73;
    --yaser-blue: #365ed9;
    --yaser-blue-light: #4e71ff;
    --yaser-offwhite: #f5f7fb;
    --yaser-border: #e1e6f0;
    --yaser-card-border: #dde3f0;
    --yaser-text-main: #0f172a;
    --yaser-text-muted: #6b7280;
    --yaser-success: #10b981;
    --yaser-warning: #fbbf24;
    --yaser-danger: #ef4444;
}

/* Reset & Base */
* {
    box-sizing: border-box;
}

.spt-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 40px;
    background: var(--yaser-offwhite);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--yaser-text-main);
    line-height: 1.6;
}

/* Header Section */
.spt-header {
    background: linear-gradient(135deg, var(--yaser-navy) 0%, var(--yaser-navy-softer) 55%, var(--yaser-blue) 100%);
    border-radius: 20px;
    padding: 40px 32px;
    margin-bottom: 28px;
    box-shadow: 0 18px 50px rgba(20, 46, 84, 0.55);
    position: relative;
    overflow: hidden;
}

.spt-header::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -40%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.spt-heading {
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.spt-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* Alerts */
.spt-alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 22px;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.spt-alert-success {
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #065f46;
}

/* Cards */
.spt-card {
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid var(--yaser-card-border) !important;
    padding: 24px 24px 22px; 
    margin-bottom: 22px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
    transition: all 0.25s ease !important;
    position: relative;
}

.spt-card:hover {
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
    border-color: #c9d3ea;
}

.spt-card-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--yaser-border);
}

.spt-card-title {
    margin: 0 0 6px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--yaser-navy);
    letter-spacing: -0.01em;
}

.spt-card-description {
    margin: 0;
    font-size: 0.875rem;
    color: var(--yaser-text-muted);
    line-height: 1.5;
}

/* Start Card */
.spt-start-card {
    display: inline-block;
    min-width: 280px;
    background: linear-gradient(135deg, #ffeab3 0%, #ffd66b 100%) ;
    border: 1px solid var(--yaser-warning) ;
}

/* Labels & Inputs */
.spt-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    letter-spacing: 0.01em;
}

.spt-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--yaser-border);
    border-radius: 10px;
    font-size: 0.95rem;
    background-color: #ffffff;
    color: var(--yaser-text-main);
    transition: all 0.2s ease;
    outline: none;
}

.spt-input:hover {
    border-color: #c5cfe3;
}

.spt-input:focus {
    border-color: var(--yaser-blue);
    box-shadow: 0 0 0 3px rgba(54, 94, 217, 0.25);
    background-color: #f9fafb;
}

.spt-input-sm {
    padding: 9px 12px;
    font-size: 0.9rem;
}

/* Chapter Meta */
.spt-chapter-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
    padding: 18px 18px;
    background: #f0f3fb;
    border-radius: 12px;
    border: 1px solid var(--yaser-border);
}

.spt-chapter-days {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e2ebff 0%, #c7d6ff 100%);
    color: var(--yaser-navy);
    font-size: 0.95rem;
    font-weight: 700;
    border: 1px solid #c0cff7;
    box-shadow: 0 2px 8px rgba(54, 94, 217, 0.18);
}

/* Chapters Grid */
.spt-chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 4px;
}

.spt-chapter-btn {
    position: relative;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid var(--yaser-border);
     background: linear-gradient(135deg, var(--yaser-blue) 0%, var(--yaser-blue-light) 100%);
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    background: linear-gradient(135deg, var(--yaser-blue) 0%, var(--yaser-blue-light) 100%);
    border-color: var(--yaser-blue);
    color: #ffffff !important;
    box-shadow: 0 10px 26px rgba(54, 94, 217, 0.55);
}

.spt-chapter-btn::after {
    content: "→";
    font-size: 1.05rem;
    color: #9ca3af;
    font-weight: 400;
    transition: transform 0.2s ease, color 0.2s ease;
}

.spt-chapter-btn:hover {
    background: linear-gradient(135deg, #e6ecff 0%, #d3ddff 100%);
    border-color: #c0cff7;
    color: var(--yaser-navy);
    box-shadow: 0 4px 12px rgba(54, 94, 217, 0.25);
    transform: translateY(-2px);
}

.spt-chapter-btn:hover::after {
    transform: translateX(4px);
    color: var(--yaser-blue);
}

.spt-chapter-btn.spt-active  {
    background: linear-gradient(135deg, var(--yaser-blue) 0%, var(--yaser-blue-light) 100%);
    border-color: var(--yaser-blue);
    color: #ffffff !important;
    box-shadow: 0 10px 26px rgba(54, 94, 217, 0.55);
}

.spt-chapter-btn.spt-active::after {
    color: rgba(255, 255, 255, 0.95);
    transform: translateX(4px);
}

.spt-chapter-title-text {
    font-weight: 600;
    letter-spacing: -0.01em;

}

/* Tables */
.spt-lectures-table {
    margin-top: 6px;
}

.spt-lectures-table.spt-hidden {
    display: none;
}

.spt-lectures-table.spt-visible {
    display: block;
}

.spt-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 18px;
    border-radius: 14px;
    border: 1px solid var(--yaser-border);
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.06);
}

.spt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    background: #ffffff;
}

.spt-table thead {
    background: linear-gradient(135deg, var(--yaser-navy) 0%, var(--yaser-navy-soft) 100%);
    color: #ffffff;
}

.spt-table th,
.spt-table td {
    padding: 13px 14px;
    text-align: left;
}

.spt-table th:first-child,
.spt-table td:first-child {
    padding-left: 20px;
}

.spt-table th:last-child,
.spt-table td:last-child {
    padding-right: 20px;
}

.spt-table th {
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.spt-table td {
    border-bottom: 1px solid #edf1fa;
    color: #4b5563;
}

.spt-table tbody tr {
    transition: background-color 0.15s ease;
}

.spt-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.spt-table tbody tr:hover {
    background: #eef2ff;
}

.spt-table tbody tr:last-child td {
    border-bottom: none;
}

/* Lecture Name */
.spt-lecture-name {
    font-weight: 600;
    color: var(--yaser-navy);
    white-space: normal;
}

/* Centered Cells */
.spt-center {
    text-align: center;
}

/* Checkbox Styling */
.spt-checkbox-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.spt-checkbox-label input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    inset: 0;
    margin: 0;
    cursor: pointer;
}

.spt-checkmark {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: inline-block;
    transition: all 0.2s ease;
    position: relative;
}

.spt-checkbox-label:hover .spt-checkmark {
    border-color: #9fb2e6;
    box-shadow: 0 2px 6px rgba(54, 94, 217, 0.25);
}

.spt-checkbox-label input[type="checkbox"]:checked + .spt-checkmark {
    background: linear-gradient(135deg, var(--yaser-success) 0%, #059669 100%);
    border-color: #059669;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.spt-checkbox-label input[type="checkbox"]:checked + .spt-checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Actions */
.spt-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--yaser-border);
}

.spt-save-btn {
    padding: 13px 30px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--yaser-blue) 0%, var(--yaser-blue-light) 100%);
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(54, 94, 217, 0.55);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.spt-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 38px rgba(54, 94, 217, 0.65);
    filter: brightness(1.03);
}

.spt-save-btn:active {
    transform: translateY(0);
    box-shadow: 0 10px 26px rgba(54, 94, 217, 0.55);
}

/* Statistics Dashboard */
.spt-stats-dashboard {
    background: linear-gradient(135deg, var(--yaser-navy) 0%, var(--yaser-navy-soft) 50%, var(--yaser-navy-softer) 100%) !important;
    border-radius: 20px;
    padding: 34px 28px;
    margin: 32px 0 26px;
    box-shadow: 0 20px 60px rgba(20, 46, 84, 0.65);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.spt-stats-dashboard::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -40%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.spt-stats-title {
    margin: 0 0 26px 0;
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
    color: white !important;
}

.spt-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 26px;
    position: relative;
    z-index: 1;
}

.spt-stat-card {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.25s ease;
}

.spt-stat-card:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.28);
}

.spt-stat-icon {
    font-size: 40px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.25));
}

.spt-stat-content {
    flex: 1;
}

.spt-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: 0.09em;
}

.spt-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.spt-stat-percentage {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}

/* Progress Bar */
.spt-progress-bar-container {
    margin: 26px 0;
    background: rgba(15, 23, 42, 0.25);
    padding: 18px 18px 20px;
    border-radius: 14px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    z-index: 1;
}

.spt-progress-bar-label {
    margin-bottom: 12px;
    font-weight: 700;
    color: #ffffff;
    font-size: 0.98rem;
    text-align: center;
    letter-spacing: 0.01em;
}

.spt-progress-bar {
    height: 32px;
    background: rgba(15, 23, 42, 0.45);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.spt-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff 0%, #dbeafe 60%, #bfdbfe 100%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.45);
}

/* Lists in Dashboard */
.spt-section-title {
    margin: 26px 0 14px 0;
    font-size: 1.05rem;
    color: #ffffff !important;
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.spt-upcoming-list,
.spt-active-chapters-list,
.spt-expired-list {
    background: rgba(15, 23, 42, 0.35);
    border-radius: 12px;
    padding: 18px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 1;
}

.spt-upcoming-item,
.spt-active-item,
.spt-expired-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 16px;
    margin-bottom: 10px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    border-left: 4px solid rgba(255, 255, 255, 0.45);
    transition: all 0.2s ease;
}

.spt-upcoming-item:hover,
.spt-active-item:hover,
.spt-expired-item:hover {
    background: rgba(15, 23, 42, 0.8);
    transform: translateX(4px);
    border-left-color: rgba(255, 255, 255, 0.7);
}

.spt-upcoming-item:last-child,
.spt-active-item:last-child,
.spt-expired-item:last-child {
    margin-bottom: 0;
}

.spt-active-item.spt-warning-urgent {
    border-left-color: var(--yaser-warning);
    background: rgba(251, 191, 36, 0.25);
}

.spt-active-item.spt-warning-critical {
    border-left-color: var(--yaser-danger);
    background: rgba(239, 68, 68, 0.23);
}

.spt-badge,
.spt-warning-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.spt-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.spt-badge-today {
    background: var(--yaser-success);
    border: none;
}

.spt-badge-tomorrow {
    background: var(--yaser-blue);
    border: none;
}

.spt-warning-badge {
    background: var(--yaser-danger);
    color: #ffffff;
    border: none;
}

.spt-expired-item {
    border-left-color: var(--yaser-danger);
    opacity: 0.9;
}

.spt-upcoming-lecture,
.spt-active-chapter {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.92rem;
}

.spt-upcoming-date,
.spt-active-days {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.spt-expired-item span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .spt-wrapper {
        padding: 24px 16px 32px;
        margin: 16px auto;
    }

    .spt-header {
        padding: 28px 20px;
    }

    .spt-heading {
        font-size: 1.2rem !important;
    }

    .spt-card {
        padding: 20px 18px;
    }

    .spt-chapters-grid,
    .spt-chapter-meta {
        grid-template-columns: 1fr;
    }

    .spt-table th,
    .spt-table td {
        padding: 10px 10px;
        font-size: 0.8rem;
    }

    .spt-stats-dashboard {
        padding: 24px 18px;
    }

    .spt-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
