@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:ital,wght@0,100..700;1,100..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #16276c;
    --primary-color-dark: #293d90;
    --primary-color-light-gradient: #6b8eff;
    --primary-text-color: #1b3291;
    --header-text-color: #3249a4;
    --loader-text-color: #3249a4;

    --bg-light: #f8f9fc;
    --bg-white: #ffffff;
    --bg-dark: #11161e;
    --bg-darker: #000000;

    --text-dark: #333;
    --text-light: #555;
    --text-on-dark: #e2e8f0;
    --text-light-on-dark: #94a3b8;

    --border-color: #eef2f9;
    --border-color-dark: #334155;
    --border-color-dashed-dark: #475569;

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.25);
    --border-radius: 12px;

    --status-approved: #2ecc71;
    --status-pending: #f39c12;
    --status-rejected: #e74c3c;
    --success-accent: rgb(20, 175, 20);

    --input-bg: #fdfdff;
    --input-border: #ddd;
    --input-bg-dark: #1a2436;
    --input-border-dark: #4b5a70;
}

[data-theme="dark"] {
    --primary-color: #5865f2;
    --primary-color-dark: #4752c4;
    --primary-color-light-gradient: #4f5bcf;
    --primary-text-color: #939dff;
    --header-text-color: #a9b0ff;
    --loader-text-color: #a9b0ff;

    --bg-light: #0f172a;
    --bg-white: #1e293b;
    
    --text-dark: #e2e8f0;
    --text-light: #94a3b8;
    --text-on-dark: #e2e8f0;
    --text-light-on-dark: #94a3b8;

    --border-color: #334155;
    --border-color-dark: #334155;
    --border-color-dashed-dark: #475569;
    
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    
    --success-accent: #34d399;

    --input-bg: #1a2436;
    --input-border: #4b5a70;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", "Kantumruy Pro", sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    transition: all 0.2s ease-in-out;
}

.text-center {
    text-align: center;
}

.text-danger {
    color: #e74c3c;
}

.scrim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.dashboard-container.sidebar-open .scrim {
    opacity: 1;
    visibility: visible;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-light);
    /* background-image: url('angkor_wat_destop.png'); */
    background-size: cover;
    padding: 20px;
}

.login-form {
    background: transparent; /* Makes the background transparent */
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 450px;
}


.login-form .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-form .logo h1 {
    color: var(--primary-text-color);
    font-weight: 700;
    font-size: 26px;
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
}

.form {
    --bg-light: #efefef;
    --bg-dark: #707070;
    --clr: #58bc82;
    --clr-alpha: #9c9c9c60;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.form .input-span {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form input[type="text"],
.form input[type="password"] {
    border-radius: 0.5rem;
    padding: 1rem 0.75rem;
    width: 100%;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--clr-alpha);
    outline: 2px solid var(--bg-dark);
}

.form input[type="text"]:focus,
.form input[type="password"]:focus {
    outline: 2px solid var(--primary-color);
}

.label {
    align-self: flex-start;
    color: var(--primary-text-color);
    font-weight: 600;
}

.form .submit {
    padding: 1rem 0.75rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    border-radius: 3rem;
    background-color: var(--primary-text-color);
    color: var(--bg-light);
    border: none;
    cursor: pointer;
    transition: all 300ms;
    font-weight: 600;
    font-size: 0.9rem;
}

.form .submit:hover {
    background-color: var(--status-approved);
    color: var(--bg-white);
}

.span {
    text-decoration: none;
    color: var(--bg-dark);
}

.span a {
    color: red;
}

.dashboard-container {
    display: none;
    position: relative;
}

