/* ═══════════════════════════════════════════
   EduConnect Dashboards — Front-End CSS
   Compatible EDME + Elementor
   ═══════════════════════════════════════════ */

:root {
    --edc-accent: #2D6A4F;
    --edc-accent-light: #D8F3DC;
    --edc-warm: #E07A5F;
    --edc-warm-light: #FDE8E0;
    --edc-blue: #457B9D;
    --edc-blue-light: #E3EEF5;
    --edc-dark: #1A1A2E;
    --edc-text: #2B2B2B;
    --edc-muted: #6B7280;
    --edc-border: #E8E6E1;
    --edc-bg: #FAFAF7;
    --edc-card: #FFFFFF;
    --edc-radius: 12px;
    --edc-radius-sm: 8px;
}

/* Dashboard container */
.edc-dashboard {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 20px 48px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--edc-text);
}

/* Header */
.edc-dashboard__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}
.edc-dashboard__role {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--edc-warm);
    margin-bottom: 4px;
}
.edc-dashboard__greeting {
    font-size: 28px;
    font-weight: 700;
    color: var(--edc-dark);
    margin: 0;
    line-height: 1.2;
}
.edc-dashboard__subtitle {
    font-size: 14px;
    color: var(--edc-muted);
    margin: 6px 0 0;
}
.edc-dashboard__subtitle a {
    color: var(--edc-accent);
    text-decoration: none;
    font-weight: 600;
}
.edc-dashboard__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--edc-warm), #C1440E);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.edc-dashboard__avatar--student {
    background: linear-gradient(135deg, var(--edc-accent), var(--edc-blue));
}

/* Stats grid */
.edc-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.edc-stat {
    background: var(--edc-card);
    border: 1px solid var(--edc-border);
    border-radius: var(--edc-radius);
    padding: 16px;
    text-align: center;
}
.edc-stat__value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--edc-dark);
    line-height: 1.2;
}
.edc-stat__label {
    display: block;
    font-size: 12px;
    color: var(--edc-muted);
    margin-top: 4px;
}

/* Tabs */
.edc-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}
.edc-tab {
    padding: 10px 22px;
    border: none;
    border-radius: var(--edc-radius-sm);
    background: transparent;
    color: var(--edc-muted);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.edc-tab:hover {
    background: var(--edc-border);
}
.edc-tab--active {
    background: var(--edc-dark);
    color: #fff;
}

.edc-tab-content {
    display: none;
}
.edc-tab-content--active {
    display: block;
}

/* Booking cards */
.edc-booking-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--edc-card);
    border: 1px solid var(--edc-border);
    border-radius: var(--edc-radius);
    margin-bottom: 10px;
    flex-wrap: wrap;
    transition: border-color 0.2s;
    border-left: 4px solid var(--edc-border);
}
.edc-booking-card--approved {
    border-left-color: var(--edc-accent);
}
.edc-booking-card--pending {
    border-left-color: var(--edc-warm);
    border-color: rgba(224, 122, 95, 0.3);
}
.edc-booking-card--completed {
    border-left-color: var(--edc-blue);
    opacity: 0.75;
}
.edc-booking-card--cancelled {
    border-left-color: #ccc;
    opacity: 0.5;
}

