@font-face {
    font-family: 'Yekan';
    src: url('../fonts/Yekan.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'B Titr';
    src: url('../fonts/BTitr.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


/* اعمال فونت یکان روی تمامی عناصر بدون استثنا */
*, 
*::before, 
*::after,
html, 
body, 
input, 
textarea, 
select, 
button, 
kbd, 
pre, 
code {
    font-family: 'Yekan', Tahoma, Arial, sans-serif !important;
}



:root {
    --bg-dark: #09090d;
    --bg-mid: #12121a;
    --gold: #d4af37;
    --gold-soft: #f4df8b;
    --cream: #f8f3e7;
    --white: #ffffff;
    --text: #1f1f25;
    --muted: #6b6b77;
    --line: rgba(255,255,255,0.12);
    --glass: rgba(255,255,255,0.09);
    --glass-border: rgba(255,255,255,0.18);
    --shadow: 0 25px 70px rgba(0,0,0,0.35);
    --radius: 24px;
    --radius-lg: 32px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Vazirmatn", sans-serif;
    background: radial-gradient(circle at top, #252535 0%, #111118 40%, #07070a 100%);
    color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.glass {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.animated-bg,
.page-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.animated-bg::before,
.animated-bg::after,
.page-bg::before,
.page-bg::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    animation: floatGlow 12s ease-in-out infinite;
}

.animated-bg::before,
.page-bg::before {
    top: -80px;
    left: -60px;
    background: var(--gold);
}

.animated-bg::after,
.page-bg::after {
    bottom: -120px;
    right: -60px;
    background: #8d4fff;
}

@keyframes floatGlow {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, 30px, 0);
    }
}

.center-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-page,
.admin-body,
.student-body,
.certificate-page {
    position: relative;
}

.login-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: -1;
}

.login-bg span {
    position: absolute;
    border-radius: 999px;
    filter: blur(2px);
    opacity: 0.16;
    animation: drift 18s linear infinite;
}

.login-bg span:nth-child(1) {
    width: 180px;
    height: 180px;
    background: var(--gold);
    top: 10%;
    left: 10%;
}

.login-bg span:nth-child(2) {
    width: 260px;
    height: 260px;
    background: #8d4fff;
    top: 20%;
    right: 12%;
}

.login-bg span:nth-child(3) {
    width: 120px;
    height: 120px;
    background: #22c55e;
    bottom: 18%;
    left: 18%;
}

.login-bg span:nth-child(4) {
    width: 220px;
    height: 220px;
    background: #ef4444;
    bottom: 8%;
    right: 18%;
}

@keyframes drift {
    0% {
        transform: translateY(0) translateX(0) scale(1);
    }
    50% {
        transform: translateY(-24px) translateX(16px) scale(1.06);
    }
    100% {
        transform: translateY(0) translateX(0) scale(1);
    }
}

.login-card {
    width: min(100%, 460px);
    padding: 38px 34px;
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: enterUp 0.9s ease both;
}

@keyframes enterUp {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card::before,
.certificate-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
    transform: translateX(-120%);
    animation: shineSweep 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shineSweep {
    0% {
        transform: translateX(-120%);
    }
    35% {
        transform: translateX(120%);
    }
    100% {
        transform: translateX(120%);
    }
}

.login-badge {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(212,175,55,0.12);
    color: var(--gold-soft);
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 16px;
    border: 1px solid rgba(212,175,55,0.25);
}

.login-card h1,
.page-head h1 {
    margin: 0;
    font-family: "Cinzel", serif;
    letter-spacing: 0.5px;
}

.login-card h1 {
    font-size: 2.4rem;
    color: var(--gold-soft);
}

.login-card p {
    color: rgba(255,255,255,0.72);
    line-height: 1.9;
    margin: 10px 0 24px;
}

.login-form {
    display: grid;
    gap: 14px;
}

.input-wrap {
    position: relative;
}

.input-glow {
    position: absolute;
    inset: auto 12px 8px 12px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: 0.35s ease;
}

input,
select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.14);
    outline: none;
    font-size: 15px;
    font-family: "Vazirmatn", sans-serif;
    background: rgba(255,255,255,0.07);
    color: white;
    transition: 0.35s ease;
}

input::placeholder {
    color: rgba(255,255,255,0.55);
}

input:focus,
select:focus {
    border-color: rgba(212,175,55,0.55);
    background: rgba(255,255,255,0.11);
    transform: translateY(-2px);
    box-shadow: 0 0 0 4px rgba(212,175,55,0.12);
}

.input-wrap:focus-within .input-glow {
    opacity: 1;
}

.btn-primary,
.btn-secondary,
.btn-print {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    padding: 14px 18px;
    border-radius: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.35s ease;
}

.btn-primary,
.btn-print {
    background: linear-gradient(135deg, #f6df8d, #d4af37 55%, #b8891c);
    color: #161616;
    box-shadow: 0 14px 32px rgba(212,175,55,0.28);
}

.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: white;
    border: 1px solid rgba(255,255,255,0.14);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-print:hover {
    transform: translateY(-3px) scale(1.01);
    filter: brightness(1.05);
}

.btn-ripple .ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 650ms linear;
    background: rgba(255,255,255,0.35);
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.alert {
    padding: 13px 14px;
    border-radius: 14px;
    margin: 14px 0;
    font-weight: 600;
}

.alert.success {
    background: rgba(34,197,94,0.14);
    border: 1px solid rgba(34,197,94,0.25);
    color: #d2ffe1;
}

.alert.error {
    background: rgba(239,68,68,0.14);
    border: 1px solid rgba(239,68,68,0.25);
    color: #ffd4d4;
}

.login-foot-note {
    margin-top: 18px;
    font-size: 13px;
    color: rgba(255,255,255,0.58);
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    gap: 20px;
}

.brand-box-inline,
.brand-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-title {
    font-family: "Cinzel", serif;
    color: var(--gold-soft);
    font-size: 1.5rem;
    letter-spacing: 0.6px;
}

.brand-sub {
    color: rgba(255,255,255,0.68);
    font-size: 13px;
}

.top-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.certificate-wrap {
    padding: 10px 16px 34px;
}

.certificate-card {
    width: min(1080px, 100%);
    min-height: 580px;
    margin: 0 auto;
    background: linear-gradient(145deg, #fffaf0 0%, #f6ecd7 100%);
    color: var(--text);
    border-radius: 34px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.32);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(212,175,55,0.28);
    padding: 26px 30px 22px;
    transform: translateZ(0);
    transition: 0.4s ease;
}

.certificate-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 36px 100px rgba(0,0,0,0.38);
}

.cert-shine,
.cert-top-wave,
.cert-bottom-wave {
    position: absolute;
    pointer-events: none;
}

.cert-shine {
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(212,175,55,0.13), transparent 18%),
        radial-gradient(circle at 82% 82%, rgba(0,0,0,0.06), transparent 20%);
}

