/* Sneat Integration CSS - Bridges Sneat components with existing styles */

/* Authentication Pages - Force light background */
html body,
body {
    background-color: #fff !important;
}

.authentication-wrapper,
.authentication-wrapper.authentication-basic {
    background-color: #fff !important;
    background: #fff !important;
}

html[data-theme="light"] .authentication-wrapper,
html[data-theme="light"] .authentication-wrapper.authentication-basic,
html:not([data-theme]) .authentication-wrapper,
html:not([data-theme]) .authentication-wrapper.authentication-basic {
    background-color: #fff !important;
    background: #fff !important;
}

.authentication-wrapper .card {
    border: 1px solid rgba(67, 89, 113, 0.1);
    box-shadow: 0 2px 6px 0 rgba(67, 89, 113, 0.12);
    background-color: #fff !important;
}

html[data-theme="dark"] .authentication-wrapper .card {
    background-color: #fff !important;
    border-color: rgba(67, 89, 113, 0.1);
}

.authentication-wrapper .form-label {
    font-weight: 500;
    color: #566a7f;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.authentication-wrapper .form-control {
    border-color: #d9dee3;
    font-size: 0.9375rem;
    padding: 0.625rem 0.875rem;
    background-color: #fff !important;
    color: #566a7f !important;
}

.authentication-wrapper .form-control:focus {
    border-color: #696cff;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
    background-color: #fff !important;
    color: #566a7f !important;
}

.authentication-wrapper .form-control::placeholder {
    color: #a1acb8 !important;
}

.authentication-wrapper .form-password-toggle .input-group-text {
    cursor: pointer;
    border-color: #d9dee3;
    background-color: #fff !important;
    color: #566a7f !important;
}

.authentication-wrapper .form-password-toggle .input-group-text:hover {
    background-color: #f5f5f9 !important;
}

.authentication-wrapper .form-select {
    border-color: #d9dee3;
    font-size: 0.9375rem;
    padding: 0.625rem 0.875rem;
    background-color: #fff !important;
    color: #566a7f !important;
}

.authentication-wrapper .form-select:focus {
    border-color: #696cff;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
    background-color: #fff !important;
    color: #566a7f !important;
}

.authentication-wrapper .btn-primary {
    background-color: #696cff;
    border-color: #696cff;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    color: #ffffff !important;
}

.authentication-wrapper .btn-primary i,
.authentication-wrapper .btn-primary .bi,
.authentication-wrapper .btn-primary svg {
    color: #ffffff !important;
}

.authentication-wrapper .btn-primary:hover {
    background-color: #5f62e6;
    border-color: #5f62e6;
    color: #ffffff !important;
}

.authentication-wrapper .alert {
    border: 0;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
}

.authentication-wrapper .app-brand {
    margin-bottom: 2rem;
}

.authentication-wrapper .app-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.authentication-wrapper .app-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.authentication-wrapper .app-brand-logo svg {
    color: #696cff;
}

.authentication-wrapper .app-brand-text {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #384551 !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-left: 0.5rem !important;
    white-space: nowrap !important;
    line-height: 1.5 !important;
}

/* Override any text-body class that might hide text */
.authentication-wrapper .app-brand-text.text-body,
.authentication-wrapper .app-brand-text {
    color: #384551 !important;
}

/* Ensure all child spans are visible */
.authentication-wrapper .app-brand-text span {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: inherit !important;
    font-weight: 600 !important;
    line-height: inherit !important;
}

