html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 18px;
}

.k-wizard,
.k-wizard .k-stepper,
.k-wizard .k-step-text,
.k-wizard .k-wizard-content,
.k-wizard .k-step-label {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: 18px !important;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
a {
    font-size: 18px !important;
}

label {
    font-size: 18px !important;
}

.k-grid .k-cell-inner > .k-link {
    justify-content: center !important;
    font-weight: bold !important;
}

.k-toolbar {
    justify-content: right !important;
}

.search-box-right input {
    text-align: right !important;
}

.k-table-md {
    font-size: 18px !important;
}

/* grid */
.k-grid.font-size,
/* grid toolbar */
.k-grid.font-size .k-toolbar,
/* grid cells */
.k-grid.font-size table,
/* textboxes */
.k-grid.font-size .k-input,
/* date pickers */
.k-grid.font-size .k-picker,
/* buttons */
.k-grid.font-size .k-button,
.k-grid.font-size .k-button-text,
/* column and filter menu */
.k-button-md,
.k-window,
.k-popup,
.k-popup .k-input,
.k-popup .k-picker,
.k-popup .k-button,
/*column menu dropdowns */
.k-columnmenu-item {
    font-family: Arial !important;
    font-size: 16px !important;
}

.k-form-horizontal .k-form-field > .k-label,
.k-form-horizontal .k-form-field > kendo-label,
.k-form-horizontal .k-form-field > .k-form-label {
    align-items: flex-start !important;
    font-size: 16px !important;
}

.k-window-titlebar,
.k-window-actions {
    background-color: aliceblue !important;
}

/*.k-button-solid-primary,
.k-button-solid-base {
    border-radius: 25px !important;
    box-shadow: 0px 1px 2px rgba(69,73,79,0.6), 0px 1px 3px 1px rgba(69,73,79,0.15) !important;
}*/

.k-rounded-md {
    border-radius: 25px !important;
    box-shadow: 0px 1px 2px rgba(69,73,79,0.6), 0px 1px 3px 1px rgba(69,73,79,0.15) !important;
}

.k-grid th.center-wrap {
    justify-content: center;
    text-align: center;
    white-space: normal;
    vertical-align: middle;
}

    .k-grid th.center-wrap .k-column-title {
        white-space: normal;
    }

.k-grid .k-grid-header .k-table-th {
    vertical-align: middle !important;
}

.demo-notification {
    position: absolute;
}

    .demo-notification .k-notification {
        width: 420px;
    }

#demo-runner {
    height: 400px;
}

.notification-parent {
    position: relative;
    height: 250px;
}

.k-badge {
    margin-left: 5px;
}

.k-notification-container {
    margin: 6px 0;
}

.initial-data-loader .k-loader-container-overlay.k-overlay-light {
    background-color: white;
}

.k-loader-container {
    z-index: 100;
}

.k-menu-link {
    color: blue !important;
}

.k-menu-bar, .k-menu {
    font-size: 18px !important;
}

#rv1 {
    position: relative;
    width: 100%;
    height: 600px;
}

#loading {
    width: 100%;
    height: 600px;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tbs {
    width: 100%;
}

.loader-size-title {
    display: block;
    margin-bottom: 10px;
}

.loader-container {
    text-align: center;
    width: 150px;
    display: inline-table;
    padding-top: 10px;
}

#viewer-container {
    position: relative;
}

.k-tabstrip {
    font-family: Arial !important;
}

.k-grid.font-size, .k-grid.font-size .k-toolbar, .k-grid.font-size table, .k-grid.font-size .k-input, .k-grid.font-size .k-picker, .k-grid.font-size .k-button, .k-grid.font-size .k-button-text, .k-button-md, .k-window, .k-popup, .k-popup .k-input, .k-popup .k-picker, .k-popup .k-button, .k-columnmenu-item {
    font-size: 18px !important;
}

.k-grid .k-master-row.CourseRowClosedFormatting:nth-child(even) td {
    background-color: #fca1a1;
    border-bottom: 1px solid #dcd5d5 !important;
}

