* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pink: #ff1493;
    --pink-hover: #e0127f;
    --white: #ffffff;
    --gray-bg: #f8f9fa;
    --gray-light: #e9ecef;
    --gray-border: #dee2e6;
    --gray-text: #6c757d;
    --gray-dark: #495057;
    --black: #212529;
}

[data-theme="dark"] {
    --pink: #ff1493;
    --pink-hover: #ff69b4;
    --white: #1e1e1e;
    --gray-bg: #121212;
    --gray-light: #2d2d2d;
    --gray-border: #3d3d3d;
    --gray-text: #a0a0a0;
    --gray-dark: #b0b0b0;
    --black: #e0e0e0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--gray-bg);
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}



.site-header {
    background: var(--white);
    padding: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-bottom: 3px solid var(--pink);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    position: relative;
}

.site-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--black);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.site-header h1 .maj-text {
    color: var(--pink);
    font-weight: 800;
    transform: translateY(-10px);
    display: inline-block;
}

.site-header h1 .space-text {
    font-family: 'Poppins', sans-serif;
    transform: translateY(6px);
    display: inline-block;
}

.header-controls-left {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.header-controls-right {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.signout-link {
    color: var(--pink);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;    
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--pink);
    border-radius: 6px;
    font-size: 0.85rem;
    background: transparent;
    transition: all 0.2s;
}

.signout-link:hover {
    background: var(--pink);
    color: white;
}

.signout-link svg {
    flex-shrink: 0;
}

.manager-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1.5px solid var(--gray-border);
    border-radius: 6px;
    color: var(--gray-dark);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.manager-nav-link:hover {
    border-color: var(--pink);
    color: var(--pink);
    background: rgba(255, 20, 147, 0.05);
}

.manager-nav-link.active {
    border-color: var(--pink);
    background: var(--pink);
    color: white;
}

.manager-nav-link svg {
    flex-shrink: 0;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    color: var(--gray-dark);
    transition: all 0.2s;
    display: flex; /* Ensure it behaves well in flex container */
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--pink);
    background: var(--gray-light);
    background: var(--gray-bg);
}



.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    flex: 1;
}

.container:has(.layout-with-sidebar) {
    max-width: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.manager-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.manager-content .layout-with-sidebar {
    flex: 1;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: calc(100vh - 140px);
    flex: 1;
}

.sidebar-panel {
    background: var(--gray-bg);
    border: none;
    border-right: 3px solid var(--pink);
    border-radius: 0;
    padding: 1rem 1.25rem 2rem;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    color: var(--black);
}

[data-theme="dark"] .sidebar-panel {
    background: #1a1a1a;
}

.sidebar-panel > div {
    color: var(--gray-dark);
}

.sidebar-panel > div:first-child {
    border-bottom: 3px solid var(--pink);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-panel strong {
    color: var(--black);
    display: block;
}

.sidebar-header {
    font-weight: 700;
    color: var(--black);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Profile Card Styles */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--pink), var(--pink-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 0.25rem;
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.3);
}

[data-theme="dark"] .profile-avatar {
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.4);
}

.profile-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.profile-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1.5px solid var(--pink);
    border-radius: 6px;
    color: var(--pink);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.profile-logout-btn:hover {
    background: var(--pink);
    color: white;
}

.profile-logout-btn svg {
    flex-shrink: 0;
}

.profile-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-text);
    font-size: 0.9rem;
    width: 100%;
    padding: 0.4rem 0.5rem;
    background: var(--white);
    border-radius: 6px;
    border: 1px solid var(--gray-border);
}

.profile-info-item svg {
    flex-shrink: 0;
    color: var(--pink);
}

.profile-info-item span {
    flex: 1;
    text-align: left;
    word-break: break-word;
}

.profile-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--gray-border);
}

.progress-circle-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle-bg {
    stroke: var(--gray-light);
    stroke-width: 6;
    fill: none;
}

[data-theme="dark"] .progress-ring-circle-bg {
    stroke: #2d2d2d;
}