/* Primary color for Edu */
.authentication-wrapper .app-brand-text .text-primary {
    color: #696cff !important;
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Dark color for Skill and NG */
.authentication-wrapper .app-brand-text > span:not(.text-primary) {
    color: #384551 !important;
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-weight: 600 !important;
}

html[data-theme="dark"] .authentication-wrapper {
    background-color: var(--bs-menu-bg, #2b2c40) !important;
}

html[data-theme="dark"] body {
    background-color: var(--bs-menu-bg, #2b2c40) !important;
}

[data-theme="dark"] .authentication-wrapper .card {
    background-color: #3b3d52;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .authentication-wrapper .form-control {
    background-color: #fff !important;
    border-color: #d9dee3 !important;
    color: #566a7f !important;
}

[data-theme="dark"] .authentication-wrapper .form-control:focus {
    background-color: #fff !important;
    border-color: #696cff !important;
    color: #566a7f !important;
}

[data-theme="dark"] .authentication-wrapper .form-control::placeholder {
    color: #a1acb8 !important;
}

[data-theme="dark"] .authentication-wrapper .form-password-toggle .input-group-text {
    background-color: #fff !important;
    border-color: #d9dee3 !important;
    color: #566a7f !important;
}

[data-theme="dark"] .authentication-wrapper .form-password-toggle .input-group-text:hover {
    background-color: #f5f5f9 !important;
}

[data-theme="dark"] .authentication-wrapper .form-select {
    background-color: #fff !important;
    border-color: #d9dee3 !important;
    color: #566a7f !important;
}

[data-theme="dark"] .authentication-wrapper .form-select:focus {
    background-color: #fff !important;
    border-color: #696cff !important;
    color: #566a7f !important;
}

[data-theme="dark"] .authentication-wrapper .form-label {
    color: #bdc1c5;
}

/* Ensure text is visible on authentication pages */
.authentication-wrapper h4,
.authentication-wrapper p,
.authentication-wrapper .text-center {
    color: var(--bs-body-color, #566a7f);
}

[data-theme="dark"] .authentication-wrapper h4,
[data-theme="dark"] .authentication-wrapper p,
[data-theme="dark"] .authentication-wrapper .text-center {
    color: var(--bs-body-color, #bdc1c5);
}

[data-theme="dark"] .authentication-wrapper .app-brand-text {
    color: #fff !important;
}

[data-theme="dark"] .authentication-wrapper .app-brand-text .text-primary {
    color: #696cff !important;
}

[data-theme="dark"] .authentication-wrapper .app-brand-text span:not(.text-primary) {
    color: #fff !important;
}

[data-theme="dark"] .authentication-wrapper .app-brand-logo svg {
    color: #696cff;
}

/* Ensure Sneat cards work with our layout */
.card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 6px 0 rgba(67, 89, 113, 0.12);
    margin-bottom: 1.5rem;
    background-color: #fff !important;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(67, 89, 113, 0.1);
    padding: 1.25rem 1.5rem;
}

.card-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: #566a7f;
    margin-bottom: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid rgba(67, 89, 113, 0.1);
    padding: 1rem 1.5rem;
}

/* Sneat form styling */
.form-label {
    font-weight: 500;
    color: #566a7f;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    border-color: #d9dee3;
    font-size: 0.9375rem;
    padding: 0.625rem 0.875rem;
    background-color: #fff !important;
    color: #566a7f !important;
}

.form-control:focus {
    border-color: #696cff;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
    background-color: #fff !important;
    color: #566a7f !important;
}

.form-control::placeholder {
    color: #a1acb8 !important;
}

.form-select {
    border-color: #d9dee3;
    font-size: 0.9375rem;
    padding: 0.625rem 0.875rem;
    background-color: #fff !important;
    color: #566a7f !important;
}

.form-select:focus {
    border-color: #696cff;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
    background-color: #fff !important;
    color: #566a7f !important;
}

textarea.form-control {
    background-color: #fff !important;
    color: #566a7f !important;
}

textarea.form-control:focus {
    background-color: #fff !important;
    color: #566a7f !important;
}

[data-theme="dark"] textarea.form-control {
    background-color: #fff !important;
    border-color: #d9dee3 !important;
    color: #566a7f !important;
}

[data-theme="dark"] textarea.form-control:focus {
    background-color: #fff !important;
    border-color: #696cff !important;
    color: #566a7f !important;
}

/* Sneat button styling */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    border-radius: 0.375rem;
}

.btn-primary {
    background-color: #696cff;
    border-color: #696cff;
    color: #ffffff !important;
}

.btn-primary i,
.btn-primary .bi,
.btn-primary svg {
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: #5f62e6;
    border-color: #5f62e6;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: #696cff;
    border-color: #696cff;
}

.btn-outline-primary:hover {
    background-color: #696cff;
    border-color: #696cff;
    color: #fff;
}

/* Sneat badge styling */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
}

/* Sneat alert styling */
.alert {
    border: 0;
    border-radius: 0.375rem;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Sneat progress bar */
.progress {
    height: 0.5rem;
    background-color: #e7eaf3;
    border-radius: 0.375rem;
}

.progress-bar {
    background-color: #696cff;
}

/* Sneat table styling */
.table {
    color: #566a7f;
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #a1acb8;
    border-bottom: 2px solid #d9dee3;
}

.table tbody tr {
    border-bottom: 1px solid #e7eaf3;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Theme compatibility - Dark mode */
[data-theme="dark"] .card {
    background-color: #fff !important;
    border-color: rgba(67, 89, 113, 0.1) !important;
    color: #566a7f !important;
}

[data-theme="dark"] .card-header {
    border-bottom-color: rgba(67, 89, 113, 0.1) !important;
    background-color: transparent !important;
}

[data-theme="dark"] .card-title {
    color: #566a7f !important;
}

[data-theme="dark"] .card-body {
    color: #566a7f !important;
}

[data-theme="dark"] .form-label {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] .form-control {
    background-color: #fff !important;
    border-color: #d9dee3 !important;
    color: #566a7f !important;
}

[data-theme="dark"] .form-control:focus {
    background-color: #fff !important;
    border-color: #696cff !important;
    color: #566a7f !important;
}

[data-theme="dark"] .form-control::placeholder {
    color: #a1acb8 !important;
}

[data-theme="dark"] .form-select {
    background-color: #fff !important;
    border-color: #d9dee3 !important;
    color: #566a7f !important;
}

[data-theme="dark"] .form-select:focus {
    background-color: #fff !important;
    border-color: #696cff !important;
    color: #566a7f !important;
}

[data-theme="dark"] .table {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] .table thead th {
    color: var(--text-muted, #94a3b8);
    border-bottom-color: var(--border-color, rgba(255, 255, 255, 0.1));
}

[data-theme="dark"] .table tbody tr {
    border-bottom-color: var(--border-color, rgba(255, 255, 255, 0.1));
}

[data-theme="dark"] .table tbody tr:hover {
    background-color: var(--hover-bg, rgba(255, 255, 255, 0.05));
}

/* Body and main content background to match menu/sidebar */
body {
    background-color: var(--bs-menu-bg, #fff) !important;
    color: var(--bs-body-color, #646e78) !important;
}

/* Dark theme sidebar/menu background */
html[data-theme="dark"] .bg-menu-theme,
[data-theme="dark"] .bg-menu-theme,
html[data-theme="dark"] .layout-menu,
[data-theme="dark"] .layout-menu,
html[data-theme="dark"] .menu-vertical,
[data-theme="dark"] .menu-vertical {
    background-color: var(--sidebar-bg, #0F172A) !important;
    color: var(--sidebar-text, #F8FAFC) !important;
}

html[data-theme="dark"] .menu-link,
[data-theme="dark"] .menu-link {
    color: var(--sidebar-text, #F8FAFC) !important;
}

html[data-theme="dark"] .menu-link:hover,
[data-theme="dark"] .menu-link:hover {
    background-color: var(--hover-bg, rgba(255, 255, 255, 0.05)) !important;
    color: var(--primary-light, #818CF8) !important;
}

html[data-theme="dark"] .menu-item.active > .menu-link,
[data-theme="dark"] .menu-item.active > .menu-link {
    background-color: rgba(105, 108, 255, 0.2) !important;
    color: var(--primary-light, #818CF8) !important;
}

html[data-theme="dark"] .menu-header,
[data-theme="dark"] .menu-header {
    color: var(--sidebar-text, #F8FAFC) !important;
    opacity: 0.7;
}

/* Layout page background to match menu */
.layout-page {
    background-color: var(--bs-menu-bg, #fff);
    color: var(--bs-body-color, #646e78);
}

/* Content wrapper background */
.content-wrapper {
    background-color: var(--bs-menu-bg, #fff);
    color: var(--bs-body-color, #646e78);
}

/* Container background - transparent so menu bg shows through */
.container-xxl {
    background-color: transparent;
}

/* Ensure compatibility with existing layout */
#page-content-wrapper {
    background-color: var(--bs-menu-bg, #fff);
    color: var(--bs-body-color, #646e78);
}

/* Main content area */
main {
    background-color: transparent;
    color: var(--bs-body-color, #646e78);
}

/* Ensure text visibility - paragraphs and general text */
p, span, div, a, li, td, th {
    color: inherit;
}

/* Headings should use heading color */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--bs-heading-color, #384551) !important;
}

/* Text muted should be visible */
.text-muted {
    color: var(--bs-secondary-color, #a7acb2) !important;
}

/* Links should be visible */
a {
    color: var(--bs-link-color, #696cff) !important;
}

a:hover {
    color: var(--bs-link-hover-color, #5f61e6) !important;
}

/* Dark theme background and text adjustments */
html[data-theme="dark"] body,
[data-theme="dark"] body {
    background-color: var(--bg-primary, #0F172A) !important;
    color: var(--text-primary, #F8FAFC) !important;
}

[data-theme="dark"] .layout-page,
html[data-theme="dark"] .layout-page {
    background-color: var(--bg-primary, #0F172A) !important;
    color: var(--text-primary, #F8FAFC) !important;
}

[data-theme="dark"] .content-wrapper,
html[data-theme="dark"] .content-wrapper {
    background-color: var(--bg-primary, #0F172A) !important;
    color: var(--text-primary, #F8FAFC) !important;
}

[data-theme="dark"] #page-content-wrapper,
html[data-theme="dark"] #page-content-wrapper {
    background-color: var(--bg-primary, #0F172A) !important;
    color: var(--text-primary, #F8FAFC) !important;
}

[data-theme="dark"] main,
html[data-theme="dark"] main {
    background-color: transparent !important;
    color: var(--text-primary, #F8FAFC) !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .h1,
[data-theme="dark"] .h2,
[data-theme="dark"] .h3,
[data-theme="dark"] .h4,
[data-theme="dark"] .h5,
[data-theme="dark"] .h6 {
    color: var(--bs-emphasis-color, #fff) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--bs-secondary-color, rgba(189, 193, 197, 0.75)) !important;
}

[data-theme="dark"] a {
    color: var(--bs-link-color, #a5a7ff) !important;
}

[data-theme="dark"] a:hover {
    color: var(--bs-link-hover-color, #aeb0ff) !important;
}

/* Sneat spacing utilities */
.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.px-4 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Modal visibility - ensure modals are always visible */
.modal-content {
    background-color: #fff !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.modal-header {
    background-color: #fff !important;
    color: #333 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.modal-body {
    background-color: #fff !important;
    color: #333 !important;
}

.modal-footer {
    background-color: #fff !important;
    color: #333 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.modal-title {
    color: #333 !important;
}

.modal .form-label {
    color: #333 !important;
}

.modal .form-control {
    background-color: #fff !important;
    color: #333 !important;
    border: 1px solid #dee2e6 !important;
}

.modal .form-control:focus {
    background-color: #fff !important;
    color: #333 !important;
    border-color: #696cff !important;
}

.modal textarea.form-control {
    background-color: #fff !important;
    color: #333 !important;
    border: 1px solid #dee2e6 !important;
}

.modal textarea.form-control:focus {
    background-color: #fff !important;
    color: #333 !important;
    border-color: #696cff !important;
}

.modal .text-muted {
    color: #6c757d !important;
}

.modal .text-dark {
    color: #212529 !important;
}

/* Dark theme modal overrides - still use white background */
[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-content {
    background-color: #fff !important;
    color: #333 !important;
}

[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-header {
    background-color: #fff !important;
    color: #333 !important;
}

[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-body {
    background-color: #fff !important;
    color: #333 !important;
}

[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .modal-footer {
    background-color: #fff !important;
    color: #333 !important;
}

[data-theme="dark"] .modal-title,
html[data-theme="dark"] .modal-title {
    color: #333 !important;
}

[data-theme="dark"] .modal .form-label,
html[data-theme="dark"] .modal .form-label {
    color: #333 !important;
}

[data-theme="dark"] .modal .form-control,
html[data-theme="dark"] .modal .form-control {
    background-color: #fff !important;
    color: #333 !important;
    border-color: #dee2e6 !important;
}

[data-theme="dark"] .modal .form-control:focus,
html[data-theme="dark"] .modal .form-control:focus {
    background-color: #fff !important;
    color: #333 !important;
    border-color: #696cff !important;
}

[data-theme="dark"] .modal textarea.form-control,
html[data-theme="dark"] .modal textarea.form-control {
    background-color: #fff !important;
    color: #333 !important;
    border-color: #dee2e6 !important;
}

[data-theme="dark"] .modal textarea.form-control:focus,
html[data-theme="dark"] .modal textarea.form-control:focus {
    background-color: #fff !important;
    color: #333 !important;
    border-color: #696cff !important;
}

[data-theme="dark"] .modal .text-muted,
html[data-theme="dark"] .modal .text-muted {
    color: #6c757d !important;
}

[data-theme="dark"] .modal .text-dark,
html[data-theme="dark"] .modal .text-dark {
    color: #212529 !important;
}