.dashboard-sidebar {
    background: var(--bg-white);
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid var(--border-color);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: transparent;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid transparent;
    position: sticky;
    top: 0;
    z-index: 998;
    margin-left: 260px;
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.dashboard-header.scrolled {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

[data-theme="dark"] .dashboard-header.scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dashboard-content {
    margin-left: 260px;
    padding: 30px;
    transition: margin-left 0.3s ease-in-out;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hamburger-btn {
    font-size: 22px;
    color: #555;
    display: none;
}

.header-left h1 {
    color: var(--header-text-color);
    font-size: 22px;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-profile span {
    font-weight: 500;
}

.sidebar-logo {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--primary-text-color);
    font-weight: 700;
}

.sidebar-logo img {
    height: 60px;
    width: auto;
}

.dashboard-sidebar nav {
    flex-grow: 1;
    overflow-y: auto; 
    min-height: 0;  
}

.dashboard-sidebar nav ul {
    list-style: none;
    padding: 20px 0;
}

.dashboard-sidebar nav ul li a {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    margin: 4px 10px;
    color: var(--text-light);
    border-radius: 8px;
    transition: all 0.3s;
    white-space: nowrap;
    font-weight: 500;
    font-size: 14px;
}

.dashboard-sidebar nav ul li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.dashboard-sidebar nav ul li.active a {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.2);
}

[data-theme="dark"] .dashboard-sidebar nav ul li.active a {
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.dashboard-sidebar nav ul li a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    font-size: 1.1em;
}

.sidebar-footer {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #aaa;
    border-top: 1px solid var(--border-color);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light-gradient));
    color: #ffffff;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.welcome-section h2 {
    color: #ffffff;
    margin-bottom: 5px;
    font-size: 26px;
    font-weight: 600;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-white);
    padding: 25px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: #f0f4ff;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: var(--primary-color);
    font-size: 26px;
    flex-shrink: 0;
}

[data-theme="dark"] .stat-icon {
    background: var(--bg-darker);
    color: var(--primary-color);
}

.stat-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-light);
    font-size: 14px;
    word-break: break-all;
}

.chart-card {
    background: var(--bg-white);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-top: 30px;
}

.chart-card h3 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

.profile-section {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.profile-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    flex: 1;
    min-width: 300px;
}

.profile-card h3 {
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.avatar-card {
    flex-basis: 350px;
    flex-grow: 0;
    text-align: center;
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px auto;
    border: 5px solid var(--bg-light);
}

.profile-details input.detail-value {
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px 8px;
    text-align: right;
    color: var(--text-dark);
    font-size: inherit;
    font-family: inherit;
    width: auto;
    min-width: 50%;
    flex-grow: 1;
    transition: background-color 0.3s, border-color 0.3s;
}

.profile-details input.detail-value::-webkit-outer-spin-button,
.profile-details input.detail-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.profile-details input.detail-value[type=number] {
    -moz-appearance: textfield;
}

.profile-details input.detail-value:not([readonly]) {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    text-align: left;
}

.profile-details input.detail-value:not([readonly]):focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

.profile-details .detail-row {
    align-items: center;
}

#profile-update-error {
    color: #e74c3c;
    margin-top: 15px;
    text-align: left;
    font-size: 14px;
}

.profile-details .detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px dashed var(--border-color-dashed-dark);
}

.profile-details .detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.profile-details .detail-label {
    font-weight: 500;
    color: var(--text-light);
}

