/* Dark mode for the GrayGrids theme. Colours only; every rule is scoped to [data-bs-theme="dark"],
   so light mode is exactly the original theme. Loaded after style.css and custom.css.
   Contrast (WCAG AA): #E8ECF4 on #1E2638 ~13:1, #B0B8C8 on #263047 ~7.4:1, #FF8E8E on #263047 ~5.9:1. */
[data-bs-theme="dark"] {
  color-scheme: dark;
  /* tokens read by the shared components (custom.css @layer app) and pages/*.css */
  --c-bg: #1E2638; --c-surface: #263047; --c-surface-2: #2A3550;
  --c-heading: #F2F4F8; --c-text: #E8ECF4; --c-text-muted: #B0B8C8; --c-line: #3A4660;
  --c-accent: #FF6B6B; --c-accent-text: #FF8E8E; --c-accent-strong: #FFB4B4; --c-accent-soft: #3E2C38;
  --c-on-accent: #1E2638; --c-success: #5CC68F; --c-danger: #FF8A80; --c-code-bg: #151B2A;
  --sh-1: 0 3px 24px rgb(0 0 0 / .35); --sh-2: 0 15px 24px rgb(0 0 0 / .45);
  /* Bootstrap 5.1.3 body variables */
  --bs-body-bg: #1E2638; --bs-body-color: #E8ECF4;
}
[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .preloader { background: #1E2638; color: #E8ECF4; }
[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2, [data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4, [data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6 { color: #F2F4F8; }
[data-bs-theme="dark"] p { color: #B0B8C8; }
[data-bs-theme="dark"] a:not(.main-btn):not(.btn):not(.page-link):hover { color: #FF8E8E; }

/* header, sticky header, menus */
[data-bs-theme="dark"] .header_navbar,
[data-bs-theme="dark"] .header_navbar.sticky { background: #263047; box-shadow: 0 10px 20px rgb(0 0 0 / .35); }
[data-bs-theme="dark"] .navbar-nav .nav-item a,
[data-bs-theme="dark"] .dropdown-nav li a { color: #E8ECF4; }
[data-bs-theme="dark"] .navbar-nav .nav-item a.active,
[data-bs-theme="dark"] .navbar-nav .nav-item a:hover,
[data-bs-theme="dark"] .dropdown-nav li:hover a { color: #FF8E8E; }
[data-bs-theme="dark"] .navbar-nav .nav-item .sub-menu,
[data-bs-theme="dark"] .dropdown-nav { background: #263047; box-shadow: 0 0 20px rgb(0 0 0 / .45); }
[data-bs-theme="dark"] .sub-nav-toggler span { border-color: #E8ECF4; }
[data-bs-theme="dark"] .main-btn.login { background: transparent; color: #FF8E8E; border-color: #FF8E8E; }
[data-bs-theme="dark"] .offcanvas_menu_wrapper { background: #263047; }
[data-bs-theme="dark"] .offcanvas_menu_wrapper a, [data-bs-theme="dark"] .canvas_open a { color: #E8ECF4; }

/* theme toggle (both modes need its size; only dark changes colour) */
.theme-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-right: 12px; flex: none;
  border: 1px solid #E6E9F0; border-radius: 5px; background: transparent; color: #333F57; }
.theme-toggle:hover { color: #FF6B6B; }
[data-bs-theme="dark"] .theme-toggle { border-color: #3A4660; color: #E8ECF4; }
[data-bs-theme="dark"] .theme-toggle:hover { color: #FF8E8E; }

/* cards and boxed surfaces used by the theme sections */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .list-group-item,
[data-bs-theme="dark"] [class*="single-"] { background-color: #263047; color: #E8ECF4; border-color: #3A4660; }
/* the theme's white pagination strip is invisible on the light page; keep it invisible here too */
[data-bs-theme="dark"] .pagination-area nav .page-numbers { background-color: transparent; }
[data-bs-theme="dark"] .table { color: #E8ECF4; border-color: #3A4660; }
[data-bs-theme="dark"] .page-link { background: #263047; color: #E8ECF4; border-color: #3A4660; }
[data-bs-theme="dark"] .page-item.active .page-link { background: #FF6B6B; border-color: #FF6B6B; color: #1E2638; }

/* forms */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select { background-color: #263047; color: #E8ECF4; border-color: #3A4660; }
[data-bs-theme="dark"] .form-control::placeholder { color: #B0B8C8; }
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus { background-color: #263047; color: #E8ECF4; border-color: #FF6B6B; }

/* footer */
[data-bs-theme="dark"] .footer-area,
[data-bs-theme="dark"] .footer-area .widget-wrapper { background: #263047; }
[data-bs-theme="dark"] .footer-area .copy-right { background: #18202F; }
[data-bs-theme="dark"] .footer-area p, [data-bs-theme="dark"] .footer-area li,
[data-bs-theme="dark"] .footer-area a { color: #B0B8C8; }
[data-bs-theme="dark"] .footer-area a:hover { color: #FF8E8E; }

/* == users·auth (login, register, profile, password, errors, policy pages) == */
[data-bs-theme="dark"] .box { background-color: #263047; }
[data-bs-theme="dark"] .box.box-border { border-color: #3A4660; }
[data-bs-theme="dark"] .title-line { color: #B0B8C8; }
[data-bs-theme="dark"] .title-line:before,
[data-bs-theme="dark"] .title-line:after { border-top-color: #3A4660; }
[data-bs-theme="dark"] .mx-auto .thumbnail { background-color: #2A3550; }
[data-bs-theme="dark"] .nav-tabs { border-color: #3A4660; }
[data-bs-theme="dark"] .nav-tabs .nav-link.active { background-color: #263047; color: #E8ECF4; border-color: #3A4660 #3A4660 #263047; }
[data-bs-theme="dark"] .form-control:disabled { background-color: #2A3550; color: #B0B8C8; }
[data-bs-theme="dark"] .policy-box textarea { background-color: #263047; color: #E8ECF4; }
[data-bs-theme="dark"] .validation_error { color: #FF8A80; }
[data-bs-theme="dark"] .box .text-muted,
[data-bs-theme="dark"] .e-profile .text-muted { color: #B0B8C8 !important; }
/* policy pages reuse the post body wrapper, whose theme background is white */
[data-bs-theme="dark"] .post-details-body:has(> .content.form-control) { background-color: transparent; }

/* == blog·board (lists, details, post form, search) == */
[data-bs-theme="dark"] .card-box { background-color: #263047; border-color: #3A4660; }
[data-bs-theme="dark"] .blog-details-area .title,
[data-bs-theme="dark"] .board-table,
[data-bs-theme="dark"] .tb-row a { color: #E8ECF4; }
[data-bs-theme="dark"] .board-table { --bs-table-hover-color: #E8ECF4; --bs-table-hover-bg: #2A3550; border-color: #3A4660; }
[data-bs-theme="dark"] .card-box .card-img .card-img-empty { background: linear-gradient(135deg, #3A2E3E, #263047); }
[data-bs-theme="dark"] .post-details-content .post-details-body { background-color: transparent; }
[data-bs-theme="dark"] .page-title-area .page-title-content .title,
[data-bs-theme="dark"] .page-title-area .page-title-content .bread-crumbs span.active { color: #E8ECF4; }
[data-bs-theme="dark"] .page-title-area .page-title-content .bread-crumbs a { color: #B0B8C8; }
[data-bs-theme="dark"] .comment-area .btn-quiet { color: #B0B8C8; }
[data-bs-theme="dark"] .comment-area .btn-quiet:hover { color: #E8ECF4; background: #2A3550; }

/* == home + portfolio == */
[data-bs-theme="dark"] .about-me, [data-bs-theme="dark"] .educations,
[data-bs-theme="dark"] .interesting { background-color: #1E2638; }
[data-bs-theme="dark"] .contact { background: #18202F; }
[data-bs-theme="dark"] .services.bg-white,
[data-bs-theme="dark"] .educations-info-wrapper { background-color: #263047 !important; box-shadow: none; }
[data-bs-theme="dark"] .educations-info-border { border-color: #3A4660; }
[data-bs-theme="dark"] .small-text { color: #B0B8C8; }
[data-bs-theme="dark"] .single-timeline-area, [data-bs-theme="dark"] .contact .single-input { background-color: transparent; }
[data-bs-theme="dark"] .single-timeline-area .timeline-date p { color: #E8ECF4; }
[data-bs-theme="dark"] .single-timeline-area .timeline-date::after { background-color: #3A4660; }
[data-bs-theme="dark"] .contact .contact-form-wrapper form .single-input input,
[data-bs-theme="dark"] .contact .contact-form-wrapper form .single-input textarea { background-color: #263047; color: #E8ECF4; border-color: #3A4660; }
[data-bs-theme="dark"] .about-me .about-left .about-tab .nav li a:not(.active) { background-color: #263047; color: #E8ECF4; }
[data-bs-theme="dark"] .about-me .about-left .about-tab .nav li a.active { background: #FF6B6B; color: #1E2638; }
[data-bs-theme="dark"] .about-me .about-left .tab-content ul li i { color: #8FA8FF; }
[data-bs-theme="dark"] .services p { color: #B0B8C8; }
[data-bs-theme="dark"] .post-item .content { border-color: #3A4660; }
[data-bs-theme="dark"] .post-item .content:before { background-color: #263047; }
