/* ---- page-range extract: teacher-report (7 blocks) ---- */
/* block 1 */

/* SECTION General Styles */
    :root {
        /* Classic Palette */
        --primary-color: #1e3a8a;
        --secondary-color: #334155;
        --accent-color: #2563eb;
        --success-color: #059669;
        --error-color: #dc2626;
        --warning-color: #d97706;
        --info-color: #3b82f6;

        /* Section */
        --text-light: #1e293b;
        --text-dark: #f8fafc;
        --text-muted: #64748b;
        --text-bright: #0f172a;
        --text-shadow: none;

        /* Solid */
        --glass-bg: #ffffff;
        --glass-border: #e2e8f0;
        --background-gradient: #f1f5f9;
        --card-bg: #ffffff;

        /* Section */
        --button-bg: #1e3a8a;
        --success-bg: #059669;
        --error-bg: #dc2626;
        --warning-bg: #d97706;

        /* Section */
        --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
        --shadow-heavy: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

        /* Dark Mode Variables (Classic Navy) */
        --dark-primary: #0f172a;
        --dark-secondary: #1e293b;
        --dark-accent: #3b82f6;
        --dark-text: #f8fafc;
        --dark-text-secondary: #94a3b8;
        --dark-glass-bg: #1e293b;
        --dark-glass-border: #334155;
        --dark-card-bg: #1e293b;
        --dark-shadow: rgba(0, 0, 0, 0.3);
        --dark-gradient: #0f172a;

        /* Animation Variables */
        --transition-speed: 0.2s;
        --smooth-timing: ease-in-out;

        /* Typography */
        --font-weight-normal: 400;
        --font-weight-medium: 500;
        --font-weight-semibold: 600;
        --font-weight-bold: 700;
    }

    /* Dark Mode Class */
    body.dark-mode {
        --primary-color: var(--dark-primary);
        --secondary-color: var(--dark-secondary);
        --background-gradient: var(--dark-gradient);
        --text-light: #FFFFFF;
        --text-dark: #FFFFFF;
        --text-bright: #FFFFFF;
        --glass-bg: var(--dark-glass-bg);
        --glass-border: var(--dark-glass-border);
        --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.5);
        --shadow-heavy: 0 12px 40px rgba(0, 0, 0, 0.6);
    }

    /* Dark Mode Toggle Button */
    .dark-mode-toggle {
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 10000;
        background: var(--glass-bg);
        backdrop-filter: blur(15px);
        border: 1px solid var(--glass-border);
        border-radius: 50px;
        padding: 12px;
        cursor: pointer;
        transition: all var(--transition-speed) var(--smooth-timing);
        box-shadow: var(--shadow-light);
    }

    body:not(.dark-mode) .dark-mode-toggle {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        box-shadow: var(--shadow-light);
    }

    .dark-mode-toggle:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    }

    .dark-mode-toggle .toggle-icon {
        font-size: 1.5rem;
        transition: all var(--transition-speed) var(--bounce-timing);
    }

    .dark-mode-toggle:hover .toggle-icon {
        transform: rotate(180deg);
    }

    /* Dark Mode Specific Styles */
    body.dark-mode .form-container {
        background: var(--dark-card-bg);
        border-color: var(--dark-glass-border);
    }

    body.dark-mode .question-item {
        background: var(--dark-card-bg);
        border-color: var(--dark-glass-border);
    }

    body.dark-mode input,
    body.dark-mode select,
    body.dark-mode textarea {
        background: rgba(0, 0, 0, 0.4);
        border-color: var(--dark-glass-border);
        color: var(--dark-text);
    }

    body.dark-mode input:focus,
    body.dark-mode select:focus,
    body.dark-mode textarea:focus {
        border-color: var(--dark-accent);
        box-shadow: 0 0 20px rgba(15, 52, 96, 0.4);
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: 'Cairo', sans-serif;
    }

    body {
        background: var(--background-gradient);
        font-family: 'Cairo', sans-serif;
        margin: 0;
        padding: 0;
        color: var(--text-light);
        text-align: center;
        min-height: 100vh;
        direction: rtl;
    }

    /* Section */
    body:not(.dark-mode) {
        background: #f8fafc;
    }

    /* Header */
    .header {
        position: relative;
        text-align: center;
        margin-bottom: 2rem;
        color: var(--text-light);
        padding: 1.5rem 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .header-top-actions {
        position: absolute;
        top: 1.5rem;
        left: 1rem;
        display: flex;
        gap: 0.5rem;
    }

    .header-stats-btn {
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        color: var(--primary-color);
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        font-size: 1.1rem;
        box-shadow: var(--shadow-light);
    }

    .header-stats-btn:hover {
        background: var(--primary-color);
        color: #ffffff;
        transform: translateY(-2px);
    }

    .header h1 {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        line-height: 1.2;
        color: var(--text-light);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }

    body:not(.dark-mode) .header h1 {
        color: #0f172a;
    }

    .header h1 .header-icon {
        font-size: 1.8rem;
        color: var(--primary-color);
    }

    .header p {
        font-size: 1rem;
        margin-top: 0;
        color: var(--text-muted);
        font-weight: 400;
    }

    /* Form Container */
    .form-container {
        max-width: 900px;
        width: 95%;
        margin: 0 auto;
        background: var(--glass-bg);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        padding: 1.5rem;
        border-radius: 20px;
        border: 1px solid var(--glass-border);
        box-shadow: var(--shadow-light);
        color: var(--text-light);
        animation: fadeIn 0.7s cubic-bezier(0.25, 1, 0.5, 1);
    }

    body:not(.dark-mode) .form-container {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        box-shadow: var(--shadow-light);
    }

    /* =================================================================
    // SECTION: Advanced Animations
    // ================================================================= */

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Enhanced Animations for Dialogue Page */
    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes pulse {

        0%,
        100% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.05);
        }
    }

    @keyframes glow {

        0%,
        100% {
            box-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
        }

        50% {
            box-shadow: 0 0 20px rgba(46, 204, 113, 0.8), 0 0 30px rgba(46, 204, 113, 0.6);
        }
    }

    @keyframes scaleIn {
        from {
            transform: scale(0);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }

    @keyframes elastic {
        0% {
            transform: scale(0);
        }

        50% {
            transform: scale(1.2);
        }

        100% {
            transform: scale(1);
        }
    }

    /* Additional Animations */
    @keyframes shake {

        0%,
        100% {
            transform: translateX(0);
        }

        10%,
        30%,
        50%,
        70%,
        90% {
            transform: translateX(-5px);
        }

        20%,
        40%,
        60%,
        80% {
            transform: translateX(5px);
        }
    }

    @keyframes rotate {
        from {
            transform: rotate(0deg);
        }

        to {
            transform: rotate(360deg);
        }
    }

    @keyframes wave {
        0% {
            transform: rotate(0deg);
        }

        10% {
            transform: rotate(14deg);
        }

        20% {
            transform: rotate(-8deg);
        }

        30% {
            transform: rotate(14deg);
        }

        40% {
            transform: rotate(-4deg);
        }

        50% {
            transform: rotate(10deg);
        }

        60% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(0deg);
        }
    }

    /* Apply Animations */
    .form-container {
        animation: slideInUp 0.8s ease-out;
    }

    .question-item {
        animation: scaleIn 0.5s ease-out;
    }

    .question-item:nth-child(odd) {
        animation-delay: 0.1s;
    }

    .question-item:nth-child(even) {
        animation-delay: 0.2s;
    }

    .submit-btn {
        animation: elastic 0.6s ease-out;
    }

    .submit-btn:hover {
        animation: pulse 1s ease-in-out infinite;
    }

    .question-item input:focus,
    .question-item select:focus {
        animation: glow 2s ease-in-out infinite;
    }

    .header h1 {
        animation: slideInUp 1s ease-out;
    }

    .header p {
        animation: slideInUp 1s ease-out 0.3s both;
    }

    /* Enhanced Button Animations */
    .btn {
        animation: elastic 0.6s ease-out;
    }

    .btn:hover {
        animation: pulse 1s ease-in-out infinite;
    }

    /* Loading Animation Enhancement */
    .spinner {
        animation: rotate 1s linear infinite, pulse 2s ease-in-out infinite;
    }

    /* Success/Error Message Animations */
    .result-message.success {
        animation: scaleIn 0.5s ease-out, glow 2s ease-in-out infinite;
    }

    .result-message.error {
        animation: shake 0.5s ease-in-out;
    }

    /* Dark Mode Toggle Animation */
    .dark-mode-toggle .toggle-icon {
        animation: wave 2s ease-in-out infinite;
    }

    .dark-mode-toggle:hover .toggle-icon {
        animation: rotate 0.6s ease-in-out;
    }

    .form-container h2 {
        text-align: center;
        margin-bottom: 1.5rem;
        color: #FFFFFF;
        font-size: 1.4rem;
        font-weight: 600;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        letter-spacing: 0.5px;
        position: relative;
    }

    body:not(.dark-mode) .form-container h2 {
        color: #1e293b;
        text-shadow: none;
    }

    .form-container h2::after {
        content: '';
        position: absolute;
        bottom: -8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40%;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
        border-radius: 1px;
    }

    body:not(.dark-mode) .form-container h2::after {
        background: linear-gradient(90deg, transparent, #1e3a8a, transparent);
    }

    /* Form Groups */
    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: var(--text-light);
        font-size: 1rem;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        letter-spacing: 0.3px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 12px 16px;
        background: rgba(0, 0, 0, 0.3);
        border: 1.5px solid rgba(255, 255, 255, 0.3);
        border-radius: 12px;
        font-size: 1rem;
        font-weight: 400;
        color: var(--text-light);
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    body:not(.dark-mode) .form-group input,
    body:not(.dark-mode) .form-group select,
    body:not(.dark-mode) .form-group textarea {
        background: #ffffff;
        border: 1.5px solid #e2e8f0;
        color: #1e293b;
    }

    body:not(.dark-mode) .form-group input:focus,
    body:not(.dark-mode) .form-group select:focus,
    body:not(.dark-mode) .form-group textarea:focus {
        border-color: #1e3a8a;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

    .form-group input::placeholder,
    .form-group textarea::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }

    body:not(.dark-mode) .form-group input::placeholder,
    body:not(.dark-mode) .form-group textarea::placeholder {
        color: #94a3b8;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--primary-color);
        background: rgba(0, 0, 0, 0.5);
        box-shadow: 0 0 20px rgba(15, 52, 96, 0.6);
        transform: translateY(-2px);
    }

    body:not(.dark-mode) .form-group input:focus,
    body:not(.dark-mode) .form-group select:focus,
    body:not(.dark-mode) .form-group textarea:focus {
        background: #ffffff;
        border-color: #1e3a8a;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

    /* Buttons - ENHANCED SIZE */
    .btn {
        background: var(--button-gradient);
        color: var(--text-light);
        border: none;
        padding: 18px 40px;
        border-radius: 50px;
        font-size: 1.3rem;
        font-weight: var(--font-weight-semibold);
        cursor: pointer;
        transition: all var(--transition-speed) var(--smooth-timing);
        text-decoration: none;
        display: inline-block;
        box-shadow: var(--shadow-light);
        text-shadow: var(--text-shadow);
        position: relative;
        overflow: hidden;
        border: 1px solid rgba(52, 152, 219, 0.3);
    }

    .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }

    .btn-full {
        width: 100%;
        margin-top: 2rem;
        padding: 25px 40px;
        font-size: 1.5rem;
    }

    .btn-back {
        background: rgba(255, 255, 255, 0.15);
        margin-bottom: 2.5rem;
        font-size: 1.2rem;
        padding: 16px 30px;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .btn-back:hover {
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.5);
        transform: translateY(-2px);
    }

    /* Messages & Loaders - ENHANCED SIZE */
    .result-message {
        margin-top: 2rem;
        padding: 1.5rem;
        border-radius: 15px;
        text-align: center;
        font-weight: var(--font-weight-semibold);
        font-size: 1.3rem;
        text-shadow: var(--text-shadow);
        box-shadow: var(--shadow-light);
        backdrop-filter: blur(10px);
    }

    .result-message.success {
        background: var(--success-gradient);
        color: #ffffff;
        border: 1px solid rgba(16, 185, 129, 0.4);
    }

    .result-message.error {
        background: var(--error-gradient);
        color: #ffffff;
        border: 1px solid rgba(239, 68, 68, 0.4);
    }

    body:not(.dark-mode) .result-message.success {
        background: linear-gradient(135deg, #10b981, #059669);
        color: #ffffff;
    }

    body:not(.dark-mode) .result-message.error {
        background: linear-gradient(135deg, #ef4444, #dc2626);
        color: #ffffff;
    }

    #dialogue-loading-overlay {
        position: fixed;
        top: 20px;
        right: 80px;
        width: auto;
        height: auto;
        background: transparent;
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 10000;
        pointer-events: none;
    }

    #dialogue-loading-overlay>div:first-of-type {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .spinner {
        width: 32px;
        height: 32px;
        border: 3px solid rgba(30, 58, 138, 0.3);
        border-top: 3px solid #1e40af;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    #dialogue-loading-overlay p {
        font-size: 0.9rem;
        font-weight: 500;
        color: #4b5563;
        margin: 0;
    }

    /* Dynamic Questions Container - ENHANCED SIZE */
    .questions-container {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }


    /* =================================================================


/* block 2 */

    /* =================================================================
    // SECTION: Floating Dashboard Popover (New Design)
    // ================================================================= */
    /* header-top-actions position absolute top rem left rem containing block popover */

    .floating-dashboard-popover {
        position: absolute;
        top: 50px;
        left: 0; /* Section */
        width: 200px;
        background: #ffffff;
        border-radius: 18px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        padding: 15px;
        z-index: 1000;
        animation: popIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        border: 1px solid rgba(0,0,0,0.05);
    }

    body.dark-mode .floating-dashboard-popover {
        background: #1e293b;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
        border-color: rgba(255,255,255,0.1);
    }

    @keyframes popIn {
        from { opacity: 0; transform: translateY(-10px) scale(0.95); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }

    .popover-stats-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .popover-stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
    }

    .popover-stat-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Right-aligned text in RTL */
        flex: 1;
        padding-right: 12px;
    }

    .popover-stat-label {
        font-size: 0.75rem;
        color: #94a3b8;
        font-weight: 600;
        margin-bottom: 2px;
    }

    .popover-stat-value {
        font-size: 1.2rem;
        font-weight: 800;
        color: #1e293b;
        line-height: 1;
    }

    body.dark-mode .popover-stat-value {
        color: #f1f5f9;
    }

    .popover-stat-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1rem;
    }

    .popover-stat-icon.purple { background: #6366f1; }
    .popover-stat-icon.red { background: #ef4444; }
    .popover-stat-icon.blue { background: #3b82f6; }

    .popover-mini-loading {
        display: flex;
        justify-content: center;
        padding: 10px 0;
    }

    .mini-spinner {
        width: 20px;
        height: 20px;
        border: 2px solid rgba(0,0,0,0.1);
        border-top-color: #6366f1;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    body.dark-mode .mini-spinner {
        border-color: rgba(255,255,255,0.1);
        border-top-color: #60a5fa;
    }

    .popover-error-message {
        font-size: 0.7rem;
        color: #ef4444;
        text-align: center;
        padding-top: 8px;
    }

    /* Existing Styles below... */


    /* DateTime Top Section - Gray Bars */
    .datetime-inline-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 2rem;
    }

    .datetime-box {
        position: relative;
    }

    .datetime-box label {
        display: block;
        text-align: right;
        font-size: 0.9rem;
        font-weight: 700;
        color: #475569;
        margin-bottom: 8px;
        padding-right: 5px;
    }

    body.dark-mode .datetime-box label {
        color: #94a3b8;
    }

    .datetime-box input {
        width: 100%;
        background: #b0b0b0 !important;
        border: 1px solid #94a3b8;
        border-radius: 12px;
        padding: 15px 20px;
        color: #ffffff !important;
        font-size: 1.1rem;
        font-weight: 700;
        text-align: center;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    body.dark-mode .datetime-box input {
        background: #334155 !important;
        border-color: #475569;
    }

    /* Questions Grid */
    .questions-container-inline {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
        margin-bottom: 2rem;
    }

    @media (max-width: 1400px) {
        .questions-container-inline {
            grid-template-columns: repeat(4, 1fr);
        }
    }

    @media (max-width: 1100px) {
        .questions-container-inline {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    @media (max-width: 800px) {
        .questions-container-inline {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 500px) {
        .questions-container-inline {
            grid-template-columns: 1fr;
        }
    }

    /* Question Card Style */
    .question-card {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 15px;
        padding: 15px;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: all 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
        min-height: 140px;
    }

    body.dark-mode .question-card {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.05);
    }

    .question-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        border-color: #3b82f6;
    }

    .card-icon-top {
        position: absolute;
        top: 12px;
        left: 12px;
        font-size: 1rem;
        opacity: 0.7;
    }

    .question-card-label {
        font-size: 0.95rem;
        font-weight: 800;
        color: #1e3a8a;
        margin-bottom: 12px;
        text-align: center;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }

    body.dark-mode .question-card-label {
        color: #60a5fa;
    }

    .question-card input,
    .question-card select {
        width: 100% !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 10px !important;
        padding: 10px 12px !important;
        font-size: 0.9rem !important;
        background: #ffffff !important;
        color: #334155 !important;
        text-align: center !important;
        transition: all 0.2s ease !important;
    }

    body.dark-mode .question-card input,
    body.dark-mode .question-card select {
        background: #0f172a !important;
        border-color: #334155 !important;
        color: #cbd5e1 !important;
    }

    .question-card input:focus,
    .question-card select:focus {
        border-color: #3b82f6 !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
        outline: none !important;
    }

    /* Special Card for File Upload */
    .file-upload-card {
        grid-column: span 1;
        background: #ffffff;
        border: 2px dashed #3b82f6;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 20px;
        position: relative;
        z-index: 0;
    }

    .btn-upload-modern {
        background: #6366f1;
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 10px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.85rem;
    }

    /* =================================================================
    // SECTION: Premium Dashboard Tables (Recent Records)
    // ================================================================= */

    .recent-records-section {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 20px;
        padding: 25px;
        margin-top: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    }

    body.dark-mode .recent-records-section {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.05);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .recent-records-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 2px solid #f1f5f9;
    }

    body.dark-mode .recent-records-header {
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }

    .recent-records-header h3 {
        font-size: 1.15rem;
        font-weight: 800;
        color: #1e3a8a;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    body.dark-mode .recent-records-header h3 {
        color: #60a5fa;
    }

    .btn-refresh-small {
        background: #f1f5f9;
        color: #64748b;
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-refresh-small:hover {
        background: #e2e8f0;
        color: #1e3a8a;
        transform: rotate(180deg);
    }

    body.dark-mode .btn-refresh-small {
        background: #334155;
        color: #cbd5e1;
    }

    .recent-table-wrapper {
        border-radius: 15px;
        overflow-x: auto;
        border: 1px solid #f1f5f9;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    }

    body.dark-mode .recent-table-wrapper {
        border-color: rgba(255, 255, 255, 0.05);
    }

    .recent-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        text-align: right;
        min-width: 800px;
    }

    .recent-table th {
        background: #1e3a8a;
        color: #ffffff;
        font-weight: 700;
        padding: 18px 15px;
        font-size: 0.95rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        position: sticky;
        top: 0;
    }

    body.dark-mode .recent-table th {
        background: #0f172a;
        color: #94a3b8;
    }

    .recent-table td {
        background: transparent;
        padding: 16px 15px;
        font-size: 0.92rem;
        color: #475569;
        border-bottom: 1px solid #f1f5f9;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    body.dark-mode .recent-table td {
        color: #cbd5e1;
        border-bottom-color: rgba(255, 255, 255, 0.03);
    }

    .recent-table tr:nth-child(even) td {
        background: #f8fafc;
    }

    body.dark-mode .recent-table tr:nth-child(even) td {
        background: rgba(255, 255, 255, 0.01);
    }

    .recent-table tr:hover td {
        background: #edf2f7;
        color: #2b6cb0;
        transform: scale(1.002);
    }

    body.dark-mode .recent-table tr:hover td {
        background: rgba(59, 130, 246, 0.05);
        color: #60a5fa;
    }

    /* LTR */
    .recent-table td.phone-cell,
    .recent-table td.account-cell {
        direction: ltr !important;
        unicode-bidi: isolate !important;
        text-align: left !important;
        font-family: 'Courier New', Courier, monospace !important;
        font-size: 0.88rem !important;
        letter-spacing: 0.3px;
    }

    /* contenteditable */
    .recent-table td.phone-cell[contenteditable="true"],
    .recent-table td.account-cell[contenteditable="true"] {
        direction: ltr !important;
        unicode-bidi: plaintext !important;
    }

    /* Action Buttons in Table */
    .btn-inline-save {
        background: #ffffff;
        color: #3b82f6;
        border: 1.5px solid #e2e8f0;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
    }

    .btn-inline-save:hover {
        background: #3b82f6;
        color: #ffffff;
        border-color: #3b82f6;
        transform: translateY(-2px);
    }

    body.dark-mode .btn-inline-save {
        background: #334155;
        border-color: #475569;
        color: #60a5fa;
    }

    .btn-inline-delete {
        background: #ffffff;
        color: #ef4444;
        border: 1.5px solid #fee2e2;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
    }

    .btn-inline-delete:hover {
        background: #ef4444;
        color: #ffffff;
        border-color: #ef4444;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    }

    body.dark-mode .btn-inline-delete {
        background: #450a0a;
        border-color: #7f1d1d;
        color: #f87171;
    }

    /* Footer styling */
    .recent-records-footer {
        padding-top: 20px;
        border-top: 1px solid #f1f5f9;
        margin-top: 15px !important;
    }

    body.dark-mode .recent-records-footer {
        border-top-color: rgba(255, 255, 255, 0.05);
    }

    .btn-text-only {
        background: #f1f5f9 !important;
        color: #1e3a8a !important;
        padding: 10px 20px !important;
        border-radius: 12px !important;
        font-size: 0.9rem !important;
        transition: all 0.3s ease !important;
        text-decoration: none !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px;
    }

    .btn-text-only:hover {
        background: #e2e8f0 !important;
        color: #1d4ed8 !important;
        transform: translateX(-5px);
    }

    /* Beautiful Pagination for Unified Records */
    .unified-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
        margin-top: 25px;
        padding-top: 20px;
        border-top: 1px solid #f1f5f9;
        direction: rtl;
    }

    body.dark-mode .unified-pagination {
        border-top-color: rgba(255, 255, 255, 0.05);
    }

    .btn-pagination-modern {
        background: #ffffff;
        color: #1e3a8a;
        border: 2px solid #e2e8f0;
        padding: 10px 22px;
        border-radius: 12px;
        font-weight: 700;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        gap: 10px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    }

    .btn-pagination-modern:hover:not(:disabled) {
        background: #1e3a8a !important;
        color: #ffffff !important;
        border-color: #1e3a8a;
        transform: translateY(-2px);
        box-shadow: 0 10px 15px rgba(30, 58, 138, 0.2);
    }

    .btn-pagination-modern:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        filter: grayscale(1);
    }

    body.dark-mode .btn-pagination-modern {
        background: #0f172a;
        color: #60a5fa;
        border-color: #334155;
    }

    .page-indicator-modern {
        background: #f1f5f9;
        color: #475569;
        padding: 8px 18px;
        border-radius: 10px;
        font-weight: 800;
        font-size: 0.9rem;
        border: 1px solid #e2e8f0;
    }

    body.dark-mode .page-indicator-modern {
        background: #1e293b;
        color: #94a3b8;
        border-color: #334155;
    }

    /* Inline Search Bar for Records */
    .records-search-bar {
        position: relative;
        flex: 1;
        max-width: 400px;
        margin-right: 20px;
    }

    .records-search-bar input {
        width: 100%;
        padding: 10px 15px 10px 40px;
        border-radius: 12px;
        border: 1.5px solid #e2e8f0;
        font-size: 0.9rem;
        transition: all 0.3s ease;
        background: #f8fafc;
        text-align: right;
    }

    .records-search-bar i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
    }

    .records-search-bar input:focus {
        border-color: #3b82f6;
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
        outline: none;
    }

    .submit-btn:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-heavy);
    }

    body:not(.dark-mode) .submit-btn:hover {
        box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    }

    .submit-btn:active {
        transform: translateY(-2px);
    }

    .btn-icon {
        margin-left: 10px;
        font-size: 1.3rem;
    }

    .btn-text {
        font-weight: var(--font-weight-bold);
        text-shadow: var(--text-shadow);
    }