.profile-details .detail-value {
    color: var(--success-accent);
    text-align: right;
    font-weight: 600px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h3 {
    font-size: 22px;
    font-weight: 600;
}

.permission-form-container,
.class-form-container {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    font-size: 16px;
    background-color: var(--input-bg);
    color: var(--text-dark);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus {
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 1em;
    color: var(--text-light);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.class-request-item {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    border: 1px solid var(--border-color);
}

.class-request-item h4 {
    margin-bottom: 15px;
}

.btn-remove-class {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    color: #e74c3c;
    border-radius: 5px;
    font-size: 12px;
}

.btn-remove-class:hover {
    background: #e74c3c;
    color: var(--bg-white);
}

.btn-primary,
.btn-submit {
    padding: 12px 22px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 8px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover,
.btn-submit:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-primary:hover,
[data-theme="light"] .btn-submit:hover {
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.3);
}
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-submit:hover {
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.btn-secondary {
    padding: 12px 22px;
    background: #6c757d;
    color: #ffffff;
    border-radius: 8px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-cancel {
    padding: 12px 22px;
    background: var(--bg-light);
    border: 1px solid var(--input-border);
    color: var(--text-light);
    border-radius: 8px;
    font-weight: 500;
}

.btn-cancel:hover {
    background: var(--border-color);
}

.btn-view {
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 5px;
    font-size: 13px;
}

.btn-view:hover {
    background-color: var(--primary-color-dark);
}

.btn-edit {
    padding: 6px 12px;
    background-color: #f39c12;
    color: var(--bg-white);
    border-radius: 5px;
    font-size: 13px;
}

.btn-edit:hover {
    background-color: #d8890b;
}

td[data-label="Actions"] > button+button {
    margin-left: 5px;
}

.requests-table {
    background: var(--bg-white);
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(to right, white 30%, rgba(255, 255, 255, 0)), linear-gradient(to right, rgba(255, 255, 255, 0), white 70%) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0;
    background-repeat: no-repeat;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
}

[data-theme="dark"] .table-responsive {
    background: linear-gradient(to right, var(--bg-white) 30%, transparent), linear-gradient(to right, transparent, var(--bg-white) 70%) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.2), transparent), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.2), transparent) 100% 0;
    background-repeat: no-repeat;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

table th {
    background: var(--bg-light);
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 10px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 14px;
    vertical-align: middle;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background-color: var(--bg-light);
}

.status-pending {
    color: var(--status-pending);
    font-weight: 500;
}

.status-approved {
    color: var(--status-approved);
    font-weight: 500;
}

.status-rejected {
    color: var(--status-rejected);
    font-weight: 500;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    padding-top: 60px;
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--bg-white);
    margin: 5% auto;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 650px;
    border-radius: var(--border-radius);
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.modal .close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    transition: 0.3s;
}

.modal .close-btn:hover,
.modal .close-btn:focus {
    color: var(--text-dark);
    cursor: pointer;
}

#detail-modal h2 {
    margin-bottom: 20px;
    font-weight: 600;
}

#detail-modal .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

#detail-modal .detail-row:last-child {
    border-bottom: none;
}

#detail-modal .detail-label {
    font-weight: 600;
    color: var(--text-dark);
}

#detail-modal .detail-value {
    color: var(--text-light);
}

#loading-overlay,
#image-modal,
#crop-modal {
    z-index: 9999;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    display: none;
}

[data-theme="dark"] #loading-overlay {
    background: rgba(0, 0, 0, 0.85);
}

.loader-container {
    text-align: center;
}

.loading-message {
    margin-top: 20px;
    font-weight: 700;
    color: var(--loader-text-color);
    font-size: 1.2em;
    letter-spacing: 1px;
}

.pl {
    width: 8em;
    height: 8em;
}

.pl__ring {
    animation: ringA 2s linear infinite;
}