.cert-top-wave {
    top: 0;
    left: 0;
    right: 0;
    height: 96px;
    background: linear-gradient(135deg, rgba(212,175,55,0.95), rgba(28,28,28,0.96) 55%, rgba(180,138,34,0.92));
    clip-path: polygon(0 0, 100% 0, 100% 34%, 84% 55%, 67% 44%, 49% 58%, 30% 43%, 14% 56%, 0 42%);
    opacity: 0.92;
}

.cert-bottom-wave {
    left: 0;
    right: 0;
    bottom: 0;
    height: 84px;
    background: linear-gradient(135deg, rgba(28,28,28,0.96), rgba(212,175,55,0.95), rgba(245,220,130,0.96));
    clip-path: polygon(0 62%, 14% 46%, 31% 60%, 49% 42%, 67% 56%, 84% 44%, 100% 58%, 100% 100%, 0 100%);
    opacity: 0.9;
}

.certificate-header,
.certificate-body,
.certificate-footer {
    position: relative;
    z-index: 2;
}

.certificate-header {
    text-align: center;
    padding-top: 18px;
}

.logo-box {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.school-logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255,255,255,0.75);
    padding: 8px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.18);
    transition: 0.4s ease;
}

.school-logo:hover {
    transform: rotate(6deg) scale(1.05);
}