.progress-ring-circle {
    stroke: var(--pink);
    stroke-width: 6;
    fill: none;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.progress-percent {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--black);
    line-height: 1;
}

.progress-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.progress-label-small {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-dark);
}

.progress-stats {
    font-size: 0.8rem;
    color: var(--gray-text);
}

.sidebar-title {
    font-weight: 700;
    color: var(--black);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.chapter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chapter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--gray-border);
    background: var(--white);
    text-decoration: none;
    color: var(--black);
    transition: all 0.2s;
}

.chapter-link:hover {
    border-color: var(--pink);
    color: var(--pink);
    transform: translateX(3px);
}

.chapter-link .status {
    font-size: 0.85rem;
    color: var(--gray-text);
    font-weight: 600;
}

.placeholder-tile {
    width: 100%;
    min-height: 180px;
    background: linear-gradient(135deg, #f0f2f5, #e6e9ef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-dark);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    justify-items: center;
}



.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 450px;
    transition: all 0.3s;
    border: 1px solid var(--gray-border);
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--pink);
    color: var(--black);
}



.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-dark);
}

.form-group input,
.form-group select,
.form-group textarea,
.code-input {
    width: 100%;
    padding: 0.85rem;
    background: var(--white);
    color: var(--black);
    border: 2px solid var(--gray-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-family: inherit;
    outline: none !important;
}

.form-group input::placeholder,
.form-group select::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-text);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--gray-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.code-input:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: 0 0 0 4px rgba(255, 20, 147, 0.1);
    background: var(--white);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .code-input {
    background: var(--gray-light);
    color: var(--black);
    border-color: var(--gray-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group select::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
    color: var(--gray-text);
}

[data-theme="dark"] .form-group input:hover,
[data-theme="dark"] .form-group select:hover,
[data-theme="dark"] .form-group textarea:hover {
    border-color: #4d4d4d;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .code-input:focus {
    border-color: var(--pink) !important;
    box-shadow: 0 0 0 4px rgba(255, 20, 147, 0.2) !important;
}

/* Specifically target email inputs */
input[type="email"] {
    border: 2px solid var(--gray-border) !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

input[type="email"]:focus {
    border-color: var(--pink) !important;
    box-shadow: 0 0 0 4px rgba(255, 20, 147, 0.1) !important;
    outline: none !important;
}


input[type="email"]:-webkit-autofill,
input[type="email"]:-webkit-autofill:hover,
input[type="email"]:-webkit-autofill:focus {
    -webkit-box-shadow: none !important;
    -webkit-text-fill-color: var(--black) !important;
    border: 2px solid var(--gray-border) !important;
    background-color: var(--white) !important;
}

input[type="password"]:-webkit-autofill,
input[type="password"]:-webkit-autofill:hover,
input[type="password"]:-webkit-autofill:focus {
    -webkit-box-shadow: none !important;
    -webkit-text-fill-color: var(--black) !important;
    border: 2px solid var(--gray-border) !important;
    background-color: var(--white) !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

input[type="password"] {
    border: 2px solid var(--gray-border) !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

input[type="password"]:focus {
    border-color: var(--pink) !important;
    box-shadow: 0 0 0 4px rgba(255, 20, 147, 0.1) !important;
    outline: none !important;
}

[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="email"]:focus {
    border: 2px solid var(--gray-border) !important;
}

[data-theme="dark"] input[type="email"]:focus {
    border-color: var(--pink) !important;
    box-shadow: 0 0 0 4px rgba(255, 20, 147, 0.2) !important;
}

[data-theme="dark"] input[type="email"]:-webkit-autofill,
[data-theme="dark"] input[type="email"]:-webkit-autofill:hover,
[data-theme="dark"] input[type="email"]:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #2d2d2d inset !important;
    -webkit-text-fill-color: #e0e0e0 !important;
    border: 2px solid var(--gray-border) !important;
    caret-color: #e0e0e0 !important;
    transition: background-color 5000s ease 0s, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

[data-theme="dark"] input[type="email"]:-webkit-autofill:focus {
    border-color: var(--pink) !important;
    box-shadow: 0 0 0 4px rgba(255, 20, 147, 0.2), 0 0 0 1000px #2d2d2d inset !important;
}

[data-theme="dark"] input[type="password"]:-webkit-autofill,
[data-theme="dark"] input[type="password"]:-webkit-autofill:hover {
    -webkit-box-shadow: 0 0 0 1000px #2d2d2d inset !important;
    -webkit-text-fill-color: #e0e0e0 !important;
    border: 2px solid var(--gray-border) !important;
    outline: none !important;
    caret-color: #e0e0e0 !important;
    transition: background-color 5000s ease 0s, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

[data-theme="dark"] input[type="password"]:-webkit-autofill:focus {
    -webkit-text-fill-color: #e0e0e0 !important;
    border: 2px solid var(--pink) !important;
    box-shadow: 0 0 0 4px rgba(255, 20, 147, 0.2), 0 0 0 1000px #2d2d2d inset !important;
    outline: none !important;
}

[data-theme="dark"] input[type="password"]:focus {
    border-color: var(--pink) !important;
    box-shadow: 0 0 0 4px rgba(255, 20, 147, 0.2) !important;
    outline: none !important;
}



.btn-primary {
    width: 100%;
    background: var(--pink);
    color: var(--white);
    border: none;
    padding: 0.875rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--pink-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    width: 100%;
    background: var(--gray-dark);
    color: var(--white);
    border: none;
    padding: 0.875rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--black);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn.small {
    width: auto;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}



.text-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--gray-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.text-link:hover {
    color: var(--pink);
}



.image-card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
}

.image-card:hover {
    transform: translateY(-2px);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}



.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    max-width: 400px;
    width: 90%;
}

.modal-text {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--gray-dark);
}

.modal-text strong {
    color: var(--pink);
}



.flash-message {
    position: fixed;
    top: 5rem;
    right: 2rem;
    max-width: 400px;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
}

.flash-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.flash-success {
    background: #4caf50;
    color: white;
}

.flash-error {
    background: #f44336;
    color: white;
}

.flash-warning {
    background: #ff9800;
    color: white;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
}

.flash-close:hover {
    opacity: 1;
}



.dashboard-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
    width: 100%;
    background: var(--gray);
}

[data-theme="dark"] .dashboard-content {
    background: #121212;
}

.activity-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    min-height: 350px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-border);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.activity-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.progress-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--black);
}