.pl__ring--a { stroke: #f42f25; }
.pl__ring--b { animation-name: ringB; stroke: #f49725; }
.pl__ring--c { animation-name: ringC; stroke: #255ff4; }
.pl__ring--d { animation-name: ringD; stroke: #f42582; }

@keyframes ringA { from, 4% { stroke-dasharray: 0 660; stroke-width: 20; stroke-dashoffset: -330; } 12% { stroke-dasharray: 60 600; stroke-width: 30; stroke-dashoffset: -335; } 32% { stroke-dasharray: 60 600; stroke-width: 30; stroke-dashoffset: -595; } 40%, 54% { stroke-dasharray: 0 660; stroke-width: 20; stroke-dashoffset: -660; } 62% { stroke-dasharray: 60 600; stroke-width: 30; stroke-dashoffset: -665; } 82% { stroke-dasharray: 60 600; stroke-width: 30; stroke-dashoffset: -925; } 90%, to { stroke-dasharray: 0 660; stroke-width: 20; stroke-dashoffset: -990; } }
@keyframes ringB { from, 12% { stroke-dasharray: 0 220; stroke-width: 20; stroke-dashoffset: -110; } 20% { stroke-dasharray: 20 200; stroke-width: 30; stroke-dashoffset: -115; } 40% { stroke-dasharray: 20 200; stroke-width: 30; stroke-dashoffset: -195; } 48%, 62% { stroke-dasharray: 0 220; stroke-width: 20; stroke-dashoffset: -220; } 70% { stroke-dasharray: 20 200; stroke-width: 30; stroke-dashoffset: -225; } 90% { stroke-dasharray: 20 200; stroke-width: 30; stroke-dashoffset: -305; } 98%, to { stroke-dasharray: 0 220; stroke-width: 20; stroke-dashoffset: -330; } }
@keyframes ringC { from { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: 0; } 8% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -5; } 28% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -175; } 36%, 58% { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: -220; } 66% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -225; } 86% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -395; } 94%, to { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: -440; } }
@keyframes ringD { from, 8% { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: 0; } 16% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -5; } 36% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -175; } 44%, 50% { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: -220; } 58% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -225; } 78% { stroke-dasharray: 40 400; stroke-width: 30; stroke-dashoffset: -395; } 86%, to { stroke-dasharray: 0 440; stroke-width: 20; stroke-dashoffset: -440; } }

#modal-image {
    margin: auto;
    display: block;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    animation: zoomIn 0.3s ease-in-out;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#image-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

#image-modal-close:hover,
#image-modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

#crop-modal .modal-content {
    max-width: 550px;
    width: 90%;
}

.image-crop-wrapper {
    width: 100%;
    max-height: 60vh;
    margin-bottom: 20px;
    background-color: #2e2e2e;
    border-radius: 8px;
    overflow: hidden;
}

#image-to-crop {
    display: block;
    max-width: 100%;
}

#crop-modal .form-actions {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.theme-switcher-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    margin: 10px;
    border-top: 1px solid var(--border-color);
}
.theme-switcher-label {
    font-weight: 500;
    color: var(--text-light);
    font-size: 14px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}
input:checked + .slider {
    background-color: var(--primary-color);
}
input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}
input:checked + .slider:before {
    transform: translateX(24px);
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}

