/* Rankers Education Teacher Portal — Public Frontend Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.rtp-wrap *,
.rtp-wrap *::before,
.rtp-wrap *::after {
    box-sizing: border-box;
}

.rtp-wrap {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    --rtp-primary: #1a56db;
    --rtp-primary-dark: #1245b5;
    --rtp-primary-light: #eff6ff;
    --rtp-success: #059669;
    --rtp-danger: #dc2626;
    --rtp-border: #e2e8f0;
    --rtp-bg: #f1f5f9;
    --rtp-card: #ffffff;
    --rtp-shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 10px 30px -5px rgba(0,0,0,.1);
    --rtp-radius: 16px;
    --rtp-radius-sm: 10px;
}

.rtp-section { width: 100%; }

/* ── Login Card ── */
.rtp-login-card {
    max-width: 460px;
    margin: 40px auto;
    background: var(--rtp-card);
    border-radius: var(--rtp-radius);
    box-shadow: var(--rtp-shadow);
    overflow: hidden;
}

.rtp-brand {
    background: linear-gradient(135deg, #1a56db 0%, #1e40af 60%, #3730a3 100%);
    padding: 36px 32px 28px;
    text-align: center;
    color: #fff;
}
.rtp-brand-icon { font-size: 48px; margin-bottom: 8px; display: block; }
.rtp-brand h2  { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.rtp-brand p   { margin: 4px 0 0; opacity: .8; font-size: 14px; font-weight: 500; }

.rtp-login-card form { padding: 28px 32px 32px; }

/* ── Fields ── */
.rtp-field { margin-bottom: 18px; }
.rtp-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.rtp-req { color: #dc2626; }
.rtp-field input,
.rtp-field select,
.rtp-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--rtp-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.rtp-field input:focus,
.rtp-field select:focus,
.rtp-field textarea:focus {
    border-color: var(--rtp-primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}
.rtp-field textarea { resize: vertical; min-height: 80px; }
.rtp-error { display: block; font-size: 12px; color: var(--rtp-danger); margin-top: 4px; min-height: 16px; }

/* ── Buttons ── */
.rtp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .18s;
    width: 100%;
    text-decoration: none;
}
.rtp-btn-primary {
    background: linear-gradient(135deg, #1a56db, #1e40af);
    color: #fff;
    border-color: #1a56db;
}
.rtp-btn-primary:hover { background: linear-gradient(135deg,#1245b5,#1a3a8f); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,86,219,.35); }
.rtp-btn-outline {
    background: transparent;
    color: var(--rtp-primary);
    border-color: var(--rtp-primary);
    width: auto;
    padding: 8px 18px;
    font-size: 13px;
}
.rtp-btn-outline:hover { background: var(--rtp-primary); color: #fff; }

/* Spinner */
.rtp-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rtp-spin .7s linear infinite;
    display: inline-block;
}
@keyframes rtp-spin { to { transform: rotate(360deg); } }

/* ── Messages ── */
.rtp-msg {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 12px;
}
.rtp-msg.rtp-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.rtp-msg.rtp-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Dashboard Top Bar ── */
.rtp-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.rtp-welcome { font-weight: 700; font-size: 18px; color: #1e293b; }

/* ── Tabs ── */
.rtp-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--rtp-border);
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}
.rtp-tabs::-webkit-scrollbar { display: none; }
.rtp-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: all .18s;
    border-radius: 6px 6px 0 0;
}
.rtp-tab:hover { color: var(--rtp-primary); background: var(--rtp-primary-light); }
.rtp-tab.active { color: var(--rtp-primary); border-bottom-color: var(--rtp-primary); }

/* ── Cards ── */
.rtp-card {
    background: var(--rtp-card);
    border-radius: var(--rtp-radius);
    box-shadow: var(--rtp-shadow);
    padding: 28px;
}
.rtp-section-title { margin: 0 0 20px; font-size: 16px; font-weight: 700; color: #1e293b; }

/* ── Profile Card ── */
.rtp-profile-card {
    background: var(--rtp-card);
    border-radius: var(--rtp-radius);
    box-shadow: var(--rtp-shadow);
    overflow: hidden;
}
.rtp-profile-header {
    background: linear-gradient(135deg, #1a56db 0%, #3730a3 100%);
    padding: 32px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: #fff;
}
.rtp-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    border: 3px solid rgba(255,255,255,.4);
    backdrop-filter: blur(8px);
}
.rtp-profile-name-wrap h3 { margin: 0; font-size: 22px; font-weight: 800; }
.rtp-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.rtp-badge-active { background: rgba(255,255,255,.25); color: #fff; }

.rtp-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
}
.rtp-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
}
.rtp-info-item:nth-child(even) { border-right: none; }
.rtp-info-item:nth-last-child(-n+2) { border-bottom: none; }
.rtp-info-icon { font-size: 22px; margin-top: 2px; flex-shrink: 0; }
.rtp-info-item small { display: block; font-size: 11px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 3px; }
.rtp-info-item strong { font-size: 14px; font-weight: 600; color: #1e293b; word-break: break-word; }

/* ── Form Grid ── */
.rtp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

/* ── Attendance History Table ── */
.rtp-history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rtp-history-table th {
    background: #f8fafc;
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #64748b;
    border-bottom: 1px solid var(--rtp-border);
}
.rtp-history-table td { padding: 11px 12px; border-bottom: 1px solid #f1f5f9; color: #1e293b; }
.rtp-history-table tbody tr:last-child td { border-bottom: none; }
.rtp-history-table tbody tr:hover td { background: #f8fafc; }
.rtp-badge-yes { background: #d1fae5; color: #065f46; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.rtp-badge-no  { background: #fee2e2; color: #991b1b; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }

.rtp-loading { text-align: center; padding: 32px; color: #94a3b8; font-size: 14px; }
.rtp-no-records { text-align: center; padding: 40px; color: #94a3b8; font-size: 14px; }

/* ── Overflow Wrapper for table ── */
.rtp-table-overflow { overflow-x: auto; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .rtp-login-card { margin: 16px; }
    .rtp-login-card form { padding: 20px; }
    .rtp-brand { padding: 28px 20px 20px; }
    .rtp-profile-grid { grid-template-columns: 1fr; }
    .rtp-info-item { border-right: none !important; }
    .rtp-info-item:last-child { border-bottom: none !important; }
    .rtp-form-grid { grid-template-columns: 1fr; }
    .rtp-card { padding: 20px; }
    .rtp-profile-header { flex-direction: column; text-align: center; }
}