[data-theme="dark"] .progress-label {
    color: white;
}

.progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .progress-bar {
    background: rgba(255, 255, 255, 0.25);
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pink), var(--pink-hover));
    transition: width 0.3s ease;
}

.progress-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    color: var(--gray-dark);
    font-size: 0.9rem;
}

[data-theme="dark"] .progress-actions {
    color: rgba(255, 255, 255, 0.85);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: white;
}

.badge-test {
    background: linear-gradient(90deg, var(--pink), var(--pink-hover));
}

.activity-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark mode support for activity cards */
[data-theme="dark"] .activity-card {
    background: linear-gradient(135deg, #1a1a1d, #2c2b30) !important;
    border-color: var(--gray-border);
}

[data-theme="light"] .activity-card {
    background: var(--white) !important;
}

/* Dark mode for progress wraps */
[data-theme="light"] .activity-card .progress-bar {
    background: rgba(0, 0, 0, 0.1) !important;
}

/* Dashboard chapter card elements */
.chapter-badge {
    background: rgba(255, 20, 147, 0.15);
    color: var(--pink);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
}

[data-theme="dark"] .chapter-badge {
    background: rgba(255, 20, 147, 0.2);
    color: #ff69b4;
}

.chapter-status-text {
    color: var(--gray-text);
    font-size: 0.9rem;
    font-weight: 500;
}

[data-theme="dark"] .chapter-status-text {
    color: rgba(255, 255, 255, 0.7);
}

.chapter-title-card {
    color: var(--black);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

[data-theme="dark"] .chapter-title-card {
    color: white;
}

.chapter-description {
    color: var(--gray-dark);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

[data-theme="dark"] .chapter-description {
    color: rgba(255, 255, 255, 0.85);
}

.progress-wrap {
    background: rgba(0, 0, 0, 0.08);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    color: var(--black);
    margin-top: 0.5rem;
}

[data-theme="dark"] .progress-wrap {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.activity-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.activity-card:hover .activity-overlay {
    opacity: 1;
}

.activity-overlay h2 {
    color: var(--white);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}



.email-list {
    list-style: none;
}

.email-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem;
    margin-bottom: 0.5rem;
    background: var(--gray-bg);
    border-radius: 6px;
    border: 1px solid var(--gray-border);
    transition: all 0.2s;
}

.email-item:hover {
    background: var(--white);
    transform: translateX(3px);
}

.email-text {
    color: var(--black);
}

.remove-link {
    color: #f44336;
    text-decoration: none;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.remove-link:hover {
    background: #f44336;
    color: white;
}



.site-footer {
    background: var(--white);
    color: var(--gray-text);
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
    border-top: 1px solid var(--gray-border);
}



@media (max-width: 900px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .site-header h1 {
        font-size: 2rem;
    }
    
    .signout-link {
        position: static;
        transform: none;
        margin-top: 1rem;
        justify-content: center;
    }
    
    .container {
        margin: 2rem auto;
        padding: 0 1rem;
    }
    
    .grid-2col {
        grid-template-columns: 1fr;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
}



.mt-3 {
    margin-top: 1.5rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.text-center {
    text-align: center;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}



.password-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.7s ease-in-out;
    margin: 0 -5px;
}

.password-wrapper.show {
    max-height: 120px;
}

.password-wrapper .form-group {
    padding-top: 6px;
    padding-bottom: 0;
    padding-left: 5px;
    padding-right: 5px;
    margin-bottom: 1.25rem;
}

#employeeSubmit,
#managerSubmit {
    transition: all 0.2s;
}

#employeeSubmit.hide {
    display: none;
}

#managerSubmit {
    display: none;
}

#managerSubmit.show {
    display: block;
}

#toggleBtn {
    display: block;
    width: 100%;
    text-align: right;
    margin-top: 1rem;
    font-size: 0.85rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--gray-text);
    transition: color 0.2s;
}