@media (max-width: 992px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
    }

    .dashboard-container.sidebar-open .dashboard-sidebar {
        transform: translateX(0);
        box-shadow: var(--shadow);
    }

    .dashboard-header,
    .dashboard-content {
        margin-left: 0;
    }

    .hamburger-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .dashboard-content {
        padding: 20px;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
    }

    .form-row .form-group {
        margin-bottom: 20px;
    }

    .profile-section {
        flex-direction: column;
    }

    .profile-details .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        text-align: left;
    }

    .profile-details .detail-value {
        text-align: left;
    }

    #image-modal-close {
        font-size: 30px;
        top: 10px;
        right: 20px;
    }

    #modal-image {
        max-width: 95vw;
    }

    .table-responsive {
        background: none;
        overflow-x: visible;
    }

    .requests-table table,
    #classroom-table,
    #daily-record-table {
        border: none;
        white-space: normal;
    }

    .requests-table thead,
    #classroom-table thead,
    #daily-record-table thead {
        display: none;
    }

    .requests-table tr,
    #classroom-table tr,
    #daily-record-table tr {
        display: block;
        margin-bottom: 20px;
        border-radius: var(--border-radius);
        border: 1px solid var(--border-color);
        padding: 15px;
        background: var(--bg-white);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    .requests-table tr:hover,
    #classroom-table tr:hover,
    #daily-record-table tr:hover {
        background: var(--bg-white);
    }

    .requests-table td,
    #classroom-table td,
    #daily-record-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px dashed var(--border-color-dashed-dark);
        border-right: none;
    }

    .requests-table td:last-child,
    #classroom-table td:last-child,
    #daily-record-table td:last-child {
        border-bottom: none;
    }

    .requests-table td[data-label="Reason"],
    .requests-table td[data-label="Class Details"],
    #daily-record-table td[data-label="Learning Outcomes"],
    #daily-record-table td[data-label="Learning Contents"],
    #daily-record-table td[data-label="Comments"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .requests-table td[data-label="Actions"],
    #classroom-table td[data-label="Actions"],
    #daily-record-table td[data-label="Actions"] {
        justify-content: center;
        padding-top: 15px;
        gap: 10px;
    }

    .requests-table td::before,
    #classroom-table td::before,
    #daily-record-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-dark);
        text-align: left;
        padding-right: 10px;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .login-form,
    .profile-card,
    .requests-table,
    .permission-form-container,
    .class-form-container,
    .welcome-section {
        padding: 20px;
    }

    .dashboard-header {
        padding: 15px;
    }

    .dashboard-content {
        padding: 15px;
    }

    .user-profile span {
        display: none;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
        justify-content: center;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }

    #crop-modal .modal-content {
        width: 95vw;
        padding: 15px;
    }

    #crop-modal h2 {
        font-size: 18px;
    }

    .image-crop-wrapper {
        max-height: 65vh;
    }

    #crop-modal .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    #crop-modal .form-actions button {
        width: 100%;
        padding: 14px;
    }

    #daily-record-view .section-header,
    #classroom-list-view .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    #back-to-classrooms-btn,
    #add-daily-record-btn,
    #export-report-btn {
        width: 100%;
        justify-content: center;
    }

    #add-daily-record-btn,
    #export-report-btn {
        margin-bottom: 30px;
    }

    #back-to-classrooms-btn,
    #export-report-btn {
        margin-bottom: 10px;
    }
}

.input-span,
.form-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    z-index: 2;
    transition: color 0.2s ease-in-out;
}

.toggle-password:hover {
    color: var(--primary-color);
}

[data-theme="dark"] .toggle-password:hover {
    color: var(--primary-color);
}


.login-form .input-span .toggle-password {
    top: 65%;
}

#change-password-form .form-group .toggle-password {
    top: 65%;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .login-container {
    position: relative;
    background-image: url('bg.wh.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    }

    
    .login-form {
    background: rgba(24, 13, 13, 0.9);
    background: transparent; 
    }

    [data-theme="dark"] .login-form {
        background: rgba(15, 23, 42, 0.9);
    }
}

#dashboard-sidebar nav {

    scrollbar-width: none;
    -ms-overflow-style: none;
}

#dashboard-sidebar nav::-webkit-scrollbar {
    display: none;
}

.progress-bar-container {
    width: 100%;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-bar {
    width: 0%;
    height: 10px;
    background-color: var(--primary-color);
    transition: width 0.4s ease-in-out;
}

.progress-text {
    font-size: 10px;
    color: var(--text-light);
    text-align: right;
}

@media (max-width: 768px) {
    #classroom-table td[data-label="Progress"] {
        flex-direction: column;
        align-items: flex-end;
    }
}

.filter-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-container select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-dark);
    font-size: 14px;
}

