/* ================================================
   TeacherTools — Custom Styles
   ================================================ */

@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-Light.ttf') format('truetype');
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/fonts/Vazirmatn-wght.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

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

html, body {
    font-family: 'Poppins', sans-serif;
    background: #f0f4ff;
    min-height: 100vh;
}

/* ---------- Glassmorphism base ---------- */
.glass {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 8px 32px rgba(99, 120, 210, 0.10);
}

.glass-dark {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.55);
}

/* ---------- Gradient background blobs ---------- */
.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
}
.blob-1 { width: 600px; height: 600px; background: #818cf8; top: -150px; left: -150px; }
.blob-2 { width: 500px; height: 500px; background: #38bdf8; bottom: -120px; right: -100px; }
.blob-3 { width: 400px; height: 400px; background: #a78bfa; top: 40%; left: 45%; }

/* ---------- Custom range slider ---------- */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, #6366f1, #818cf8);
    outline: none;
    cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6366f1;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.4);
    cursor: grab;
    transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.2); cursor: grabbing; }

/* ---------- Buttons ---------- */
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    border-radius: 0.75rem;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    cursor: pointer;
    border: none;
}
.btn-primary:hover  { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
    background: rgba(255,255,255,0.7);
    color: #4f46e5;
    border: 1.5px solid rgba(99,102,241,0.3);
    border-radius: 0.75rem;
    padding: 0.6rem 1.4rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    cursor: pointer;
}
.btn-secondary:hover { background: rgba(99,102,241,0.08); border-color: #6366f1; }

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #fff;
    border-radius: 0.75rem;
    padding: 0.55rem 1.2rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(239,68,68,0.4); }

.btn-success {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #fff;
    border-radius: 0.75rem;
    padding: 0.55rem 1.2rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(16,185,129,0.4); }

/* ---------- Form inputs ---------- */
.tt-input {
    width: 100%;
    background: rgba(255,255,255,0.7);
    border: 1.5px solid rgba(99,102,241,0.2);
    border-radius: 0.75rem;
    padding: 0.7rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.tt-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.tt-input::placeholder { color: #94a3b8; }

/* ---------- Status badges ---------- */
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-active   { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-info     { background: #e0e7ff; color: #3730a3; }

/* ---------- Chat bubbles ---------- */
.chat-bubble-user {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    border-radius: 1rem 1rem 0.25rem 1rem;
    padding: 0.6rem 1rem;
    max-width: 75%;
    align-self: flex-end;
    font-size: 0.875rem;
    line-height: 1.6;
    font-family: 'Vazirmatn', 'Poppins', Tahoma, sans-serif;
    overflow-wrap: break-word;
    word-break: normal;
}
.chat-bubble-admin {
    background: rgba(255,255,255,0.8);
    color: #1e293b;
    border-radius: 1rem 1rem 1rem 0.25rem;
    padding: 0.6rem 1rem;
    max-width: 75%;
    align-self: flex-start;
    font-size: 0.875rem;
    line-height: 1.6;
    font-family: 'Vazirmatn', 'Poppins', Tahoma, sans-serif;
    overflow-wrap: break-word;
    word-break: normal;
    border: 1px solid rgba(99,102,241,0.15);
}

/* ---------- Sidebar nav item ---------- */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}
.nav-item:hover { background: rgba(99,102,241,0.08); color: #4f46e5; }
.nav-item.active { background: rgba(99,102,241,0.12); color: #4f46e5; font-weight: 600; }

/* ---------- Card hover ---------- */
.hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(99,120,210,0.15); }

/* ---------- Modal ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.25); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.45); }

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.4s ease forwards; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.8s linear infinite; }

[x-cloak] { display: none !important; }

/* ---------- Credentials font (high-legibility monospace) ---------- */
.credentials-font {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.12em;
    font-size: 1rem;
    line-height: 1.5;
}

/* ---------- Delivery note HTML content ---------- */
.delivery-note-content p { margin-bottom: 0.5rem; }
.delivery-note-content ul,
.delivery-note-content ol { padding-right: 1.25rem; margin-bottom: 0.5rem; }
.delivery-note-content ul { list-style-type: disc; }
.delivery-note-content ol { list-style-type: decimal; }
.delivery-note-content li { margin-bottom: 0.25rem; }
.delivery-note-content strong { font-weight: 700; }
.delivery-note-content a { color: #4f46e5; text-decoration: underline; }