#toggleBtn:hover {
    color: var(--pink);
}

#toggleBtn svg {
    width: 14px;
    height: 14px;
    display: inline;
    vertical-align: middle;
    margin-right: 4px;
}

.code-digit {
    width: 45px;
    height: 45px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    border: 2px solid var(--gray-border);
    border-radius: 6px;
    background: white;
    color: var(--text-dark);
    transition: all 0.2s;
}

.code-digit:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(255, 20, 147, 0.1);
}

[data-theme="dark"] .code-digit {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #444;
}

[data-theme="dark"] .code-digit:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(255, 20, 147, 0.2);
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#resendBtn:not(.btn-disabled) {
    background: #4caf50;
}

#resendBtn:not(.btn-disabled):hover {
    background: #45a049;
}

/* Selection */
::selection {
    background: var(--pink);
    color: white;
}


/* Manager Dashboard Styles */
.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    background: var(--white);
    color: var(--gray-dark);
    /* cursor: pointer; */ /* Inherited or standard */
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-icon:hover {
    background: var(--gray-bg);
    color: var(--pink);
}

.btn-icon.delete:hover {
    background: #ffebee;
    color: #d32f2f;
}

.add-chapter-btn:hover {
    background: rgba(255, 20, 147, 0.05);
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--gray-text);
    font-size: 1rem;
}

/* Materials List used in Manager Edit details */
.materials-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.material-card {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--gray-bg);
    border-radius: 8px;
    border: 1px solid var(--gray-border);
    transition: all 0.2s;
}