.k-grid .k-master-row.CourseRowClosedFormatting:nth-child(odd) td {
    background-color: #f6b9b9;
    border-bottom: 1px solid #dcd5d5 !important;
}

.k-grid .k-master-row.CourseRowOpenedFormatting:nth-child(even) td {
    background-color: #90EE90;
    border-bottom: 1px solid #dcd5d5 !important;
}

.k-grid .k-master-row.CourseRowOpenedFormatting:nth-child(odd) td {
    background-color: #6fef72;
    border-bottom: 1px solid #dcd5d5 !important;
}

.LessThan70CellBackGround {
    background-color: yellow;
    border-bottom: 1px solid #dcd5d5 !important;
}

.lessThan50ValuesRowFormatting {
    background-color: red;
    border-bottom: 1px solid #dcd5d5 !important;
}

.MoreThan70ValuesRowFormatting {
    background-color: lawngreen;
    border-bottom: 1px solid #dcd5d5 !important;
}

.k-grid .k-master-row.RowBorderFormatting td {
    border-bottom: 1px solid #dcd5d5 !important;
}

.no-checkbox input[type="checkbox"] {
    display: none !important;
}

        /* Main Page Header 3D Styling */
        .text-primary.fw-bold.text-center {
            color: #fff !important;
            background: linear-gradient(135deg, #0d6efd, #0043a8);
            padding: 15px;
            border-radius: 12px;
            box-shadow: 0 8px 15px rgba(13, 110, 253, 0.4), inset 0 2px 2px rgba(255,255,255,0.4);
            text-shadow: 1px 2px 3px rgba(0,0,0,0.3);
            margin-bottom: 20px;
            border: 1px solid #0a58ca;
        }

        /* 3D Effect for TabStrip */
        .tbs.k-tabstrip {
            background: linear-gradient(145deg, #ffffff, #f0f0f0);
            border-radius: 16px;
            box-shadow: 8px 8px 16px #d1d9e6, -8px -8px 16px #ffffff;
            padding: 15px;
            border: 1px solid rgba(255,255,255,0.8);
        }

        /* 3D Tabs Styling */
        .k-tabstrip-items .k-item {
            border-radius: 10px 10px 0 0 !important;
            margin-right: 5px;
            transition: all 0.3s ease;
            box-shadow: inset 0 -3px 5px rgba(0,0,0,0.05);
            background: #f8f9fa;
        }
        
        .k-tabstrip-items .k-item.k-active {
            background: #ffffff;
            box-shadow: 0 -4px 10px rgba(0,0,0,0.1), inset 0 2px 2px rgba(255,255,255,1);
            transform: translateY(-2px);
            z-index: 2;
            border-top: 3px solid #0d6efd;
        }

        /* Grid 3D Styling */
        .tbs .k-grid {
            border-radius: 12px;
            overflow: visible;
            box-shadow: inset 4px 4px 8px #d9d9d9, inset -4px -4px 8px #ffffff;
            border: 1px solid #e0e0e0;
            background: #fafafa;
        }

        /* Header 3D Effect */
        .k-grid-header {
            background: linear-gradient(145deg, #ffffff, #e6e6e6) !important;
            box-shadow: 0 4px 6px rgba(0,0,0,0.07);
            border-bottom: 2px solid #ccc;
            border-radius: 12px 12px 0 0;
            position: relative;
            z-index: 2;
        }
        
        .k-grid-header .k-header {
            font-weight: 800;
            color: #2c3e50;
            border-left: 1px solid #ffffff;
            border-right: 1px solid #dcdcdc;
            text-shadow: 1px 1px 1px #fff;
        }

        .k-grid tbody tr {
            background: #ffffff;
        }
        
        .k-grid tbody td {
            border-bottom: 1px solid #f0f0f0;
        }

        /* Custom 3D Buttons */
        .k-button {
            border-radius: 8px !important;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
            transition: all 0.15s ease !important;
            border: 1px solid rgba(0,0,0,0.05) !important;
        }

        .k-button:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 12px rgba(0,0,0,0.15) !important;
            filter: brightness(1.05);
        }

        .k-button:active {
            transform: translateY(1px) !important;
            box-shadow: 0 2px 3px rgba(0,0,0,0.1) !important;
        }
        
        /* Specific Button Enhancements */
        .k-button-solid-primary {
            background: linear-gradient(145deg, #0d6efd, #0b5ed7) !important;
            color: white !important;
            text-shadow: 0 1px 1px rgba(0,0,0,0.3);
            border-color: #0a58ca !important;
        }
        
        .k-button-solid-base {
            background: linear-gradient(145deg, #f8f9fa, #e9ecef) !important;
            color: #212529 !important;
            border-color: #dee2e6 !important;
        }

        .k-button-solid-error {
            background: linear-gradient(145deg, #dc3545, #b02a37) !important;
            color: white !important;
            text-shadow: 0 1px 1px rgba(0,0,0,0.3);
            border-color: #a52834 !important;
        }

        .k-button-solid-success {
            background: linear-gradient(145deg, #198754, #157347) !important;
            color: white !important;
            text-shadow: 0 1px 1px rgba(0,0,0,0.3);
            border-color: #146c43 !important;
        }

        .k-button-solid-warning {
            background: linear-gradient(145deg, #fd7e14, #e86b0c) !important;
            color: white !important;
            text-shadow: 0 1px 1px rgba(0,0,0,0.3);
            border-color: #d8640b !important;
        }

        .k-button-solid-dark {
            background: linear-gradient(145deg, #343a40, #212529) !important;
            color: white !important;
            text-shadow: 0 1px 1px rgba(0,0,0,0.3);
            border-color: #1a1e21 !important;
        }

        /* Search Box 3D */
        .k-searchbox {
            border-radius: 20px !important;
            box-shadow: inset 2px 2px 5px #d1d9e6, inset -2px -2px 5px #ffffff !important;
            border: none !important;
            background: #f4f6f9 !important;
            padding: 4px 15px !important;
            transition: all 0.3s ease;
        }
        
        .k-searchbox:focus-within {
            box-shadow: inset 3px 3px 6px #c4cde0, inset -3px -3px 6px #ffffff, 0 0 0 3px rgba(13,110,253,0.2) !important;
            background: #ffffff !important;
        }
        
        /* 3D Modals/Popups */
        .custom-popup .k-window, .k-dialog, .k-window {
            border-radius: 16px !important;
            box-shadow: 0 25px 50px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.5) !important;
            background: linear-gradient(145deg, #ffffff, #f5f7fa) !important;
            border: none !important;
            overflow: hidden;
        }
        
        .k-window-titlebar {
            background: linear-gradient(135deg, #0d6efd, #0043a8) !important;
            color: #ffffff !important;
            border-bottom: 2px solid #0043a8 !important;
            padding: 15px !important;
            text-shadow: 1px 2px 3px rgba(0,0,0,0.3);
        }

        .k-window-titlebar .k-window-title {
            font-weight: bold;
            font-size: 1.1rem;
        }
        
        .k-window-titlebar .k-button-icon {
            color: #ffffff !important;
        }

        /* Delete Confirmation / Dialog Overrides */
        .k-dialog .k-window-titlebar {
            background: linear-gradient(135deg, #dc3545, #a52834) !important;
            border-bottom: 2px solid #9c1c28 !important;
        }
        
        .k-dialog .k-actions .k-button-solid-primary {
            background: linear-gradient(145deg, #dc3545, #b02a37) !important;
            border-color: #a52834 !important;
            color: white !important;
        }

        .k-dialog .k-actions .k-button-solid-base {
            background: linear-gradient(145deg, #0d6efd, #0b5ed7) !important;
            border-color: #0a58ca !important;
            color: white !important;
        }

        /* Mobile-responsive popup */
        .loan-form-popup.k-window {
            max-width: 95vw !important;
        }

        @media (max-width: 768px) {
            .loan-form-popup.k-window,
            .loan-form-popup .k-window {
                width: 95vw !important;
                max-width: 95vw !important;
                left: 2.5vw !important;
                right: 2.5vw !important;
                top: 10px !important;
                transform: none !important;
                margin: 0 auto !important;
            }

            .loan-form-popup .k-window-content {
                max-height: 80vh !important;
                overflow-y: auto !important;
                -webkit-overflow-scrolling: touch;
                padding: 10px !important;
            }

            .k-overlay {
                position: fixed !important;
            }
        }

/* ── People-picker popup ─────────────────────────────────────────── */
.people-picker-popup.k-window {
    width: 750px !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
}

.people-picker-popup .k-window-content {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

.people-picker-actions .k-button {
    min-width: 140px;
}

@media (max-width: 640px) {
    /* Window fills almost the full viewport */
    .people-picker-popup.k-window {
        width: 96vw !important;
        max-width: 96vw !important;
        left: 2vw !important;
        right: 2vw !important;
        top: 8px !important;
        transform: none !important;
        margin: 0 auto !important;
        max-height: 92vh !important;
    }

    .people-picker-popup .k-window-content {
        padding: 8px !important;
        max-height: calc(92vh - 56px) !important;
        overflow-y: auto !important;
    }

    /* Reduce grid height so buttons are always visible */
    .people-picker-grid .k-grid-container,
    .people-picker-grid {
        height: 260px !important;
        max-height: 260px !important;
    }

    /* Prevent horizontal overflow inside grid on mobile */
    .people-picker-grid .k-grid-content,
    .people-picker-grid .k-grid-header-wrap {
        overflow-x: hidden !important;
    }

    /* Stack Save / Cancel buttons full-width */
    .people-picker-actions {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .people-picker-actions .k-button {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ── Global mobile grid & page fixes (≤ 640 px) ─────────────────── */
@media (max-width: 640px) {

    /* ── Page header: stack back-button above title ── */
    .activity-page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px;
    }

    .activity-page-header h3 {
        text-align: center !important;
        font-size: 1rem !important;
        margin-bottom: 0 !important;
    }

    .activity-page-header .k-button {
        width: 100% !important;
        justify-content: center !important;
    }

    /* ── Grid toolbar: wrap items & let search fill full row ── */
    .k-toolbar {
        flex-wrap: wrap !important;
        height: auto !important;
        min-height: 44px;
        padding: 4px 6px !important;
        gap: 4px !important;
    }

    .k-toolbar .k-searchbox,
    .k-toolbar .k-grid-search {
        width: 100% !important;
        order: -1;
        flex: 1 1 100% !important;
    }

    .k-toolbar .k-button,
    .k-toolbar .k-grid-toolbar-button {
        flex: 1 1 auto;
    }

    /* ── Grid: horizontal scroll via wrapper — explicit column widths do the rest ── */
    .k-grid-header-wrap {
        overflow-x: auto !important;
    }

    .k-grid-content {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Hide verbose toolbar labels on mobile to save space */
    .toolbar-label {
        display: none !important;
    }

    /* ── Custom edit popup (GridPopupEditSettings Class="custom-popup") ── */
    .custom-popup.k-window {
        width: 96vw !important;
        max-width: 96vw !important;
        left: 2vw !important;
        right: 2vw !important;
        top: 8px !important;
        transform: none !important;
        margin: 0 !important;
    }

    .custom-popup .k-window-content {
        max-height: calc(90vh - 60px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        padding: 10px !important;
    }

    /* ── Confirm-delete dialog ── */
    .k-dialog.k-window {
        width: 90vw !important;
        max-width: 90vw !important;
        left: 5vw !important;
        right: 5vw !important;
        transform: none !important;
    }

    /* ── Pager: compact on mobile ── */
    .k-pager {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 4px !important;
    }

    .k-pager-sizes {
        display: none !important;
    }
}

/* ===== Home Page Styles ===== */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 60%, #084298 100%);
    color: white;
    padding: 70px 20px;
    text-align: center;
    border-radius: 0 0 40px 40px;
    margin-bottom: 50px;
}

.hero-section h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-section p {
    font-size: 1.15rem;
    opacity: 0.9;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 50px;
    padding: 6px 20px;
    font-size: 0.95rem;
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #0d6efd;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 4px;
}

.about-card {
    background: linear-gradient(135deg, #f0f7ff, #e8f4e8);
    border-radius: 20px;
    padding: 36px;
    margin-bottom: 50px;
    border-right: 5px solid #0d6efd;
}

.section-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 30px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #0d6efd;
    border-radius: 2px;
    margin: 10px auto 0;
}

.service-card {
    background: white;
    border-radius: 18px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 3px 16px rgba(0,0,0,0.07);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-top: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(13,110,253,0.15);
    border-top-color: #0d6efd;
}

.service-icon {
    font-size: 2.8rem;
    margin-bottom: 14px;
    display: block;
}

.service-card h6 {
    font-weight: 700;
    font-size: 1rem;
    color: #212529;
    margin-bottom: 8px;
}

.service-card p {
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.footer-banner {
    background: linear-gradient(135deg, #e8f4fd, #d1ecf1);
    border-radius: 18px;
    padding: 28px 32px;
    text-align: center;
    border: 1px solid #bee5eb;
    margin-top: 50px;
}

/* ================================================================
   MOBILE RESPONSIVE — tablets + phones (≤ 768 px)
   ================================================================ */
@media (max-width: 768px) {

    /* ── Responsive base font size ── */
    html, body { font-size: 14px !important; }

    a        { font-size: 14px !important; }
    label    { font-size: 14px !important; }

    .k-wizard, .k-wizard .k-stepper, .k-wizard .k-step-text,
    .k-wizard .k-wizard-content, .k-wizard .k-step-label {
        font-size: 14px !important;
    }

    .k-table-md                   { font-size: 14px !important; }
    .k-menu-bar, .k-menu           { font-size: 14px !important; }

    .k-grid.font-size,
    .k-grid.font-size .k-toolbar,
    .k-grid.font-size table,
    .k-grid.font-size .k-input,
    .k-grid.font-size .k-picker,
    .k-grid.font-size .k-button,
    .k-grid.font-size .k-button-text,
    .k-button-md,
    .k-window,
    .k-popup, .k-popup .k-input,
    .k-popup .k-picker,
    .k-popup .k-button,
    .k-columnmenu-item             { font-size: 14px !important; }

    /* ── All Telerik popup / dialog windows ── */
    .k-window {
        width: 95vw   !important;
        max-width: 95vw !important;
        min-width: unset !important;
    }

    .k-window-content {
        max-height: 82vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* ── Notifications ── */
    .demo-notification .k-notification {
        width: 90vw    !important;
        max-width: 90vw !important;
    }

    /* ── Report viewer ── */
    #rv1    { height: 70vh !important; min-height: 300px; }
    #loading { height: 70vh !important; min-height: 300px; }

    /* ── Misc containers ── */
    .notification-parent { height: auto !important; min-height: 50px; }
    #demo-runner          { height: auto !important; }
    .loader-container     { width: 110px; }

    /* ── Profile avatar in navbar ── */
    .profile-avatar {
        width: 48px  !important;
        height: 48px !important;
    }

    /* ── QR code ── */
    .k-qrcode          { max-width: 100% !important; }
    .k-qrcode svg      { width: 100% !important; max-width: 180px !important; height: auto !important; }

    /* ── Responsive upload / form wrappers ── */
    .k-form-field-wrap  { min-width: unset !important; width: 100% !important; }

    /* ── Responsive images inside cards ── */
    .card img           { max-width: 100% !important; height: auto !important; }

    /* ── Rich-text editor ── */
    .k-editor           { height: 250px !important; }

    /* ── Hero section ── */
    .hero-section        { padding: 36px 12px; }
    .hero-section h1     { font-size: 1.5rem; }
    .hero-section p      { font-size: 1rem; }

    /* ── Stat cards ── */
    .stat-number         { font-size: 1.5rem; }

    /* ── About card ── */
    .about-card          { padding: 20px 16px; }
}

@media print {
    div[style*="text-align:right"],
    span[style*="text-align:right"],
    div[style*="text-align: right"],
    span[style*="text-align: right"] {
        direction: rtl !important;
        unicode-bidi: embed !important;
    }
}
