/**
 * Necudah Home Page Styles
 *
 * Shared CSS for student, teacher, and admin home pages.
 *
 * @package Necudah
 */

/* Container */
.necudah-home {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* Welcome Header */
.necudah-home__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 24px 28px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.necudah-home__welcome {
    display: flex;
    align-items: center;
    gap: 16px;
}

.necudah-home__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.necudah-home__greeting h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
}

.necudah-home__greeting p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.necudah-home__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.necudah-home__badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

/* Stats Row */
.necudah-home__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.necudah-home__stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-top: 3px solid #e2e8f0;
    text-align: center;
}

.necudah-home__stat-card--primary {
    border-top-color: #6366f1;
}

.necudah-home__stat-card--success {
    border-top-color: #10b981;
}

.necudah-home__stat-card--warning {
    border-top-color: #f59e0b;
}

.necudah-home__stat-card--danger {
    border-top-color: #ef4444;
}

.necudah-home__stat-card--info {
    border-top-color: #3b82f6;
}

.necudah-home__stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.necudah-home__stat-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.necudah-home__stat-card--alert .necudah-home__stat-number {
    color: #f59e0b;
}

/* Section */
.necudah-home__section {
    margin-bottom: 24px;
}

.necudah-home__section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.necudah-home__section-title .dashicons {
    color: #6366f1;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Continue Learning Card */
.necudah-home__continue {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #6366f1;
    margin-bottom: 24px;
}

.necudah-home__continue-thumb {
    width: 180px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}

.necudah-home__continue-info {
    flex: 1;
    min-width: 0;
}

.necudah-home__continue-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
}

.necudah-home__continue-info h3 a {
    color: inherit;
    text-decoration: none;
}

.necudah-home__continue-info h3 a:hover {
    color: #6366f1;
}

.necudah-home__continue-meta {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.necudah-home__progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.necudah-home__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.necudah-home__progress-text {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

.necudah-home__continue-actions {
    display: flex;
    gap: 8px;
}

/* Attention Card */
.necudah-home__attention {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.necudah-home__attention .dashicons {
    color: #f59e0b;
    font-size: 22px;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.necudah-home__attention-content {
    flex: 1;
}

.necudah-home__attention-content p {
    margin: 0;
    font-size: 14px;
    color: #92400e;
}

.necudah-home__attention-content a {
    color: #92400e;
    font-weight: 600;
    text-decoration: underline;
}

.necudah-home__attention--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    border-left-color: #22c55e;
}

.necudah-home__attention--success .dashicons {
    color: #22c55e;
}

.necudah-home__attention--success .necudah-home__attention-content p {
    color: #166534;
}

/* Two Column Layout */
.necudah-home__two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.necudah-home__card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.necudah-home__card-header {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.necudah-home__card-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.necudah-home__card-header h3 .dashicons {
    color: #6366f1;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.necudah-home__card-header a {
    font-size: 12px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.necudah-home__card-header a:hover {
    text-decoration: underline;
}

.necudah-home__card-body {
    padding: 12px 20px;
}

/* Event Items */
.necudah-home__event-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.necudah-home__event-item:last-child {
    border-bottom: none;
}

.necudah-home__event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 44px;
    padding: 4px 8px;
    background: #f1f5f9;
    border-radius: 6px;
    flex-shrink: 0;
}

.necudah-home__event-date .month {
    font-size: 10px;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    line-height: 1;
}

.necudah-home__event-date .day {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.necudah-home__event-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 2px;
}

.necudah-home__event-info h4 a {
    color: inherit;
    text-decoration: none;
}

.necudah-home__event-info h4 a:hover {
    color: #6366f1;
}

.necudah-home__event-info .location {
    font-size: 12px;
    color: #94a3b8;
}

/* Notification Items */
.necudah-home__notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.necudah-home__notification-item:last-child {
    border-bottom: none;
}

.necudah-home__notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
    margin-top: 5px;
    flex-shrink: 0;
}

.necudah-home__notification-item--unread .necudah-home__notification-dot {
    background: #6366f1;
}

.necudah-home__notification-info h4 {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    margin: 0 0 2px;
}

.necudah-home__notification-info h4 a {
    color: inherit;
    text-decoration: none;
}

.necudah-home__notification-info h4 a:hover {
    color: #6366f1;
}

.necudah-home__notification-info .time {
    font-size: 12px;
    color: #94a3b8;
}

/* Empty State */
.necudah-home__empty {
    text-align: center;
    padding: 20px 16px;
    color: #94a3b8;
    font-size: 13px;
}

.necudah-home__empty .dashicons {
    display: block;
    font-size: 28px;
    width: 28px;
    height: 28px;
    margin: 0 auto 6px;
    color: #cbd5e1;
}

/* Quick Links */
.necudah-home__quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.necudah-home__link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s ease;
}

.necudah-home__link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #6366f1;
}

.necudah-home__link-card .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #6366f1;
}

.necudah-home__link-card span:last-child {
    font-size: 13px;
    font-weight: 500;
}

/* Course List (teacher/admin) */
.necudah-home__course-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.necudah-home__course-item:last-child {
    border-bottom: none;
}

.necudah-home__course-title {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.necudah-home__course-title a {
    color: inherit;
    text-decoration: none;
}

.necudah-home__course-title a:hover {
    color: #6366f1;
}

.necudah-home__course-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #64748b;
}

.necudah-home__status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.necudah-home__status-badge--published {
    background: #dcfce7;
    color: #166534;
}

.necudah-home__status-badge--draft {
    background: #fef3c7;
    color: #92400e;
}

/* Registrations Table (admin) */
.necudah-home__registrations {
    width: 100%;
    border-collapse: collapse;
}

.necudah-home__registrations th {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.necudah-home__registrations td {
    font-size: 13px;
    color: #1e293b;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.necudah-home__registrations tr:last-child td {
    border-bottom: none;
}

.necudah-home__user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.necudah-home__user-cell img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.necudah-home__type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

/* Buttons */
.necudah-home__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.necudah-home__btn--primary {
    background: #6366f1;
    color: #fff;
}

.necudah-home__btn--primary:hover {
    background: #4f46e5;
    color: #fff;
}

.necudah-home__btn--outline {
    background: transparent;
    color: #6366f1;
    border: 1px solid #e2e8f0;
}

.necudah-home__btn--outline:hover {
    border-color: #6366f1;
    background: #f5f3ff;
}

/* Responsive */
@media (max-width: 768px) {
    .necudah-home__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .necudah-home__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .necudah-home__two-col {
        grid-template-columns: 1fr;
    }

    .necudah-home__continue {
        flex-direction: column;
    }

    .necudah-home__continue-thumb {
        width: 100%;
        height: 160px;
    }

    .necudah-home__quick-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .necudah-home__header {
        padding: 16px 20px;
    }

    .necudah-home__greeting h1 {
        font-size: 18px;
    }

    .necudah-home__stat-card {
        padding: 14px;
    }

    .necudah-home__stat-number {
        font-size: 22px;
    }

    .necudah-home__continue-thumb {
        width: 140px;
        height: 100px;
    }

    .necudah-home__card-body {
        padding: 10px 14px;
    }

    .necudah-home__event-date .month {
        font-size: 11px;
    }

    .necudah-home__link-card {
        padding: 14px 10px;
    }
}

@media (max-width: 480px) {
    .necudah-home {
        padding: 16px 12px;
    }

    .necudah-home__stats {
        grid-template-columns: 1fr;
    }

    .necudah-home__quick-links {
        grid-template-columns: 1fr 1fr;
    }
}