.material-card:hover {
    background: var(--white);
    border-color: var(--pink);
}

.material-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--gray-light);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.material-info {
    flex: 1;
}

.material-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.material-desc {
    color: var(--gray-text);
    font-size: 0.9rem;
    line-height: 1.5;
}

.material-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}

.badge-lesson {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-test {
    background: #fff3e0;
    color: #f57c00;
}

.material-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.add-material-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1.25rem;
    border: 2px dashed var(--gray-border);
    background: transparent;
    border-radius: 8px;
    color: var(--gray-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1.5rem;
}

.add-material-btn:hover {
    border-color: var(--pink);
    color: var(--pink);
    background: rgba(255, 20, 147, 0.05);
}

.add-chapter-card {
    background: var(--white);
    border-radius: 12px;
    border: 2px dashed var(--gray-border);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.add-chapter-card:hover {
    border-color: var(--pink);
    background: rgba(255, 20, 147, 0.02);
}

.add-chapter-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-bg);
    color: var(--pink);
}

.add-chapter-card:hover .add-chapter-icon {
    background: rgba(255, 20, 147, 0.1);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--white);
    margin: auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--black);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-text);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-bg);
    color: var(--black);
}

.modal-body {
    padding: 2rem;
}

@media (max-width: 768px) {
    .manager-nav {
        position: static;
        transform: none;
        flex-wrap: wrap;
        justify-content: center;
        margin: 1rem 0;
    }
    
    .manager-nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
}


/* Slideshow Styles */
.slideshow-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
}

.slideshow-header {
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    border-bottom: 2px solid var(--pink);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slideshow-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-dark);
}

.slideshow-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray-text);
    font-size: 0.9rem;
}

.slideshow-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow-y: auto;
}

.slide {
    display: none;
    width: 100%;
    max-width: 900px;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
}

.slide.active {
    display: block;
}

.slide-image {
    max-width: 100%;
    max-height: 400px;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.slide-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 1rem;
}