.logo-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--gold), #8e6b13);
    color: #111;
    font-weight: 900;
    font-size: 2rem;
    box-shadow: 0 15px 30px rgba(0,0,0,0.18);
}

.cert-title-en {
    font-family: "Cinzel", serif;
    font-size: clamp(1.7rem, 3.8vw, 2.7rem);
    font-weight: 700;
    color: #6f5208;
    text-shadow: 0 2px 0 rgba(255,255,255,0.65);
    margin-top: 4px;
    line-height: 1.2;
}

.cert-title-fa {
    margin-top: 4px;
    font-size: 1.1rem;
    color: #4f4f57;
    font-weight: 700;
}

.cert-subline {
    margin-top: 6px;
    color: #8b7426;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.certificate-body {
    padding: 16px 4px 12px;
}

.hero-student-name {
    font-family: "Playfair Display", serif;
    font-size: clamp(2.1rem, 3.6vw, 3rem);
    text-align: center;
    font-weight: 700;
    color: #1f1f24;
    letter-spacing: 0.2px;
    margin-top: 6px;
    line-height: 1.2;
}

.hero-caption {
    text-align: center;
    margin-top: 8px;
    font-size: 0.95rem;
    color: #5f5f69;
}

.cert-main-content {
    display: flex;
    gap: 18px;
    margin-top: 18px;
    align-items: stretch;
}

.cert-info-side {
    flex: 1.45;
    min-width: 0;
}

.cert-chart-side {
    flex: 0.95;
    min-width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 22px;
    background: rgba(255,255,255,0.42);
    border: 1px solid rgba(212,175,55,0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
    max-height: 260px;
}

.cert-chart-side canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 235px;
}

.cert-info-grid {
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.info-card {
    position: relative;
    overflow: hidden;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.76);
    border: 1px solid rgba(212,175,55,0.18);
    transition: 0.35s ease;
    transform: translateZ(0);
}

.info-card::before,
.score-card::before,
.action-card::before,
.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(212,175,55,0.18), transparent 28%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.info-card:hover::before,
.score-card:hover::before,
.action-card:hover::before,
.stat-card:hover::before {
    opacity: 1;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(0,0,0,0.08);
}

.info-card span,
.score-label {
    display: block;
    font-size: 13px;
    color: #8a7b4a;
    margin-bottom: 8px;
    font-weight: 700;
}

.info-card strong {
    font-size: 15px;
    color: #232329;
    line-height: 1.8;
}

.scores-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.s-item {
    background: rgba(255,255,255,0.62);
    padding: 10px 8px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(212,175,55,0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.s-item span {
    display: block;
    font-size: 11px;
    color: #8a7b4a;
    margin-bottom: 6px;
    font-weight: 700;
}

.s-item strong {
    display: block;
    font-size: 18px;
    color: #111;
    line-height: 1.2;
    font-weight: 900;
}

.s-item.final {
    background: linear-gradient(135deg, #d4af37, #f4df8b);
}

.s-item.final span,
.s-item.final strong {
    color: #111;
}

.scores-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.score-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,240,218,0.96));
    border: 1px solid rgba(212,175,55,0.2);
    padding: 18px 14px;
    text-align: center;
    transition: 0.35s ease;
}

.score-card:hover {
    transform: translateY(-6px) rotate(-0.4deg);
    box-shadow: 0 16px 30px rgba(0,0,0,0.08);
}

.score-card-main {
    background: linear-gradient(135deg, #d4af37, #f4df8b);
}

.score-value {
    font-size: 2rem;
    font-weight: 900;
    color: #1c1c1c;
}

.score-card-main .score-label,
.score-card-main .score-value {
    color: #111;
}

.certificate-note {
    text-align: center;
    margin-top: 16px;
    color: #5a5a65;
    font-size: 14px;
    line-height: 1.85;
}

.certificate-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(0,0,0,0.2);
}

.footer-block {
    min-width: 180px;
}

.footer-block span {
    display: block;
    color: #8a7b4a;
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 700;
}

.footer-block strong {
    color: #222;
    font-weight: 800;
}