.edc-booking-card__time {
    font-size: 14px;
    font-weight: 600;
    color: var(--edc-dark);
    min-width: 110px;
    flex-shrink: 0;
}
.edc-booking-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.edc-booking-card__info {
    flex: 1;
    min-width: 160px;
}
.edc-booking-card__info strong {
    display: block;
    font-size: 14px;
    color: var(--edc-dark);
    margin-bottom: 2px;
}
.edc-booking-card__info span {
    font-size: 13px;
    color: var(--edc-muted);
}
.edc-booking-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Status badges */
.edc-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}
.edc-status--confirmed { background: var(--edc-accent-light); color: #1B4332; }
.edc-status--pending   { background: #FAEEDA; color: #633806; }
.edc-status--cancelled { background: #F1EFE8; color: #5F5E5A; }
.edc-status--completed { background: var(--edc-blue-light); color: #0C447C; }
.edc-status--noshow    { background: #FCEBEB; color: #791F1F; }

/* Buttons */
.edc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--edc-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
}
.edc-btn--sm {
    padding: 6px 12px;
    font-size: 12px;
}
.edc-btn--primary {
    background: var(--edc-blue);
    color: #fff;
}
.edc-btn--primary:hover { opacity: 0.9; }
.edc-btn--success {
    background: var(--edc-accent);
    color: #fff;
}
.edc-btn--success:hover { opacity: 0.9; }
.edc-btn--danger {
    background: #E24B4A;
    color: #fff;
}
.edc-btn--danger:hover { opacity: 0.9; }
.edc-btn--outline {
    background: transparent;
    border: 1px solid var(--edc-border);
    color: var(--edc-muted);
}
.edc-btn--outline:hover {
    border-color: var(--edc-dark);
    color: var(--edc-dark);
}

/* Week grid */
.edc-week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}
.edc-week-day {
    background: var(--edc-card);
    border: 1px solid var(--edc-border);
    border-radius: var(--edc-radius-sm);
    padding: 14px;
    min-height: 140px;
}
.edc-week-day--today {
    border-color: var(--edc-accent);
    border-width: 2px;
    background: var(--edc-accent-light);
}
.edc-week-day__header {
    font-size: 14px;
    font-weight: 600;
    color: var(--edc-dark);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--edc-border);
}
.edc-week-day__count {
    display: block;
    font-size: 12px;
    color: var(--edc-muted);
    font-weight: 400;
}
.edc-week-slot {
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 6px;
    margin-bottom: 6px;
    background: var(--edc-accent-light);
    color: #1B4332;
}
.edc-week-slot--pending { background: #FAEEDA; color: #633806; }
.edc-week-slot--free { background: #f5f5f3; color: #bbb; text-align: center; font-style: italic; }
.edc-week-slot__time { font-weight: 600; }
.edc-week-slot__name { display: block; margin-top: 2px; }
.edc-week-slot__service { display: block; color: inherit; opacity: 0.7; }

/* Student card */
.edc-student-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--edc-card);
    border: 1px solid var(--edc-border);
    border-radius: var(--edc-radius);
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.edc-student-card__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--edc-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--edc-blue);
    flex-shrink: 0;
}
.edc-student-card__info {
    flex: 1;
    min-width: 160px;
}
.edc-student-card__info strong {
    display: block;
    font-size: 14px;
    color: var(--edc-dark);
}
.edc-student-card__info span {
    font-size: 12px;
    color: var(--edc-muted);
}
.edc-student-card__actions {
    flex-shrink: 0;
}

/* Empty states */
.edc-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--edc-muted);
    font-size: 14px;
}
.edc-empty a {
    color: var(--edc-accent);
    font-weight: 600;
    text-decoration: none;
}

/* Section title */
.edc-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--edc-dark);
    margin: 0 0 16px;
}

/* Footer */
.edc-dashboard__footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--edc-border);
    text-align: center;
}

/* Notice */
.edc-notice {
    padding: 16px 20px;
    border-radius: var(--edc-radius);
    font-size: 14px;
    margin-bottom: 20px;
}
.edc-notice--error {
    background: #FCEBEB;
    color: #791F1F;
    border: 1px solid #F09595;
}

/* Login form */
.edc-login-form {
    max-width: 400px;
    margin: 40px auto;
    padding: 32px;
    background: var(--edc-card);
    border: 1px solid var(--edc-border);
    border-radius: var(--edc-radius);
}
.edc-login-form__title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 24px;
    color: var(--edc-dark);
}
.edc-login-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--edc-muted);
    margin-bottom: 6px;
}
.edc-login-form input[type="text"],
.edc-login-form input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--edc-border);
    border-radius: var(--edc-radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    box-sizing: border-box;
}
.edc-login-form input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--edc-accent);
    color: #fff;
    border: none;
    border-radius: var(--edc-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.edc-login-form input[type="submit"]:hover {
    opacity: 0.9;
}
.edc-login-form__forgot {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}
.edc-login-form__forgot a {
    color: var(--edc-muted);
    text-decoration: none;
}
.edc-login-redirect {
    text-align: center;
    padding: 24px;
}
.edc-login-redirect a {
    color: var(--edc-accent);
    font-weight: 600;
}

/* Loading state */
.edc-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Student cards */
.edc-student-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--edc-card, #fff);
    border: 1px solid var(--edc-border, #E8E6E1);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: box-shadow 0.15s;
}
.edc-student-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.edc-student-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--edc-accent-light, #D8F3DC);
    color: var(--edc-accent, #2D6A4F);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.edc-student-card__info {
    flex: 1;
    min-width: 0;
}
.edc-student-card__info strong {
    display: block;
    font-size: 14px;
    color: var(--edc-dark, #1A1A2E);
}
.edc-student-card__info span {
    font-size: 12px;
    color: var(--edc-muted, #6B7280);
}
.edc-student-card__actions { flex-shrink: 0; }

/* Week slot service name */
.edc-week-slot__service {
    display: block;
    font-size: 10px;
    color: var(--edc-muted, #6B7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 600px) {
    .edc-dashboard { padding: 20px 14px 32px; }
    .edc-dashboard__greeting { font-size: 22px; }
    .edc-stats { grid-template-columns: 1fr 1fr; }
    .edc-week-grid { grid-template-columns: 1fr; }
    .edc-booking-card { flex-direction: column; align-items: flex-start; }
    .edc-booking-card__actions { width: 100%; justify-content: flex-end; }
    .edc-student-card { flex-direction: column; text-align: center; }
}
