.aai-wrap {
    max-width: 1180px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    color: #1e293b;
}
.aai-header-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    padding: 20px 24px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.aai-header-banner h1 {
    margin: 0 0 4px 0;
    font-size: 20px;
    color: #ffffff;
    letter-spacing: 0.4px;
}
.aai-header-banner p {
    margin: 0;
    font-size: 13px;
    color: #cbd5e1;
}
.aai-logo-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #f8fafc;
    border: 1.5px dashed #94a3b8;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
}
.aai-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.aai-tab {
    background: #e2e8f0;
    color: #1e293b;
    padding: 10px 16px;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    transition: all 0.15s ease;
}
.aai-tab:hover {
    background: #cbd5e1;
    color: #0f172a;
}
.aai-tab.active {
    background: #be123c;
    color: #ffffff;
}
.aai-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.aai-card h3 {
    margin-top: 0;
    color: #0f172a;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}
.aai-exam-perm-box {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    padding: 16px 18px;
}
.aai-exam-perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}
.aai-exam-pill {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 7px;
    padding: 10px 12px;
    cursor: pointer;
    margin: 0;
    transition: all 0.15s ease;
}
.aai-exam-pill.is-open {
    background: #ecfdf5;
    border-color: #10b981;
}
.aai-exam-pill input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.aai-exam-pill small {
    color: #475569;
    font-size: 11.5px;
}
.aai-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    background: #f8fafc;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 18px;
}
.aai-filter-bar label,
.aai-form-grid label,
.aai-stack-form > label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 4px;
}
.aai-filter-bar select,
.aai-filter-bar input[type="text"],
.aai-form-grid select,
.aai-form-grid input[type="text"],
.aai-form-grid input[type="number"],
.aai-stack-form input[type="text"],
.aai-stack-form input[type="email"],
.aai-stack-form select {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13.5px;
    min-width: 160px;
    width: 100%;
    box-sizing: border-box;
}
.aai-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.aai-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.aai-teacher-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 900px) {
    .aai-teacher-layout, .aai-two-col { grid-template-columns: 1fr; }
}
.aai-stack-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.aai-multi-class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 10px;
    margin-top: 6px;
    max-height: 360px;
    overflow-y: auto;
    padding: 4px;
}
.aai-class-check-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    overflow: hidden;
}
.aai-class-check-header {
    background: #1e293b;
    color: #ffffff;
    padding: 6px 10px;
    font-size: 12.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.aai-mini-link {
    background: rgba(255,255,255,0.18);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
}
.aai-mini-link:hover {
    background: #be123c;
}
.aai-class-check-list {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.aai-check-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #1e293b;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}
.aai-check-item input[type="checkbox"] {
    margin: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
}
.aai-btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13.5px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.3;
}
.aai-btn-primary { background: #1e293b; color: #ffffff; }
.aai-btn-primary:hover { background: #0f172a; color: #ffffff; }
.aai-btn-crimson { background: #be123c; color: #ffffff; }
.aai-btn-crimson:hover { background: #9f1239; color: #ffffff; }
.aai-btn-danger { background: #dc2626; color: #ffffff; }
.aai-btn-outline { background: transparent; border: 1px solid #94a3b8; color: #ffffff; }
.aai-btn-sm { padding: 5px 10px; font-size: 12px; background: #334155; color: #fff; }
.aai-btn-danger.aai-btn-sm { background: #dc2626; }
.aai-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.aai-table th {
    background: #1e293b;
    color: #ffffff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
}
.aai-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}
.aai-table tr:nth-child(even) { background: #f8fafc; }
.aai-mark-input {
    width: 110px;
    padding: 6px 8px;
    border: 1.5px solid #94a3b8;
    border-radius: 5px;
    font-weight: 700;
    font-size: 14px;
}
.aai-marks-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
}
.aai-avatar {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #cbd5e1;
}
.aai-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.aai-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 12px;
}
.aai-badge-rank { background: #fef3c7; color: #92400e; }
.aai-badge-grade { background: #dbeafe; color: #1e40af; }
.aai-alert {
    padding: 12px 16px;
    border-radius: 7px;
    margin-bottom: 14px;
    font-size: 13.5px;
}
.aai-alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.aai-alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.aai-alert-danger  { background: #ffe4e6; color: #be123c; border: 1px solid #fda4af; }
.aai-divider { border: 0; border-top: 1px solid #e2e8f0; margin: 22px 0; }
.aai-flex-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.aai-login-container { display: flex; justify-content: center; padding: 30px 15px; }
.aai-login-card { max-width: 420px; width: 100%; border: 1px solid #cbd5e1; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,0.08); background: #fff; }
.aai-login-header { background: #1e293b; color: #fff; padding: 20px; text-align: center; }
.aai-login-header h2 { margin: 0 0 4px; font-size: 18px; color: #fff; }
.aai-login-header p { margin: 0; font-size: 12.5px; color: #cbd5e1; }
.aai-login-body { padding: 22px; }
.aai-login-body input[type="text"], .aai-login-body input[type="password"] { width: 100%; padding: 9px; border: 1px solid #cbd5e1; border-radius: 6px; margin-top: 4px; box-sizing: border-box; }
.aai-login-body input[type="submit"] { width: 100%; background: #be123c; color: #fff; border: none; padding: 11px; border-radius: 6px; font-weight: bold; cursor: pointer; margin-top: 10px; }
.aai-login-note { font-size: 11.5px; color: #64748b; text-align: center; margin-top: 12px; }

.aai-progress-feed-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.aai-progress-card {
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    padding: 14px 16px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.aai-progress-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 10px;
}
.aai-status-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.aai-stat-chip {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12.5px;
    color: #1e293b;
}
.aai-guardian-voice-box {
    background: #ecfdf5;
    border: 1.5px solid #10b981;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
}