.sign-block strong {
    font-family: "Playfair Display", serif;
    font-style: italic;
    color: #7d5a00;
}

.admin-shell {
    display: grid;
    grid-template-columns: 290px 1fr;
    min-height: 100vh;
}

.sidebar {
    padding: 22px;
    border-radius: 0 28px 28px 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

.side-nav {
    margin-top: 24px;
    display: grid;
    gap: 10px;
}

.side-nav a {
    color: white;
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    transition: 0.3s ease;
}

.side-nav a:hover {
    background: rgba(212,175,55,0.12);
    transform: translateX(-4px);
    border-color: rgba(212,175,55,0.25);
}

.danger-link {
    background: rgba(239,68,68,0.10) !important;
}

.content-area {
    padding: 24px;
}

.page-head {
    margin-bottom: 22px;
}

.page-head h1 {
    font-size: 2rem;
    color: var(--gold-soft);
}

.page-head p {
    color: rgba(255,255,255,0.72);
    margin: 8px 0 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 24px 18px;
    border-radius: 24px;
    text-align: center;
    min-height: 130px;
}

.stat-number {
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--gold-soft);
}

.stat-label {
    margin-top: 8px;
    color: rgba(255,255,255,0.76);
}

.hover-lift,
.action-card,
.stat-card,
.info-card,
.score-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.quick-actions {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.action-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 18px;
    color: white;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    min-height: 95px;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 800;
}

.action-gold {
    background: linear-gradient(135deg, #f6df8d, #d4af37);
    color: #111;
}

.form-card,
.table-card {
    margin-top: 20px;
    border-radius: 24px;
    padding: 20px;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.grid-form button {
    grid-column: 1 / -1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: white;
    overflow: hidden;
    border-radius: 16px;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    text-align: right;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.data-table th {
    color: var(--gold-soft);
    background: rgba(255,255,255,0.03);
}

.row-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.row-actions a {
    color: #111;
    background: linear-gradient(135deg, #f6df8d, #d4af37);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.settings-logo-preview {
    margin-top: 16px;
}

.settings-logo-preview img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(255,255,255,0.08);
    padding: 10px;
}

.mouse-spark {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 0 10px var(--gold), 0 0 20px var(--gold-soft);
    animation: spark-fade 0.7s forwards;
}

@keyframes spark-fade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(3);
    }
}

@media (max-width: 1100px) {
    .stats-grid,
    .quick-actions,
    .scores-grid,
    .scores-compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        border-radius: 0 0 28px 28px;
    }

    .cert-main-content {
        flex-direction: column;
    }

    .cert-chart-side {
        min-width: 100%;
        max-height: 320px;
    }
}

@media (max-width: 720px) {
    .top-bar,
    .certificate-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .cert-info-grid,
    .scores-grid,
    .scores-compact,
    .grid-form,
    .stats-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .certificate-card {
        padding: 18px;
        border-radius: 22px;
        min-height: auto;
    }

    .hero-student-name {
        font-size: 2rem;
    }

    .cert-chart-side {
        max-height: 280px;
        min-width: 100%;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
.certificate-page {
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 120, 190, 0.22), transparent 18%),
        radial-gradient(circle at 85% 16%, rgba(255, 214, 92, 0.22), transparent 18%),
        radial-gradient(circle at 72% 78%, rgba(96, 225, 160, 0.18), transparent 20%),
        linear-gradient(135deg, #140f22 0%, #1b1630 38%, #151125 100%);
}

.certificate-wrap {
    padding: 18px 18px 38px;
}

.luxury-glass-card {
    width: min(1160px, 100%);
    min-height: 650px;
    padding: 28px 30px 24px;
    border-radius: 36px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.72), rgba(255,255,255,0.48)),
        linear-gradient(120deg, rgba(255,255,255,0.36), rgba(255,255,255,0.12));
    border: 1px solid rgba(255,255,255,0.30);
    box-shadow:
        0 30px 80px rgba(10, 10, 30, 0.45),
        inset 0 1px 0 rgba(255,255,255,0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
}

