/* Teacher Portal — EduDash */
:root {
    --tp-sidebar: 260px;
    --tp-header-height: 72px;
    --tp-blue: #2563eb;
    --tp-blue-dark: #1d4ed8;
    --tp-green-active: #059669;
    --tp-bg: #f1f5f9;
    --tp-card: #ffffff;
    --tp-text: #1e293b;
    --tp-muted: #64748b;
    --tp-border: #e2e8f0;
    --tp-shadow: 0 4px 24px rgba(37, 99, 235, 0.08);
}

* { box-sizing: border-box; }

body.tp-body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--tp-bg);
    color: var(--tp-text);
    min-height: 100vh;
}

/* Custom scrollbar (global) */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
    -webkit-transition: background .3s;
    transition: background .3s
}

::-webkit-scrollbar-thumb {
    background: #e1e6f1
}

:hover::-webkit-scrollbar-thumb {
    background: #adb5bd
}

a { text-decoration: none; color: inherit; }

/* Login */
.tp-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
    background: #0f172a;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.tp-login-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 45%, #2563eb 100%);
    z-index: 0;
}

.tp-login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.45;
    pointer-events: none;
}

.tp-login-orb-1 {
    width: 420px;
    height: 420px;
    background: #60a5fa;
    top: -120px;
    right: -80px;
}

.tp-login-orb-2 {
    width: 320px;
    height: 320px;
    background: #818cf8;
    bottom: -80px;
    left: -60px;
}

.tp-login-orb-3 {
    width: 200px;
    height: 200px;
    background: #38bdf8;
    top: 40%;
    left: 35%;
    opacity: 0.25;
}

.tp-login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
}

.tp-login-wrap {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: var(--tp-card);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.tp-login-brand {
    background: linear-gradient(160deg, #1d4ed8 0%, #1e40af 50%, #172554 100%);
    color: #fff;
    padding: 40px 36px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.tp-login-brand::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.tp-login-brand-inner {
    position: relative;
    z-index: 1;
}

.tp-login-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.tp-login-logo-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.tp-login-logo-icon.has-logo {
    background: rgba(255, 255, 255, 0.92);
}

.tp-login-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.tp-login-logo-tag {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.75;
    font-weight: 600;
}

.tp-login-logo h1 {
    margin: 2px 0 0;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tp-login-tagline {
    margin: 0 0 28px;
    opacity: 0.88;
    line-height: 1.65;
    font-size: 0.95rem;
    max-width: 340px;
}

.tp-login-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tp-login-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.tp-login-feature:hover {
    background: rgba(255, 255, 255, 0.12);
}

.tp-login-feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.tp-login-feature strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.tp-login-feature span {
    font-size: 0.72rem;
    opacity: 0.75;
    line-height: 1.35;
}

.tp-login-brand-footer {
    position: relative;
    z-index: 1;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
    opacity: 0.7;
}

.tp-login-brand-footer i {
    margin-right: 6px;
}

.tp-login-form-panel {
    padding: 48px 44px;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.tp-login-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.tp-login-form-head {
    margin-bottom: 28px;
}

.tp-login-form-badge {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 16px;
    border: 1px solid #bfdbfe;
}

.tp-login-form h2 {
    margin: 0 0 6px;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.tp-login-form-head > p {
    margin: 0;
    color: var(--tp-muted);
    font-size: 0.92rem;
}

.tp-login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.tp-login-alert i {
    flex-shrink: 0;
    margin-top: 2px;
}

.tp-login-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tp-login-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.tp-login-input {
    display: flex;
    align-items: stretch;
    min-height: 52px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.tp-login-input:focus-within {
    border-color: #93c5fd;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.tp-login-input-icon {
    width: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    font-size: 1rem;
    border-right: 1px solid #e2e8f0;
}

.tp-login-input input {
    flex: 1;
    min-width: 0;
    width: 100%;
    border: none;
    background: transparent;
    padding: 14px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.4;
}

.tp-login-input input:focus {
    outline: none;
}

.tp-login-input input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.tp-login-input-password input {
    padding-right: 8px;
}

.tp-login-eye {
    flex-shrink: 0;
    width: 48px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: color 0.2s, background 0.2s;
}

.tp-login-eye:hover {
    color: #2563eb;
    background: #f8fafc;
}

.tp-login-submit {
    width: 100%;
    justify-content: center;
    padding: 15px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 6px;
    border-radius: 14px;
    letter-spacing: 0.02em;
}

.tp-login-submit span {
    flex: 1;
    text-align: center;
}

.tp-login-help {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #eff6ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 14px;
}

.tp-login-help-icon {
    width: 36px;
    height: 36px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tp-login-help strong {
    display: block;
    font-size: 0.88rem;
    color: #334155;
    margin-bottom: 4px;
}

.tp-login-help p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--tp-muted);
    line-height: 1.55;
}

.tp-login-help em {
    font-style: normal;
    color: #2563eb;
    font-weight: 500;
}

.tp-login-copyright {
    text-align: center;
    margin: 20px 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.tp-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.88rem;
}

.tp-alert-success {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #059669;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Layout */
.tp-wrapper {
    display: flex;
    min-height: 100vh;
}

.tp-sidebar {
    width: var(--tp-sidebar);
    background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}
.tp-sidebar::-webkit-scrollbar {
    width: 8px;
}
.tp-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.tp-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.24);
    border: none;
    border-radius: 8px;
}
.tp-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.42);
    border: none;
}

.tp-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.tp-brand-text {
    flex: 1;
    min-width: 0;
}

.tp-brand-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    overflow: hidden;
    flex-shrink: 0;
}

.tp-brand-icon.has-logo {
    background: rgba(255, 255, 255, 0.92);
}

.tp-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.tp-brand h2 {
    margin: 0;
    font-size: 1.15rem;
    word-break: break-word;
}

.tp-brand span {
    font-size: 0.75rem;
    opacity: 0.75;
}

.tp-sidebar-close {
    display: none;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.15s, border-color 0.15s;
}

.tp-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

.tp-user-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tp-user-card img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.tp-user-card strong {
    display: block;
    font-size: 0.92rem;
}

.tp-user-card small {
    opacity: 0.75;
    font-size: 0.78rem;
}

.tp-nav {
    flex: 1;
    padding: 16px 12px;
}

.tp-nav-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
    padding: 8px 12px;
    margin: 0;
}

.tp-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 4px;
    transition: all 0.2s;
}