/* block 3 */

/* =================================================================
    // SECTION: Advanced Mobile Responsiveness
    // ================================================================= */

    @media (max-width: 768px) {
        .form-container {
            padding: 1.2rem;
            margin: 8px;
            width: calc(100% - 16px);
            border-radius: 16px;
        }

        .header {
            margin-bottom: 15px;
            padding: 10px 0;
        }

        .header h1 {
            font-size: 1.5rem;
            margin-bottom: 6px;
            gap: 10px;
        }

        .header h1 .header-icon {
            font-size: 1.4rem;
        }

        .header p {
            font-size: 0.9rem;
            margin-top: 4px;
        }

        /* Section */
        .question-type {
            font-size: 0.8rem;
            padding: 5px 10px;
        }

        /* Enhanced Mobile Styles */
        .question-item {
            padding: 1rem;
            margin-bottom: 1.2rem;
            border-radius: 12px;
        }

        .question-text {
            font-size: 1rem;
            margin-bottom: 0.6rem;
            line-height: 1.4;
        }

        .question-text .question-icon {
            font-size: 1.1rem;
        }

        .btn {
            padding: 12px 20px;
            font-size: 1rem;
            border-radius: 12px;
            min-height: 44px;
            font-weight: 600;
        }

        .submit-btn {
            padding: 14px 24px;
            font-size: 1.1rem;
            min-height: 48px;
            font-weight: 600;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            padding: 12px 14px;
            font-size: 1rem;
            border-radius: 12px;
            min-height: 44px;
            font-weight: 400;
        }

        .question-item input,
        .question-item select {
            padding: 12px 14px;
            font-size: 1rem;
            min-height: 44px;
        }

        .form-group label {
            font-size: 0.95rem;
            margin-bottom: 6px;
            font-weight: 600;
        }

        .form-group {
            margin-bottom: 1.2rem;
        }

        .form-container h2 {
            font-size: 1.2rem;
            margin-bottom: 1rem;
        }

        /* Section */
        input[type="radio"],
        input[type="checkbox"] {
            transform: scale(1.3);
            margin-right: 10px;
        }

        /* Section */
        select {
            font-size: 1rem;
            padding: 12px 14px;
            min-height: 44px;
        }

        /* Section */
        input::placeholder,
        textarea::placeholder {
            font-size: 0.95rem;
        }
    }

    @media (max-width: 480px) {
        .form-container {
            padding: 1rem;
            margin: 4px;
            width: calc(100% - 8px);
            border-radius: 14px;
        }

        .header {
            margin-bottom: 12px;
            padding: 8px 0;
        }

        .header h1 {
            font-size: 1.3rem;
            margin-bottom: 5px;
            gap: 8px;
        }

        .header h1 .header-icon {
            font-size: 1.2rem;
        }

        .header p {
            font-size: 0.85rem;
            margin-top: 3px;
        }

        /* Section */
        .question-type {
            font-size: 0.75rem;
            padding: 4px 8px;
        }

        .question-item {
            padding: 0.9rem;
            margin-bottom: 1rem;
            border-radius: 12px;
        }

        .question-text {
            font-size: 0.95rem;
            margin-bottom: 0.5rem;
            line-height: 1.35;
        }

        .question-text .question-icon {
            font-size: 1rem;
        }

        .btn {
            padding: 11px 18px;
            font-size: 0.95rem;
            border-radius: 12px;
            min-height: 42px;
            font-weight: 600;
        }

        .submit-btn {
            padding: 13px 22px;
            font-size: 1rem;
            min-height: 46px;
            font-weight: 600;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            padding: 11px 13px;
            font-size: 0.95rem;
            border-radius: 12px;
            min-height: 42px;
            font-weight: 400;
        }

        .question-item input,
        .question-item select {
            padding: 11px 13px;
            font-size: 0.95rem;
            min-height: 42px;
        }

        .form-group label {
            font-size: 0.9rem;
            margin-bottom: 5px;
        }

        .form-group {
            margin-bottom: 1rem;
        }

        .form-container h2 {
            font-size: 1.1rem;
            margin-bottom: 0.9rem;
        }

        /* Section */
        input[type="radio"],
        input[type="checkbox"] {
            transform: scale(1.3);
            margin-right: 8px;
        }

        /* Section */
        select {
            font-size: 0.95rem;
            padding: 11px 13px;
            min-height: 42px;
        }

        /* Section */
        input::placeholder,
        textarea::placeholder {
            font-size: 0.9rem;
        }
    }

    /* Large Screen Optimizations */
    @media (min-width: 1200px) {
        .form-container {
            max-width: 1000px;
            padding: 2rem;
        }

        .header h1 {
            font-size: 2rem;
            font-weight: 700;
        }

        .header p {
            font-size: 1.1rem;
            font-weight: 400;
        }

        .question-item {
            padding: 1.5rem;
            margin-bottom: 1.8rem;
        }

        .question-text {
            font-size: 1.2rem;
            font-weight: 600;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            padding: 14px 18px;
            font-size: 1.05rem;
            font-weight: 400;
        }

        .form-group label {
            font-size: 1.05rem;
            font-weight: 600;
        }

        .btn {
            padding: 14px 32px;
            font-size: 1.1rem;
            font-weight: 600;
        }

        .submit-btn {
            padding: 16px 36px;
            font-size: 1.15rem;
            font-weight: 600;
        }
    }

    /* Tablet Optimizations */
    @media (min-width: 769px) and (max-width: 1024px) {
        .form-container {
            max-width: 850px;
            padding: 1.5rem;
        }

        .header h1 {
            font-size: 1.7rem;
        }

        .header p {
            font-size: 1rem;
        }

        .question-item {
            padding: 1.3rem;
        }

        .question-text {
            font-size: 1.1rem;
        }
    }

    /* Touch Device Optimizations */
    @media (hover: none) and (pointer: coarse) {
        .btn:hover {
            transform: none;
        }

        .btn:active {
            transform: scale(0.97);
        }

        .btn {
            min-height: 44px;
            min-width: 44px;
        }

        /* Section */
        .submit-btn {
            min-height: 48px;
            min-width: 48px;
        }

        /* Section */
        .form-group input,
        .form-group select,
        .form-group textarea {
            min-height: 44px;
        }

        /* Section */
        .question-item input,
        .question-item select {
            min-height: 44px;
        }

        /* Section */
        .question-item {
            margin-bottom: 1.5rem;
        }

        .form-group {
            margin-bottom: 1.5rem;
        }
    }

    /* Luxury Card Styles */
    .card {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 25px;
        padding: 35px 30px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        position: relative;
        overflow: hidden;
    }

    .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transition: left 0.8s ease;
    }

    .card:hover::before {
        left: 100%;
    }

    .card:hover {
        transform: translateY(-15px) scale(1.02);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 215, 0, 0.3);
        border-color: rgba(255, 215, 0, 0.5);
    }

    .card-icon {
        font-size: 4.5em;
        margin-bottom: 25px;
        background: linear-gradient(135deg, #1e3a8a, #1e40af);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
        filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.2));
        transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        display: inline-block;
        position: relative;
        cursor: pointer;
    }

    body:not(.dark-mode) .card-icon {
        background: linear-gradient(135deg, #1e3a8a, #1e40af);
        filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.2));
    }

    .card-icon i {
        background: linear-gradient(135deg, #1e3a8a, #1e40af);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
        transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    body:not(.dark-mode) .card-icon i {
        background: linear-gradient(135deg, #1e3a8a, #1e40af);
        filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.2));
    }

    .card:hover .card-icon {
        transform: scale(1.15) rotate(8deg) translateY(-5px);
        filter: drop-shadow(0 0 25px rgba(230, 215, 0, 0.4));
        animation: iconFloat 2s ease-in-out infinite;
    }

    .card:hover .card-icon i {
        transform: scale(1.2) rotate(-5deg);
        filter: drop-shadow(0 0 20px rgba(230, 215, 0, 0.6));
        animation: iconPulse 1.5s ease-in-out infinite;
    }

    @keyframes iconFloat {

        0%,
        100% {
            transform: scale(1.15) rotate(8deg) translateY(-5px);
        }

        50% {
            transform: scale(1.2) rotate(12deg) translateY(-8px);
        }
    }

    @keyframes iconPulse {

        0%,
        100% {
            transform: scale(1.2) rotate(-5deg);
        }

        50% {
            transform: scale(1.3) rotate(-8deg);
        }
    }

    .card-title {
        font-size: 1.5em;
        font-weight: var(--font-weight-bold);
        color: #FFFFFF;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        letter-spacing: 1px;
        margin-bottom: 15px;
        transition: all 0.3s ease;
    }

    .card:hover .card-title {
        color: #FFFFFF;
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    }

    .card-text {
        font-size: 1.1em;
        color: #FFFFFF;
        line-height: 1.6;
        opacity: 0.9;
        transition: all 0.3s ease;
    }

    .card:hover .card-text {
        opacity: 1;
        color: #FFFFFF;
    }


/* block 4 */

/* =================================================================
    // SECTION: Dialogue Recording Page - Optimized Styles
    // ================================================================= */