.luxury-glass-card::before {
    background: linear-gradient(115deg, transparent 10%, rgba(255,255,255,0.28) 40%, transparent 68%);
    animation: shineSweep 8s ease-in-out infinite;
    opacity: 0.9;
}

.certificate-inner-frame {
    position: absolute;
    inset: 14px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.28);
    pointer-events: none;
    z-index: 1;
}

.cert-aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(16px);
    opacity: 0.85;
    pointer-events: none;
}

.aurora-one {
    width: 240px;
    height: 240px;
    top: -50px;
    right: -40px;
    background: radial-gradient(circle, rgba(255, 126, 203, 0.48), rgba(255, 126, 203, 0.06) 70%);
}

.aurora-two {
    width: 280px;
    height: 280px;
    bottom: -70px;
    left: -60px;
    background: radial-gradient(circle, rgba(255, 220, 109, 0.45), rgba(255, 220, 109, 0.05) 72%);
}

.aurora-three {
    width: 220px;
    height: 220px;
    top: 38%;
    left: 36%;
    background: radial-gradient(circle, rgba(90, 226, 162, 0.20), rgba(90, 226, 162, 0.03) 72%);
}

.certificate-header {
    padding-top: 8px;
}

.cert-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.cert-mini-badge {
    min-width: 170px;
    text-align: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.34);
    border: 1px solid rgba(255,255,255,0.34);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.52);
    color: #6c5b8f;
    font-size: 11px;
    letter-spacing: 1.7px;
    font-weight: 800;
}

.logo-box {
    margin-bottom: 0;
}

.school-logo,
.logo-placeholder {
    width: 98px;
    height: 98px;
}

.school-logo {
    background: rgba(255,255,255,0.74);
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow:
        0 16px 30px rgba(90, 56, 140, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.6);
}

.logo-placeholder {
    background: linear-gradient(135deg, #ff94c8, #ffd86b 52%, #7ce8b4);
    color: #402655;
    border: 1px solid rgba(255,255,255,0.45);
}

.cert-title-en {
    font-size: clamp(2rem, 4.2vw, 3.15rem);
    color: #45315f;
    text-shadow: 0 2px 12px rgba(255,255,255,0.32);
}

.cert-title-fa {
    font-family: "B Titr", "Yekan", sans-serif !important;
    font-size: 1.35rem;
    color: #5b4c79;
    margin-top: 8px;
}

.cert-subline {
    display: inline-flex;
    margin-top: 10px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.34);
    border: 1px solid rgba(255,255,255,0.34);
    color: #6e5a8b;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.certificate-body {
    padding: 18px 4px 10px;
}

.certificate-intro {
    text-align: center;
    color: #806d9d;
    font-size: 0.95rem;
    letter-spacing: 1.2px;
    margin-bottom: 6px;
    font-weight: 700;
}

.hero-student-name {
    font-size: clamp(2.4rem, 4vw, 3.35rem);
    color: #312145;
    text-shadow: 0 3px 18px rgba(255,255,255,0.22);
}

.hero-caption {
    max-width: 760px;
    margin: 10px auto 0;
    color: #685b82;
    font-size: 1rem;
    line-height: 1.9;
}

.cert-main-content {
    gap: 22px;
    margin-top: 22px;
    align-items: stretch;
}

.cert-info-side {
    flex: 1.2;
}

.cert-chart-side {
    flex: 0.9;
    min-width: 300px;
    max-height: none;
}

.glass-lite,
.chart-glass-panel,
.footer-glass,
.s-item {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.52), rgba(255,255,255,0.26));
    border: 1px solid rgba(255,255,255,0.36);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.62),
        0 12px 28px rgba(57, 38, 93, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.cert-info-grid {
    gap: 14px;
}

.info-card {
    padding: 16px 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,0.58), rgba(255,255,255,0.28));
    border: 1px solid rgba(255,255,255,0.36);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.62),
        0 12px 28px rgba(57, 38, 93, 0.10);
}

.info-card span,
.score-label {
    color: #8a79ab;
    font-size: 12px;
    margin-bottom: 7px;
}

.info-card strong {
    color: #36274b;
    font-size: 15px;
    line-height: 1.9;
}