.tp-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tp-nav a.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 600;
}

.tp-nav a i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.tp-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tp-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #fca5a5;
    font-weight: 500;
    font-size: 0.9rem;
}

.tp-logout:hover {
    background: rgba(239, 68, 68, 0.15);
}

.tp-main {
    flex: 1;
    margin-left: var(--tp-sidebar);
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar — matches admin-header */
.tp-topbar {
    height: var(--tp-header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0 28px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--tp-border);
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 1px 8px rgba(43, 54, 116, 0.04);
}

.tp-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.tp-header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
}

.tp-breadcrumb-root {
    color: var(--tp-muted);
    font-weight: 500;
}

.tp-header-breadcrumb > i {
    font-size: 0.55rem;
    color: #cbd5e1;
}

.tp-breadcrumb-current {
    color: var(--tp-text);
    font-weight: 600;
}

.tp-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 560px;
}

.tp-search-bar {
    display: flex;
    align-items: center;
    background: var(--tp-card);
    border-radius: 14px;
    border: 1.5px solid var(--tp-border);
    padding: 0 18px;
    width: 100%;
    height: 48px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(43, 54, 116, 0.07);
    position: relative;
}

.tp-search-bar:focus-within {
    border-color: var(--tp-green-active);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12), 0 4px 16px rgba(43, 54, 116, 0.1);
}

.tp-search-bar > i {
    color: #94a3b8;
    margin-right: 12px;
    font-size: 1rem;
    flex-shrink: 0;
}

.tp-search-bar:focus-within > i {
    color: var(--tp-green-active);
}

.tp-search-bar input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-family: inherit;
    color: var(--tp-text);
    font-size: 0.95rem;
    font-weight: 500;
}

.tp-search-bar input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.tp-search-shortcut {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 0.72rem;
    font-family: inherit;
    color: #64748b;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 8px;
}

.tp-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--tp-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    max-height: 320px;
    overflow-y: auto;
    z-index: 200;
}

.tp-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
}

.tp-search-item:hover {
    background: #f0fdf4;
}

.tp-search-item i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ecfdf5;
    color: var(--tp-green-active);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-search-item strong {
    display: block;
    font-size: 0.9rem;
}

.tp-search-item span {
    font-size: 0.78rem;
    color: var(--tp-muted);
}

.tp-search-empty {
    padding: 16px;
    text-align: center;
    color: var(--tp-muted);
    font-size: 0.88rem;
}

.tp-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.tp-header-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background-color: #f8fafc;
    border: 1px solid var(--tp-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tp-text);
    font-size: 1.05rem;
    transition: all 0.2s ease;
    position: relative;
}

.tp-header-icon-btn:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--tp-green-active);
}

.tp-header-user {
    position: relative;
    margin-left: 6px;
    z-index: 200;
}

.tp-header-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--tp-border);
    border-radius: 12px;
    background: var(--tp-card);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tp-header-user-trigger:hover,
.tp-header-user.open .tp-header-user-trigger {
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(43, 54, 116, 0.06);
}

.tp-header-user-trigger img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
}

.tp-header-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.tp-header-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tp-text);
    line-height: 1.2;
}

.tp-header-user-role {
    font-size: 0.72rem;
    color: var(--tp-muted);
    margin-top: 1px;
}

.tp-header-user-chevron {
    font-size: 0.65rem;
    color: var(--tp-muted);
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.tp-header-user.open .tp-header-user-chevron {
    transform: rotate(180deg);
}

.tp-header-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: var(--tp-card);
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(43, 54, 116, 0.12);
    display: none;
    z-index: 300;
    overflow: hidden;
}

.tp-header-user.open .tp-header-user-dropdown {
    display: block;
}

.tp-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--tp-border);
    background: #f8fafc;
}

.tp-dropdown-header img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
}

.tp-dropdown-header strong {
    display: block;
    font-size: 0.9rem;
    color: var(--tp-text);
}

.tp-dropdown-header span {
    font-size: 0.75rem;
    color: var(--tp-muted);
}

.tp-dropdown-menu {
    padding: 8px;
    list-style: none;
    margin: 0;
}

.tp-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #64748b;
    transition: all 0.2s ease;
}

.tp-dropdown-menu li a i {
    width: 18px;
    font-size: 0.85rem;
    color: var(--tp-muted);
}

.tp-dropdown-menu li a:hover {
    background: #f1f5f9;
    color: var(--tp-text);
}

.tp-dropdown-menu li a:hover i {
    color: var(--tp-green-active);
}

.tp-dropdown-footer {
    padding: 8px;
    border-top: 1px solid var(--tp-border);
}

.tp-dropdown-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #ef4444;
    font-weight: 500;
    transition: background 0.2s ease;
}

.tp-dropdown-footer a:hover {
    background: #fef2f2;
}

.tp-page-title-block {
    margin-bottom: 20px;
}

.tp-page-title-block h1 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tp-text);
}

.tp-page-title-block p {
    margin: 0;
    color: var(--tp-muted);
    font-size: 0.9rem;
}

.tp-content {
    padding: 24px 28px;
    flex: 1;
    overflow-x: clip;
}

.tp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 30px;
    background-color: var(--tp-card);
    border-top: 1px solid var(--tp-border);
    margin-top: auto;
    min-width: 0;
    width: 100%;
}

.tp-footer-left {
    min-width: 0;
    flex: 1 1 auto;
}

.tp-footer p {
    color: var(--tp-muted);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.45;
    word-break: break-word;
}

.tp-footer strong {
    color: var(--tp-text);
}

.tp-footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    min-width: 0;
}

.tp-footer-right a {
    color: var(--tp-muted);
    font-size: 0.9rem;
    transition: color 0.3s ease;
    text-decoration: none;
}

.tp-footer-right a:hover {
    color: var(--tp-green-active);
}