.slide-description {
    font-size: 1.1rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.slide-type-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.slide-resource {
    margin: 2rem 0;
}

.slideshow-nav {
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    border-top: 1px solid var(--gray-border);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: #e0e0e0;
    color: var(--gray-dark);
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.nav-btn:hover:not(:disabled) {
    background: #d0d0d0;
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-number {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f5f5f5;
    color: var(--gray-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.page-number:hover {
    background: #e8e8e8;
}

.page-number.active {
    background: var(--pink); 
    color: white;
    border-color: var(--pink);
}

.page-number.completed {
    background: #4caf50;
    color: white;
}

.completion-screen {
    text-align: center;
    padding: 3rem;
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.completion-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pink);
    margin-bottom: 1rem;
}

.completion-message {
    font-size: 1.2rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
}


/* Utility & Clean-up Classes */
.flex-between-start {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.flex-center-gap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flex-center-gap-small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header-padded {
    padding: 1.5rem 1.5rem 0.5rem;
}

.card-body-padded {
    padding: 0 1.5rem 1.5rem;
    flex: 1; 
    display: flex; 
    flex-direction: column;
}

.chapter-status-container {
    padding: 1.5rem 1.5rem 0.5rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start;
}

.chapter-controls {
    display: flex; 
    gap: 0.5rem;
}

.custom-details {
    margin-top: 1rem; 
    margin-bottom: 1rem; 
    border: 1px solid var(--gray-border); 
    border-radius: 6px;
}

.custom-summary {
    padding: 0.75rem; 
    cursor: pointer; 
    font-weight: 500; 
    color: var(--pink); 
    list-style: none; 
    display: flex; 
    align-items: center; 
    gap: 0.5rem;
}

.custom-summary:hover {
    background: rgba(255, 20, 147, 0.05);
}

.w-100 { width: 100%; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.p-075 { padding: 0.75rem; }
.text-center { text-align: center; }
.d-inline { display: inline; }
.v-middle { vertical-align: middle; }
.mr-5px { margin-right: 5px; }

/* Empty state styling */
.empty-state-card {
    margin: 3rem auto; 
    max-width: 600px; 
    text-align: center;
}
.empty-state-icon {
    margin: 2rem auto;
}
.empty-state-btn {
    max-width: 300px; 
    margin: 0 auto;
}


.material-item {
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    padding: 1rem; 
    background: var(--gray-bg); 
    border-radius: 6px; 
    border: 1px solid var(--gray-border);
}

.materials-container {
    padding: 1rem; 
    border-top: 1px solid var(--gray-border); 
    background: var(--gray-bg);
}

.materials-grid {
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
    margin-bottom: 1rem;
}

.material-title-text {
    flex: 1; 
    font-weight: 500; 
    color: var(--black);
}

.material-actions-small {
    display: flex; 
    gap: 0.35rem;
}

.btn-test-edit {
    background: #fff3e0; 
    border-color: #f57c00;
}

.btn-add-material {
    width: 100%; 
    background: transparent; 
    color: var(--pink); 
    border: 2px dashed var(--pink); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.5rem;
}

.email-form-grid {
    display: grid; 
    grid-template-columns: 1fr 1fr 2fr; 
    gap: 1rem;
}

.progress-wrap-padded {
    margin-top: auto; 
    padding-top: 1.5rem;
}

.card-footer-action {
    padding: 0 1.5rem 1.5rem; 
    display: flex; 
    justify-content: flex-end;
}

.btn-open-chapter {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: auto; 
    padding-left: 2rem; 
    padding-right: 2rem;
}

.textarea-styled {
    width: 100%; 
    padding: 0.75rem; 
    border: 2px solid var(--gray-border); 
    border-radius: 6px; 
    font-size: 1rem; 
    font-family: inherit; 
    resize: vertical;
}

.small-text-gray {
    color: var(--gray-text); 
    font-size: 0.85rem;
}


.icon-inline {
    display: inline;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.empty-state-message {
    text-align: center;
    color: var(--gray-text);
    padding: 2rem;
}


.form-help-text {
    color: var(--gray-text);
    font-size: 0.85rem;
    display: block;
    margin-top: 0.25rem;
}


.btn-add-chapter-dashed {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    border: 2px dashed var(--pink);
    background: transparent;
    color: var(--pink);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-add-chapter-dashed:hover {
    background: rgba(220, 0, 114, 0.05);
}

.card-centered-message {
    margin: 3rem auto;
    max-width: 600px;
    text-align: center;
}

.icon-large-centered {
    margin: 2rem auto;
    stroke: var(--gray-border);
}


@media (min-width: 901px) {
    .site-header.header-full-width .header-content {
        max-width: 100%;
        margin: 0;
        padding: 0 2rem;
    }

    .site-header.header-full-width .header-controls-left {
        left: 0;
        width: 280px;
        justify-content: center;
        padding-left: 0;
    }
}


@media (min-width: 901px) {
    .site-header.header-full-width .header-controls-left .manager-nav-link, 
    .site-header.header-full-width .header-controls-left .signout-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        white-space: nowrap; /* Prevent text wrapping */
    }
    
    .site-header.header-full-width .header-controls-left {
        gap: 0.4rem;
        justify-content: flex-start;
        padding-left: 85px; /* Offset to center the first button (Logout) in the 280px sidebar area */
    }
}


.add-chapter-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    border: 3px dashed var(--pink);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.add-chapter-card:hover {
    background: rgba(255, 20, 147, 0.05);
    border-color: var(--pink-hover);
    transform: translateY(-3px);
}

.add-chapter-card svg {
    color: var(--gray-border);
    width: 80px;
    height: 80px;
    transition: all 0.3s;
}

.add-chapter-card:hover svg {
    color: var(--pink);
    transform: scale(1.1);
}


.site-header h1 .maj-logo {
    height: 3.2rem;
    width: auto;
    display: block;
    transform: translateY(-10px);
}