.artistic-scores {
    margin-top: 16px;
    gap: 12px;
}

.s-item {
    padding: 12px 8px;
    border-radius: 18px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.s-item:hover {
    transform: translateY(-4px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.62),
        0 16px 28px rgba(57, 38, 93, 0.14);
}

.s-item span {
    color: #7d6a99;
    font-size: 11px;
    margin-bottom: 5px;
}

.s-item strong {
    font-size: 20px;
    color: #332447;
}

.pink-score {
    background:
        linear-gradient(135deg, rgba(255, 122, 194, 0.30), rgba(255,255,255,0.22));
}

.yellow-score {
    background:
        linear-gradient(135deg, rgba(255, 214, 93, 0.32), rgba(255,255,255,0.22));
}

.green-score {
    background:
        linear-gradient(135deg, rgba(116, 231, 171, 0.30), rgba(255,255,255,0.22));
}

.final-score-box {
    background:
        linear-gradient(135deg, rgba(158, 120, 255, 0.32), rgba(255,255,255,0.22));
}

.chart-glass-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 16px 16px 12px;
    border-radius: 26px;
    min-height: 290px;
    background:
        linear-gradient(160deg, rgba(255,255,255,0.54), rgba(255,255,255,0.24)),
        linear-gradient(135deg, rgba(255, 137, 201, 0.08), rgba(116, 231, 171, 0.08));
}

.chart-title {
    text-align: center;
    font-family: "Cinzel", serif;
    color: #5a4978;
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.cert-chart-side canvas {
    width: 100% !important;
    height: 245px !important;
    max-height: 245px;
}

.fancy-note {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.30);
    border: 1px solid rgba(255,255,255,0.28);
    color: #6d5d87;
    font-size: 13px;
    line-height: 2;
}

.certificate-footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(112, 90, 154, 0.18);
    align-items: center;
}

.footer-glass {
    min-width: 210px;
    padding: 14px 18px;
    border-radius: 20px;
    text-align: center;
}

.footer-block span {
    color: #8b78ab;
    margin-bottom: 6px;
}

.footer-block strong {
    color: #34254a;
}

.footer-center-seal {
    display: flex;
    align-items: center;
    justify-content: center;
}

.seal-ring {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.58), rgba(255,255,255,0.22));
    border: 2px solid rgba(255,255,255,0.48);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.62),
        0 14px 30px rgba(66, 44, 106, 0.14);
}

.seal-core {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: "Cinzel", serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #ff7ec8, #ffd86d 52%, #74e7ab);
    box-shadow: 0 10px 22px rgba(255, 126, 200, 0.24);
}

.sign-block strong {
    color: #5f478f;
    font-style: normal;
    font-family: "B Titr", "Yekan", sans-serif !important;
}

.mouse-spark {
    width: 7px;
    height: 7px;
    background: radial-gradient(circle, #fff 0%, #ffd56e 45%, #ff89c8 100%);
    box-shadow:
        0 0 12px rgba(255, 214, 110, 0.95),
        0 0 24px rgba(255, 137, 200, 0.55);
}

@media (max-width: 1100px) {
    .cert-header-top {
        flex-direction: column;
    }

    .cert-mini-badge {
        min-width: auto;
        width: fit-content;
    }

    .cert-chart-side {
        min-width: 100%;
    }

    .chart-glass-panel {
        min-height: 320px;
    }

    .cert-chart-side canvas {
        height: 260px !important;
        max-height: 260px;
    }
}

@media (max-width: 720px) {
    .luxury-glass-card {
        padding: 18px 16px;
        border-radius: 24px;
    }

    .certificate-inner-frame {
        inset: 8px;
        border-radius: 18px;
    }

    .cert-title-fa {
        font-size: 1.05rem;
    }

    .cert-subline,
    .cert-mini-badge {
        font-size: 10px;
    }

    .chart-glass-panel {
        min-height: 280px;
    }

    .footer-glass {
        min-width: 100%;
    }

    .seal-ring {
        width: 78px;
        height: 78px;
    }

    .seal-core {
        width: 54px;
        height: 54px;
        font-size: 1.1rem;
    }
}