.tp-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 1rem;
    color: var(--tp-text);
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tp-menu-toggle:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Buttons */
.tp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.tp-btn-primary {
    background: linear-gradient(135deg, var(--tp-blue), var(--tp-blue-dark));
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.tp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.tp-btn-outline {
    background: #fff;
    color: var(--tp-blue);
    border: 1px solid #bfdbfe;
}

.tp-btn-outline:hover {
    background: #eff6ff;
}

/* Stats */
.tp-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.tp-stat-card {
    background: var(--tp-card);
    border: 1px solid var(--tp-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--tp-shadow);
}

.tp-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.tp-stat-icon.blue { background: #eff6ff; color: #2563eb; }
.tp-stat-icon.green { background: #ecfdf5; color: #059669; }
.tp-stat-icon.orange { background: #fff7ed; color: #ea580c; }
.tp-stat-icon.purple { background: #f5f3ff; color: #7c3aed; }
.tp-stat-icon.red { background: #fef2f2; color: #dc2626; }

.tp-stat-card span {
    display: block;
    font-size: 0.76rem;
    color: var(--tp-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.tp-stat-card strong {
    font-size: 1.35rem;
}

/* Cards & grid */
.tp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.tp-card {
    background: var(--tp-card);
    border: 1px solid var(--tp-border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--tp-shadow);
}

.tp-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.tp-card-head h3 {
    margin: 0;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tp-card-head h3 i {
    color: var(--tp-blue);
}

.tp-card-link {
    font-size: 0.82rem;
    color: var(--tp-blue);
    font-weight: 600;
}

/* Schedule list */
.tp-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tp-schedule-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--tp-border);
}

.tp-schedule-item.is-now {
    border-color: #93c5fd;
    background: linear-gradient(145deg, #eff6ff, #f0fdf4);
}

.tp-period-num {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--tp-blue), var(--tp-blue-dark));
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.tp-schedule-item.is-free .tp-period-num {
    background: #e2e8f0;
    color: #94a3b8;
}

.tp-schedule-body {
    flex: 1;
    min-width: 0;
}

.tp-schedule-body strong {
    display: block;
    font-size: 0.95rem;
}

.tp-schedule-body span {
    font-size: 0.82rem;
    color: var(--tp-muted);
}

.tp-schedule-time {
    font-size: 0.78rem;
    color: var(--tp-muted);
    font-weight: 600;
    white-space: nowrap;
}

/* Class chips */
.tp-class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.tp-class-chip {
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    padding: 16px;
    transition: all 0.2s;
}

.tp-class-chip:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.tp-class-chip strong {
    display: block;
    margin-bottom: 4px;
}

.tp-class-chip span {
    font-size: 0.82rem;
    color: var(--tp-muted);
}

/* Profile page */
.tp-profile-hero {
    position: relative;
    margin: -8px -8px 20px;
}

.tp-profile-cover {
    height: 140px;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #0891b2 100%);
    border-radius: 18px 18px 0 0;
}

.tp-profile-hero-inner {
    padding: 0 24px 24px;
    margin-top: -56px;
}

.tp-profile-hero-card {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 24px;
    background: var(--tp-card);
    border: 1px solid var(--tp-border);
    border-radius: 18px;
    box-shadow: var(--tp-shadow);
}

.tp-profile-photo-ring {
    flex-shrink: 0;
    padding: 4px;
    background: linear-gradient(145deg, #93c5fd, #2563eb);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.tp-profile-photo-ring img {
    display: block;
    width: 108px;
    height: 108px;
    border-radius: 16px;
    object-fit: cover;
    border: 3px solid #fff;
}

.tp-profile-identity {
    flex: 1;
    min-width: 200px;
    padding-bottom: 4px;
}

.tp-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tp-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.tp-profile-badge i.fa-circle {
    font-size: 6px;
}

.tp-profile-badge.is-active {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #bbf7d0;
}

.tp-profile-badge.is-inactive {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.tp-profile-badge.is-subject {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.tp-profile-identity h2 {
    margin: 0 0 4px;
    font-size: 1.45rem;
    color: var(--tp-text);
}

.tp-profile-role {
    margin: 0 0 6px;
    font-size: 0.92rem;
    color: var(--tp-muted);
    font-weight: 500;
}

.tp-profile-id {
    margin: 0;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
}

.tp-profile-id i {
    color: var(--tp-blue);
    margin-right: 4px;
}

.tp-profile-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto;
    align-self: center;
}

.tp-profile-stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.tp-profile-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: var(--tp-card);
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    box-shadow: var(--tp-shadow);
}

.tp-profile-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.tp-profile-stat-icon.blue { background: #eff6ff; color: #2563eb; }
.tp-profile-stat-icon.green { background: #ecfdf5; color: #059669; }
.tp-profile-stat-icon.orange { background: #fff7ed; color: #ea580c; }
.tp-profile-stat-icon.purple { background: #f5f3ff; color: #7c3aed; }

.tp-profile-stat span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--tp-muted);
    font-weight: 600;
}

.tp-profile-stat strong {
    display: block;
    font-size: 0.92rem;
    margin-top: 2px;
    color: var(--tp-text);
}

.tp-profile-section .tp-card-head {
    margin-bottom: 16px;
}

.tp-profile-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.tp-profile-field {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 12px;
    transition: border-color 0.2s, background 0.2s;
}

.tp-profile-field:hover {
    border-color: #bfdbfe;
    background: #f0f9ff;
}

.tp-profile-field-full {
    grid-column: 1 / -1;
}

.tp-profile-field-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--tp-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.tp-profile-field label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tp-muted);
    font-weight: 600;
    margin-bottom: 3px;
}

.tp-profile-field span {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--tp-text);
    word-break: break-word;
}

.tp-profile-salary {
    background: linear-gradient(145deg, #eff6ff, #f0fdf4);
    border-color: #bfdbfe;
}

.tp-profile-salary .tp-profile-field-icon {
    background: #2563eb;
    color: #fff;
}

.tp-profile-address-summary {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.5;
}

.tp-profile-address-summary i {
    color: var(--tp-blue);
    margin-top: 3px;
    flex-shrink: 0;
}

.tp-profile-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 0.78rem;
    color: var(--tp-muted);
}

.tp-profile-note i {
    color: #94a3b8;
}

.tp-profile-remarks {
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 12px;
    line-height: 1.65;
    color: #475569;
    font-size: 0.92rem;
}

/* Signature card */
.tp-sign-desc {
    margin: 0 0 16px;
    color: var(--tp-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.tp-sign-wrap {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: stretch;
}

.tp-sign-preview {
    flex: 1;
    min-width: 240px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background:
        linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
        linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
        linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
    padding: 16px;
}

.tp-sign-preview.has-image {
    border-style: solid;
    border-color: var(--tp-border);
    background: #fff;
}

.tp-sign-preview img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.tp-sign-empty {
    color: #94a3b8;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tp-sign-form {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.tp-sign-file-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

.tp-sign-file-label:hover {
    border-color: var(--tp-green-active);
    color: var(--tp-green-active);
}

.tp-sign-file-label input[type="file"] {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 400;
    cursor: pointer;
}

.tp-sign-hint {
    font-size: 0.78rem;
    color: #94a3b8;
}

.tp-sign-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.tp-profile-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 18px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    font-size: 0.84rem;
    color: #92400e;
    line-height: 1.5;
}

.tp-profile-footer-note i {
    color: #d97706;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Legacy profile (dashboard etc.) */
.tp-profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--tp-card);
    border-radius: 18px;
    border: 1px solid var(--tp-border);
    box-shadow: var(--tp-shadow);
}

.tp-profile-header img {
    width: 100px;
    height: 100px;
    border-radius: 18px;
    object-fit: cover;
    border: 3px solid #bfdbfe;
}

.tp-profile-header h2 {
    margin: 0 0 6px;
}

.tp-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.tp-meta-chip {
    background: #eff6ff;
    color: #2563eb;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tp-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.tp-detail-item {
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--tp-border);
}

.tp-detail-item label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tp-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.tp-detail-item span {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Timetable visual */
.tp-tt-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 22px 24px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #0891b2 100%);
    border-radius: 18px;
    color: #fff;
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.22);
}

.tp-tt-hero h2 {
    margin: 0 0 6px;
    font-size: 1.3rem;
}

.tp-tt-hero p {
    margin: 0;
    font-size: 0.88rem;
    opacity: 0.92;
}

.tp-tt-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tp-tt-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.tp-tt-hero.is-orange {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 50%, #f59e0b 100%);
    box-shadow: 0 8px 28px rgba(234, 88, 12, 0.22);
}

.tp-tt-hero.is-green {
    background: linear-gradient(135deg, #047857 0%, #059669 50%, #10b981 100%);
    box-shadow: 0 8px 28px rgba(5, 150, 105, 0.22);
}

.tp-tt-hero.is-purple {
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #8b5cf6 100%);
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.22);
}

.tp-tt-hero.is-teal {
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 50%, #06b6d4 100%);
    box-shadow: 0 8px 28px rgba(8, 145, 178, 0.22);
}

.tp-tt-hero.is-slate {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    box-shadow: 0 8px 28px rgba(51, 65, 85, 0.25);
}

.tp-tt-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tp-tt-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    transition: all 0.2s;
}

.tp-tt-hero-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.tp-tt-hero-btn.is-solid {
    background: #fff;
    color: #1d4ed8;
    border-color: #fff;
}

.tp-tt-hero-btn.is-solid:hover {
    background: #eff6ff;
    color: #1e40af;
}

.tp-tt-today-panel {
    margin-bottom: 20px;
}

.tp-tt-today-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.tp-tt-today-card {
    flex: 0 0 min(220px, 85vw);
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    transition: all 0.2s;
}

.tp-tt-today-card.is-class {
    background: linear-gradient(145deg, #eff6ff, #f0fdf4);
    border-color: #bfdbfe;
}

.tp-tt-today-card.is-now {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2), 0 8px 20px rgba(37, 99, 235, 0.12);
    transform: translateY(-2px);
}

.tp-tt-today-card.is-free {
    opacity: 0.75;
}

.tp-tt-today-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.tp-tt-today-period {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 28px;
    padding: 0 10px;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
}

.tp-tt-today-card.is-free .tp-tt-today-period {
    background: #cbd5e1;
    color: #64748b;
}

.tp-tt-today-time {
    font-size: 0.72rem;
    color: var(--tp-muted);
    font-weight: 600;
}

.tp-tt-today-card strong {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 4px;
    color: var(--tp-text);
}

.tp-tt-today-card span {
    font-size: 0.8rem;
    color: var(--tp-muted);
}

span.tp-tt-today-period{
    color: #b1d1ff!important;
}

.tp-tt-today-room {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 3px 8px;
    background: #fff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    font-size: 0.72rem;
    color: #2563eb;
    font-weight: 600;
}

.tp-tt-view-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 12px;
    width: fit-content;
}

.tp-tt-view-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--tp-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.tp-tt-view-tab:hover {
    color: var(--tp-text);
}

.tp-tt-view-tab.is-active {
    background: #fff;
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.tp-tt-view-panel {
    display: none;
}

.tp-tt-view-panel.is-active {
    display: block;
}

.tp-tt-grid {
    overflow-x: auto;
    padding-bottom: 4px;
}

.tp-tt-row {
    display: grid;
    grid-template-columns: 72px repeat(8, minmax(108px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
    min-width: 960px;
}

.tp-tt-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
    font-size: 0.78rem;
    border-radius: 12px;
    padding: 8px 4px;
    min-height: 52px;
}

.tp-tt-row:first-child .tp-tt-day {
    background: linear-gradient(180deg, #1e40af, #2563eb);
    color: #fff;
    min-height: 56px;
}

.tp-tt-slot {
    padding: 10px 10px 8px;
    border-radius: 12px;
    border: 1px solid var(--tp-border);
    font-size: 0.76rem;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s;
}

.tp-tt-slot.filled {
    background: linear-gradient(160deg, #eff6ff 0%, #ecfdf5 100%);
    border-color: #bfdbfe;
}

.tp-tt-slot.filled:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}

.tp-tt-slot.free {
    background: #f8fafc;
    color: #cbd5e1;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
}

.tp-tt-slot.free i {
    font-size: 0.9rem;
}

.tp-tt-slot.is-now {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.tp-tt-slot-subject {
    display: block;
    font-weight: 700;
    font-size: 0.8rem;
    color: #1e40af;
    margin-bottom: 4px;
    line-height: 1.2;
}

.tp-tt-slot-class {
    display: block;
    color: #475569;
    font-weight: 600;
    font-size: 0.74rem;
    margin-bottom: 4px;
}

.tp-tt-slot-room {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    font-size: 0.68rem;
    color: #2563eb;
    font-weight: 600;
    width: fit-content;
}

.tp-tt-day-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tp-tt-day-group {
    border: 1px solid var(--tp-border);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.tp-tt-day-group.is-today {
    border-color: #93c5fd;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.tp-tt-day-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--tp-border);
}

.tp-tt-day-group.is-today .tp-tt-day-group-head {
    background: linear-gradient(90deg, #eff6ff, #f0fdf4);
}

.tp-tt-day-group-head strong {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tp-tt-day-count {
    font-size: 0.78rem;
    color: var(--tp-muted);
    font-weight: 600;
}

.tp-tt-period-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    padding: 14px;
}

.tp-tt-period-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 12px;
}

.tp-tt-period-card.is-now {
    border-color: #2563eb;
    background: linear-gradient(145deg, #eff6ff, #ecfdf5);
}

.tp-tt-period-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.tp-tt-period-body strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.tp-tt-period-body span {
    display: block;
    font-size: 0.78rem;
    color: var(--tp-muted);
    line-height: 1.4;
}

.tp-tt-period-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.tp-tt-period-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
}

.tp-tt-empty-day {
    padding: 18px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.84rem;
}

/* Forms */
.tp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.tp-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #475569;
}

.tp-field input,
.tp-field select,
.tp-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: inherit;
}

.tp-field input:focus,
.tp-field select:focus,
.tp-field textarea:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.tp-field-full {
    grid-column: 1 / -1;
}

/* Table */
.tp-table-wrap {
    overflow-x: auto;
}

.tp-table {
    width: 100%;
    border-collapse: collapse;
}

.tp-table th,
.tp-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.88rem;
}

.tp-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--tp-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.tp-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--tp-muted);
}

.tp-empty i {
    font-size: 2.5rem;
    opacity: 0.3;
    margin-bottom: 12px;
    display: block;
}

.tp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 190;
}

.tp-overlay.open {
    display: block;
}

.tp-btn-sm {
    padding: 8px 14px;
    font-size: 0.82rem;
}

/* Shared page components */
.tp-page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 22px 24px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 55%, #0891b2 100%);
    border-radius: 18px;
    color: #fff;
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.22);
}

.tp-page-hero-greet {
    margin: 0 0 4px;
    font-size: 0.82rem;
    opacity: 0.88;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tp-page-hero h2 {
    margin: 0 0 6px;
    font-size: 1.35rem;
}

.tp-page-hero-desc {
    margin: 0;
    font-size: 0.88rem;
    opacity: 0.92;
}

.tp-page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tp-page-hero-actions .tp-btn-outline {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.tp-page-hero-actions .tp-btn-outline:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.tp-page-hero-actions .tp-btn-primary {
    background: #fff;
    color: #1d4ed8;
    box-shadow: none;
}

.tp-page-hero-actions .tp-btn-primary:hover {
    background: #eff6ff;
    color: #1e40af;
}

.tp-stat-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.tp-stat-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.tp-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.tp-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.tp-action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    transition: all 0.2s;
    color: inherit;
}

.tp-action-card:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    transform: translateY(-1px);
}

.tp-action-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.tp-action-card-icon.blue { background: #eff6ff; color: #2563eb; }
.tp-action-card-icon.green { background: #ecfdf5; color: #059669; }
.tp-action-card-icon.orange { background: #fff7ed; color: #ea580c; }
.tp-action-card-icon.purple { background: #f5f3ff; color: #7c3aed; }

.tp-action-card strong {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 2px;
}

.tp-action-card span {
    font-size: 0.78rem;
    color: var(--tp-muted);
}

.tp-filter-card {
    margin-bottom: 20px;
}

.tp-filter-card .tp-card-head {
    margin-bottom: 16px;
}

.tp-filter-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    align-items: end;
}

.tp-filter-form .tp-field-btn {
    display: flex;
    align-items: flex-end;
}

.tp-att-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.tp-att-stat {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--tp-border);
    text-align: center;
}

.tp-att-stat span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--tp-muted);
    margin-bottom: 4px;
}

.tp-att-stat strong {
    font-size: 1.4rem;
}

.tp-att-stat.is-present { background: #ecfdf5; border-color: #bbf7d0; }
.tp-att-stat.is-present strong { color: #059669; }
.tp-att-stat.is-absent { background: #fef2f2; border-color: #fecaca; }
.tp-att-stat.is-absent strong { color: #dc2626; }
.tp-att-stat.is-late { background: #fffbeb; border-color: #fde68a; }
.tp-att-stat.is-late strong { color: #d97706; }
.tp-att-stat.is-half { background: #eff6ff; border-color: #bfdbfe; }
.tp-att-stat.is-half strong { color: #2563eb; }

.tp-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--tp-border);
}

.tp-bulk-bar span {
    font-size: 0.82rem;
    color: var(--tp-muted);
    font-weight: 600;
    margin-right: 4px;
    align-self: center;
}

.tp-bulk-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--tp-border);
    background: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.tp-bulk-btn:hover { border-color: #93c5fd; background: #eff6ff; }
.tp-bulk-btn.is-present { color: #059669; border-color: #bbf7d0; }
.tp-bulk-btn.is-absent { color: #dc2626; border-color: #fecaca; }

.tp-att-select {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--tp-border);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    min-width: 130px;
    cursor: pointer;
    background: #fff;
}

.tp-att-select[data-status="Present"] { background: #ecfdf5; border-color: #bbf7d0; color: #059669; }
.tp-att-select[data-status="Absent"] { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.tp-att-select[data-status="Late"] { background: #fffbeb; border-color: #fde68a; color: #d97706; }
.tp-att-select[data-status="Half Day"] { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }

.tp-student-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tp-student-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(145deg, #dbeafe, #eff6ff);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.tp-hw-card {
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    transition: border-color 0.2s;
}

.tp-hw-card:hover {
    border-color: #c4b5fd;
}

.tp-hw-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.tp-hw-card-head strong {
    font-size: 0.95rem;
    color: var(--tp-text);
}

.tp-hw-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f5f3ff;
    color: #7c3aed;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.tp-hw-meta {
    font-size: 0.8rem;
    color: var(--tp-muted);
    margin-bottom: 6px;
}

.tp-hw-desc {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

.tp-hw-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tp-form-panel {
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    padding: 18px;
}

.tp-pwd-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

.tp-pwd-card {
    max-width: 100%;
}

.tp-pwd-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(145deg, #dbeafe, #eff6ff);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.tp-pwd-tips {
    padding: 22px;
}

.tp-pwd-tips h4 {
    margin: 0 0 14px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tp-pwd-tips h4 i { color: #2563eb; }

.tp-pwd-tip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tp-pwd-tip-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.84rem;
    color: #475569;
    line-height: 1.45;
}

.tp-pwd-tip-list li i {
    color: #059669;
    margin-top: 3px;
    flex-shrink: 0;
}

.tp-alert-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 0.88rem;
}

.tp-alert-warning i {
    color: #d97706;
    font-size: 1.1rem;
    margin-top: 2px;
}

.tp-alert-warning strong {
    display: block;
    margin-bottom: 4px;
}

.tp-alert-warning p {
    margin: 0;
    font-size: 0.84rem;
    opacity: 0.95;
}

.tp-alert-warning code {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

.tp-tt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--tp-border);
}

.tp-tt-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--tp-muted);
    font-weight: 600;
}

.tp-tt-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid var(--tp-border);
}

.tp-tt-legend-dot.filled { background: linear-gradient(145deg, #eff6ff, #f0fdf4); border-color: #bfdbfe; }
.tp-tt-legend-dot.free { background: #f8fafc; }
.tp-tt-legend-dot.today { outline: 2px solid #2563eb; outline-offset: 1px; }

.tp-tt-row.is-today {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
    border-radius: 10px;
    padding: 2px;
    background: rgba(239, 246, 255, 0.5);
}

.tp-tt-row.is-today .tp-tt-day:first-child {
    background: #2563eb;
    color: #fff;
}

.tp-tt-period-head {
    font-size: 0.65rem;
    color: #b1d1ff;
    font-weight: 600;
    margin-top: 2px;
}

.tp-table tbody tr:hover {
    background: #f8fafc;
}

.tp-table td strong {
    color: var(--tp-text);
}

.tp-schedule-item.is-now {
    border-color: #2563eb;
    background: linear-gradient(145deg, #eff6ff, #ecfdf5);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.tp-schedule-now-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #2563eb;
    color: #fff;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    margin-left: 8px;
}

/* Notices */
.tp-notice-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tp-notice-card {
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    border-left: 4px solid #2563eb;
}

.tp-notice-card.is-important {
    border-left-color: #d97706;
    background: #fffbeb;
}

.tp-notice-card.is-urgent {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.tp-notice-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.tp-notice-card-head strong {
    font-size: 0.98rem;
    color: var(--tp-text);
}

.tp-notice-priority {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #fef2f2;
    color: #dc2626;
    white-space: nowrap;
}

.tp-notice-card.is-important .tp-notice-priority {
    background: #fffbeb;
    color: #d97706;
}

.tp-notice-body {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 10px;
}

.tp-notice-foot {
    font-size: 0.78rem;
    color: var(--tp-muted);
    font-weight: 600;
}

.tp-notice-card {
    transition: box-shadow 0.15s;
}

.tp-notice-card:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.tp-notice-empty-state {
    padding: 48px 24px;
    text-align: center;
}

.tp-notice-empty-state h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--tp-text);
}

.tp-notice-empty-state p {
    margin: 0;
    color: var(--tp-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.tp-empty-icon-wrap {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #ea580c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.tp-dash-notices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tp-dash-notice-item {
    display: block;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}

.tp-dash-notice-item:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.tp-dash-notice-item.is-urgent {
    border-left: 3px solid #dc2626;
    background: #fef2f2;
}

.tp-dash-notice-item strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 3px;
}

.tp-dash-notice-item span {
    font-size: 0.76rem;
    color: var(--tp-muted);
}

.tp-dash-notice-empty {
    color: var(--tp-muted);
    font-size: 0.88rem;
    text-align: center;
    padding: 20px;
    margin: 0;
}

/* Leave */
.tp-leave-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 24px 26px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 45%, #f59e0b 100%);
    border-radius: 18px;
    color: #fff;
    box-shadow: 0 8px 28px rgba(234, 88, 12, 0.25);
}

.tp-leave-hero-greet {
    margin: 0 0 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tp-leave-hero h2 {
    margin: 0 0 8px;
    font-size: 1.4rem;
    font-weight: 800;
}

.tp-leave-hero-desc {
    margin: 0 0 14px;
    font-size: 0.88rem;
    opacity: 0.92;
    max-width: 520px;
    line-height: 1.5;
}

.tp-leave-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tp-leave-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 0.76rem;
    font-weight: 700;
}

.tp-leave-hero-chip.is-active {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.45);
}

.tp-leave-hero-chip.is-active i {
    font-size: 0.5rem;
    animation: tp-leave-pulse 1.5s ease infinite;
}

@keyframes tp-leave-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.tp-leave-hero-aside {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.tp-leave-hero-stat {
    min-width: 110px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    text-align: center;
}

.tp-leave-hero-stat span {
    display: block;
    font-size: 0.72rem;
    opacity: 0.88;
    margin-bottom: 4px;
    font-weight: 600;
}

.tp-leave-hero-stat strong {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.tp-leave-active-banner,
.tp-leave-upcoming-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 14px;
    border: 1px solid;
}

.tp-leave-active-banner {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #bbf7d0;
}

.tp-leave-upcoming-banner {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #bfdbfe;
}

.tp-leave-active-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.tp-leave-active-banner .tp-leave-active-icon {
    background: #fff;
    color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.tp-leave-upcoming-banner .tp-leave-active-icon {
    background: #fff;
    color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.tp-leave-active-banner strong,
.tp-leave-upcoming-banner strong {
    display: block;
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 4px;
}

.tp-leave-active-banner p,
.tp-leave-upcoming-banner p {
    margin: 0;
    font-size: 0.84rem;
    color: #475569;
}

.tp-leave-stats {
    margin-bottom: 20px;
}

.tp-leave-layout {
    display: grid;
    grid-template-columns: minmax(320px, 500px) 1fr;
    gap: 20px;
    align-items: start;
}

.tp-leave-form-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tp-leave-form-card .tp-card-head {
    border-bottom: 1px solid var(--tp-border);
}

.tp-leave-date-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 14px;
}

.tp-leave-date-field {
    flex: 1;
    min-width: 0;
}

.tp-leave-date-field label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tp-leave-date-field label i {
    color: #ea580c;
    font-size: 0.82rem;
}

.tp-leave-date-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #ea580c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.tp-leave-duration-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1px solid #fed7aa;
    border-radius: 12px;
    font-size: 0.84rem;
    color: #9a3412;
}

.tp-leave-duration-preview i {
    color: #ea580c;
}

.tp-leave-duration-preview strong {
    color: #c2410c;
}

.tp-leave-submit {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.92rem;
}

.tp-leave-tips {
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 14px;
}

.tp-leave-tips h4 {
    margin: 0 0 12px;
    font-size: 0.88rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tp-leave-tips h4 i {
    color: #f59e0b;
}

.tp-leave-tips ul {
    margin: 0;
    padding: 0 0 0 18px;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.65;
}

.tp-leave-tips li + li {
    margin-top: 6px;
}

.tp-leave-history-card {
    min-height: 320px;
}

.tp-leave-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 680px;
    overflow-y: auto;
    padding-right: 4px;
}

.tp-leave-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--tp-border);
    border-radius: 14px;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.tp-leave-card:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.tp-leave-card.is-approved {
    border-left: 4px solid #10b981;
}

.tp-leave-card.is-pending {
    border-left: 4px solid #f59e0b;
}

.tp-leave-card.is-rejected {
    border-left: 4px solid #ef4444;
}

.tp-leave-card.is-cancelled {
    border-left: 4px solid #94a3b8;
    opacity: 0.92;
}

.tp-leave-card.is-current {
    background: linear-gradient(135deg, #f0fdf4, #fff);
    border-color: #bbf7d0;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1);
}

.tp-leave-card-status {
    flex-shrink: 0;
}

.tp-leave-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.tp-leave-card.is-approved .tp-leave-card-icon {
    background: #ecfdf5;
    color: #059669;
}

.tp-leave-card.is-pending .tp-leave-card-icon {
    background: #fffbeb;
    color: #d97706;
}

.tp-leave-card.is-rejected .tp-leave-card-icon {
    background: #fef2f2;
    color: #dc2626;
}

.tp-leave-card.is-cancelled .tp-leave-card-icon {
    background: #f1f5f9;
    color: #64748b;
}

.tp-leave-card-body {
    flex: 1;
    min-width: 0;
}

.tp-leave-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.tp-leave-card-dates {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
    color: #0f172a;
}

.tp-leave-card-sep {
    color: #94a3b8;
    font-size: 0.82rem;
}

.tp-leave-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tp-leave-days-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
}

.tp-leave-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.tp-leave-card-tag.is-active {
    background: #dcfce7;
    color: #15803d;
}

.tp-leave-card-tag.is-active i {
    font-size: 0.45rem;
}

.tp-leave-card-tag.is-upcoming {
    background: #dbeafe;
    color: #1d4ed8;
}

.tp-leave-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 0.72rem;
    color: #94a3b8;
}

.tp-leave-cancel-form {
    margin: 0;
}

.tp-leave-cancel-btn {
    color: #dc2626;
    border-color: #fecaca;
    background: #fff;
}

.tp-leave-cancel-btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.tp-leave-card-foot i {
    margin-right: 4px;
}

.tp-leave-empty {
    padding: 48px 24px;
}

.tp-leave-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #ea580c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.tp-leave-empty h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #0f172a;
}

.tp-leave-empty p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--tp-muted);
    line-height: 1.5;
}

.tp-leave-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tp-leave-item {
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 12px;
}

.tp-leave-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.tp-leave-item-head strong {
    font-size: 0.9rem;
}

.tp-leave-status {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.tp-leave-status.badge-active {
    background: #ecfdf5;
    color: #059669;
}

.tp-leave-status.badge-inactive {
    background: #fef2f2;
    color: #dc2626;
}

.tp-leave-status.is-pending {
    background: #fffbeb;
    color: #d97706;
}

.tp-leave-status.badge-cancelled {
    background: #f1f5f9;
    color: #64748b;
}

.tp-leave-reason {
    margin: 0 0 6px;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.45;
}

.tp-leave-reason i {
    color: #cbd5e1;
    margin-right: 6px;
    font-size: 0.72rem;
}

.tp-leave-date {
    font-size: 0.72rem;
    color: #94a3b8;
}

/* My Classes */
.tp-mc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.tp-mc-card {
    background: var(--tp-card);
    border: 1px solid var(--tp-border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--tp-shadow);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tp-mc-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}

.tp-mc-card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.tp-mc-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, #dbeafe, #eff6ff);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.tp-mc-card-top h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.tp-mc-card-top h3 span {
    color: var(--tp-muted);
    font-weight: 600;
}

.tp-mc-card-top p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--tp-muted);
}

.tp-mc-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.tp-mc-stat {
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 12px;
    text-align: center;
}

.tp-mc-stat span {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--tp-muted);
    margin-bottom: 4px;
}

.tp-mc-stat strong {
    font-size: 1.2rem;
    color: var(--tp-text);
}

.tp-mc-stat.is-green strong { color: #059669; }
.tp-mc-stat.is-red strong { color: #dc2626; }

.tp-mc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Attendance pills (class students) */
.tp-att-pill {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.tp-att-pill.is-present { background: #ecfdf5; color: #059669; }
.tp-att-pill.is-absent { background: #fef2f2; color: #dc2626; }
.tp-att-pill.is-late { background: #fffbeb; color: #d97706; }
.tp-att-pill.is-half { background: #eff6ff; color: #2563eb; }
.tp-att-pill.is-none { background: #f1f5f9; color: #94a3b8; }

/* Homework actions */
.tp-hw-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

/* Self attendance */
.tp-self-att-today .tp-form-panel {
    margin-top: 0;
}

.tp-self-att-status {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid var(--tp-border);
    background: #f8fafc;
}

.tp-self-att-status.is-present {
    background: linear-gradient(145deg, #ecfdf5, #f0fdf4);
    border-color: #bbf7d0;
}

.tp-self-att-status.is-late {
    background: linear-gradient(145deg, #fffbeb, #fef3c7);
    border-color: #fde68a;
}

.tp-self-att-status.is-absent {
    background: #fef2f2;
    border-color: #fecaca;
}

.tp-self-att-status-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.tp-self-att-status.is-present .tp-self-att-status-icon { color: #059669; }
.tp-self-att-status.is-late .tp-self-att-status-icon { color: #d97706; }
.tp-self-att-status.is-absent .tp-self-att-status-icon { color: #dc2626; }

.tp-self-att-status strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.tp-self-att-status > div > span {
    font-size: 0.82rem;
    color: var(--tp-muted);
}

.tp-self-att-remark {
    margin: 8px 0 0;
    font-size: 0.84rem;
    color: #475569;
}

.tp-self-att-log {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tp-self-att-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--tp-border);
    border-radius: 12px;
}

.tp-self-att-date {
    width: 44px;
    text-align: center;
    flex-shrink: 0;
}

.tp-self-att-date strong {
    display: block;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--tp-text);
}

.tp-self-att-date span {
    font-size: 0.68rem;
    text-transform: uppercase;
    color: var(--tp-muted);
    font-weight: 700;
}

.tp-self-att-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tp-self-att-row-note {
    font-size: 0.82rem;
    color: #64748b;
}

.tp-self-att-times {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 0 4px;
}

.tp-self-att-time-box {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 16px 14px;
    border-radius: 14px;
    border: 1px solid var(--tp-border);
    background: #f8fafc;
}

.tp-self-att-time-box i {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.tp-self-att-time-box span {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--tp-muted);
    margin-bottom: 4px;
}

.tp-self-att-time-box strong {
    font-size: 1.05rem;
    color: var(--tp-text);
}

.tp-self-att-time-box.is-in {
    background: linear-gradient(145deg, #ecfdf5, #f0fdf4);
    border-color: #bbf7d0;
}

.tp-self-att-time-box.is-in i { color: #059669; }

.tp-self-att-time-box.is-out {
    background: linear-gradient(145deg, #eff6ff, #f0f9ff);
    border-color: #bfdbfe;
}

.tp-self-att-time-box.is-out i { color: #2563eb; }

.tp-self-att-time-box.is-out.is-pending {
    background: #f8fafc;
    border-style: dashed;
    opacity: 0.85;
}

.tp-self-att-time-box.is-out.is-pending strong {
    color: #94a3b8;
    font-size: 0.88rem;
}

.tp-self-att-time-arrow {
    color: #cbd5e1;
    font-size: 0.9rem;
}

.tp-self-att-row-time {
    display: block;
    width: 100%;
    font-size: 0.78rem;
    color: #475569;
    font-weight: 600;
}

.tp-self-att-row-time i {
    color: #2563eb;
    font-size: 0.72rem;
}

.tp-class-chip {
    position: relative;
}

.tp-class-chip-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 10px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .tp-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .tp-grid-2 { grid-template-columns: 1fr; }
    .tp-detail-grid { grid-template-columns: 1fr; }
    .tp-profile-stat-row { grid-template-columns: repeat(2, 1fr); }
    .tp-profile-fields { grid-template-columns: 1fr; }
    .tp-stat-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
    .tp-filter-form { grid-template-columns: repeat(2, 1fr); }
    .tp-att-summary { grid-template-columns: repeat(2, 1fr); }
    .tp-pwd-layout { grid-template-columns: 1fr; }
    .tp-action-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .tp-login-page { padding: 16px; align-items: flex-start; padding-top: 32px; }

    .tp-login-wrap {
        grid-template-columns: 1fr;
        border-radius: 20px;
    }

    .tp-login-brand {
        padding: 28px 24px 20px;
    }

    .tp-login-features {
        grid-template-columns: 1fr;
    }

    .tp-login-brand-footer {
        display: none;
    }

    .tp-login-form-panel {
        padding: 28px 24px 32px;
    }

    .tp-login-logo h1 { font-size: 1.35rem; }

    .tp-login-tagline { font-size: 0.88rem; margin-bottom: 20px; }

    .tp-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: min(280px, 86vw);
        height: auto !important;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: none !important;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 12px 0 32px rgba(15, 23, 42, 0.28);
        overflow: hidden;
    }

    .tp-sidebar.open { transform: translateX(0); }

    .tp-sidebar-close { display: flex; }

    .tp-nav {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tp-sidebar-footer {
        margin-top: auto;
        flex-shrink: 0;
    }

    .tp-main { margin-left: 0; }

    .tp-menu-toggle { display: flex; }

    .tp-header-center { display: none; }

    .tp-header-user-info,
    .tp-header-user-chevron { display: none; }

    .tp-header-user-trigger {
        padding: 4px;
        border-radius: 10px;
    }

    .tp-content { padding: 16px; }

    .tp-stat-grid { grid-template-columns: 1fr; }

    .tp-stat-grid.cols-4 { grid-template-columns: 1fr 1fr; }

    .tp-leave-layout { grid-template-columns: 1fr; }

    .tp-leave-hero { flex-direction: column; }

    .tp-leave-hero-aside { width: 100%; }

    .tp-leave-hero-stat { flex: 1; }

    .tp-leave-date-row { flex-direction: column; align-items: stretch; }

    .tp-leave-date-arrow {
        align-self: center;
        margin: 0;
        transform: rotate(90deg);
    }

    .tp-leave-timeline { max-height: none; }

    .tp-form-grid { grid-template-columns: 1fr; }

    .tp-profile-header { flex-direction: column; text-align: center; }

    .tp-profile-hero { margin: -8px 0 20px; }

    .tp-profile-hero-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tp-profile-hero-actions {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .tp-profile-stat-row { grid-template-columns: 1fr; }

    .tp-profile-badges { justify-content: center; }

    .tp-page-hero { flex-direction: column; align-items: flex-start; }

    .tp-page-hero-actions { width: 100%; }

    .tp-filter-form { grid-template-columns: 1fr; }

    .tp-att-summary { grid-template-columns: 1fr 1fr; }

    .tp-tt-hero { flex-direction: column; align-items: flex-start; }

    .tp-tt-view-tabs { width: 100%; }

    .tp-tt-view-tab { flex: 1; text-align: center; }

    .tp-self-att-times {
        flex-direction: column;
    }

    .tp-self-att-time-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 640px) {
    .tp-topbar {
        padding: 0 12px;
    }

    .tp-header-breadcrumb {
        display: none;
    }

    .tp-header-actions .tp-header-icon-btn:last-of-type {
        display: none;
    }

    .tp-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding: 16px 14px 20px;
    }

    .tp-footer-left {
        width: 100%;
    }

    .tp-footer p {
        font-size: 0.8rem;
        line-height: 1.45;
    }

    .tp-footer-right {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .tp-footer-right a {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        text-align: center;
        padding: 9px 8px;
        border-radius: 10px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        font-size: 0.74rem;
        font-weight: 600;
        color: #475569;
    }

    .tp-footer-right a:hover {
        background: #ecfdf5;
        border-color: #bbf7d0;
        color: var(--tp-green-active);
    }
}

@media (max-width: 480px) {
    .tp-footer {
        padding: 14px 12px 18px;
    }

    .tp-footer-right a {
        flex: 1 1 calc(50% - 6px);
        font-size: 0.72rem;
        padding: 8px 6px;
    }
}