.btn-filter, .btn-reset {
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-filter {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-filter:hover {
    background-color: var(--primary-color-dark);
}

.btn-reset {
    background-color: #6c757d;
    color: #ffffff;
}

.btn-reset:hover {
    background-color: #5a6268;
}

@media (max-width: 1200px) {
    .section-header {
        flex-wrap: wrap;
        gap: 15px;
    }

    .filter-container {
        order: 3; /* Move filters to the next line on smaller screens */
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 576px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-container > * {
        width: 100%;
    }
}

button:focus {
    outline: none;
    box-shadow: none;
}

.fab-wrapper {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    z-index: 999;
    display: none; 
}

.fab-checkbox {
    display: none;
}

.fab {
    position: absolute;
    bottom: -1rem;
    right: -1rem;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light-gradient));
    box-shadow: 0px 5px 20px #81a4f1;
    transition: all 0.3s ease;
    z-index: 1;
    border-bottom-right-radius: 6px;
    border: 1px solid #0c50a7;
    cursor: pointer;
}

.fab:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.fab-checkbox:checked~.fab:before {
    width: 90%;
    height: 90%;
    left: 5%;
    top: 5%;
    background-color: rgba(255, 255, 255, 0.2);
}

.fab:hover {
    background: #2c87e8;
    box-shadow: 0px 5px 20px 5px #81a4f1;
}

.fab-dots {
    position: absolute;
    height: 8px;
    width: 8px;
    background-color: white;
    border-radius: 50%;
    top: 50%;
    -webkit-transform: translateX(0%) translateY(-50%) rotate(0deg); /* For Safari */
    transform: translateX(0%) translateY(-50%) rotate(0deg);
    opacity: 1;
        -webkit-animation: blink 3s ease-in-out infinite; /* For Safari */
    animation: blink 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.fab-dots-1 {
    left: 15px;
    animation-delay: 0s;
}

.fab-dots-2 {
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    animation-delay: 0.4s;
}

.fab-dots-3 {
    right: 15px;
    animation-delay: 0.8s;
}

.fab-checkbox:checked~.fab .fab-dots {
    height: 6px;
}

.fab .fab-dots-2 {
    transform: translateX(-50%) translateY(-50%) rotate(0deg);
}

.fab-checkbox:checked~.fab .fab-dots-1 {
    width: 32px;
    border-radius: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(-50%) rotate(45deg);
}

.fab-checkbox:checked~.fab .fab-dots-3 {
    width: 32px;
    border-radius: 10px;
    right: 50%;
    transform: translateX(50%) translateY(-50%) rotate(-45deg);
}

@-webkit-keyframes blink { /* For Safari */
    50% {
        opacity: 0.25;
    }
}

@keyframes blink {
    50% {
        opacity: 0.25;
    }
}

.fab-checkbox:checked~.fab .fab-dots {
    animation: none;
}

.fab-wheel {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10rem;
    height: 10rem;
    transition: all 0.3s ease;
    transform-origin: bottom right;
    transform: scale(0);
}

.fab-checkbox:checked ~ .fab-wheel {
    transform: scale(1);
}

.fab-action {
    position: absolute;
    background: #0f1941;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: White;
    box-shadow: 0 0.1rem 1rem rgba(24, 66, 154, 0.82);
    transition: all 0.3s ease;
    -webkit-box-shadow: 0px 5px 20px #81a4f1; /* For Safari */
    -webkit-transition: all 0.3s ease; /* For Safari */
    opacity: 0; 
    text-decoration: none;

}

.fab-checkbox:checked ~ .fab-wheel .fab-action {
    opacity: 1;
}

.fab-wheel .fab-action-1 {
    right: -1rem;
    top: 0;
}

.fab-wheel .fab-action-2 {
    right: 3.4rem;
    top: 0.5rem;
}

.fab-wheel .fab-action-3 {
    left: 0.5rem;
    bottom: 3.4rem;
}

.fab-wheel .fab-action-4 {
    left: 0;
    bottom: -1rem;
}

/* Replace your existing .hamburger-btn CSS with this */
.hamburger-btn {
    width: 30px;
    height: 22px;
    position: relative;
    transform: rotate(0deg);
    transition: .5s ease-in-out;
    cursor: pointer;
    display: none; /* Keep your existing display logic */
}

.hamburger-btn span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #555; /* Or your desired icon color */
    border-radius: 9px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

/* Style for dark mode */
[data-theme="dark"] .hamburger-btn span {
    background: #e2e8f0;
}


/* Top bar */
.hamburger-btn span:nth-child(1) {
    top: 0px;
}

/* Middle bar */
.hamburger-btn span:nth-child(2),
.hamburger-btn span:nth-child(3) {
    top: 10px;
}

/* Bottom bar */
.hamburger-btn span:nth-child(4) {
    top: 20px;
}

/* Animation to "X" */
.hamburger-btn.is-active span:nth-child(1) {
    top: 10px;
    width: 0%;
    left: 50%;
}

.hamburger-btn.is-active span:nth-child(2) {
    transform: rotate(45deg);
}

.hamburger-btn.is-active span:nth-child(3) {
    transform: rotate(-45deg);
}

.hamburger-btn.is-active span:nth-child(4) {
    top: 10px;
    width: 0%;
    left: 50%;
}

/* Show the hamburger button on smaller screens (as per your existing media query) */
@media (max-width: 992px) {
    .hamburger-btn {
        display: block;
    }
}
.hamburger-btn,
.btn-primary,
.btn-submit,
.btn-secondary,
.btn-cancel,
.btn-view,
.btn-edit,
.btn-filter,
.btn-reset,
.submit,
.fab,
.fab-action,
.toggle-password,
.slider.round,
.dashboard-sidebar nav a {
-webkit-tap-highlight-color: transparent;
}

.profile-details select.detail-value {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 6px 8px;
    text-align: left;
    color: var(--text-dark);
    font-size: inherit;
    font-family: inherit;
    width: auto;
    min-width: 50%;
    flex-grow: 1;
    transition: background-color 0.3s, border-color 0.3s;

    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 1em;
    padding-right: 2em; 
}


.profile-details select.detail-value:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

 .popup-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
        }

        .popup {
            font-family: Arial, sans-serif;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            padding: 20px;
            border-radius: 15px;
            width: 90%;
            max-width: 700px;
            min-height: 400px;
        }

        .popup-content {
            text-align: center;
          
            background-color: rgba(255, 255, 255, 0.7);
            padding: 10px;
            border-radius: 10px;
        }

        .popup .close {
            position: absolute;
            top: 10px;
            right: 10px;
            font-size: 30px;
            cursor: pointer;
            color: #333;
            /* background-color: white; */
            border-radius: 50%;
            width: 30px;
            height: 30px;
            line-height: 28px;
            text-align: center;
        }

       
        @media (max-width: 768px) {
            .popup {
                width: 95%;
                max-width: 700px;
            }
        }
        @media (max-width: 480px) {
            .popup {
                padding: 15px;
                min-height: 200px;
            }
            .popup .close {
                font-size: 16px;
                width: 20px;
                height: 20px;
                line-height: 20px;
            }
            .popup-content p {
                font-size: 14px;
            }
        }

body[lang="km"],
body[lang="km"] .swal2-title,
body[lang="km"] .swal2-html-container,
body[lang="km"] .swal2-content,
body[lang="km"] .swal2-confirm,
body[lang="km"] .swal2-cancel {
font-family: "Poppins", "Kantumruy Pro", sans-serif;
}

.language-switcher-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    margin: 10px;
    border-top: 1px solid var(--border-color);
}
.language-switcher-label {
    font-weight: 500;
    color: var(--text-light);
    font-size: 14px;
}
.flags-container {
    display: flex;
    gap: 12px;
}
.flag-icon {
    width: 32px;
    height: 21px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    object-fit: cover;
}
.flag-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}
.flag-icon.active {
    opacity: 1;
    box-shadow: 0 0 0 3px var(--primary-color);
}
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    gap: 5px;
}

.pagination-container button {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pagination-container button:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: #fff;
}

.pagination-container button.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination-container button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Add this to your style.css */

.tabs-wrapper {
    display: flex;
    gap: 20px;
    padding-bottom: 0;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 10px 5px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px; /* Overlaps the border-bottom of wrapper */
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
}
/* Add to style.css */
.btn-success {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background-color: #5a6268;
}