@charset "UTF-8";
/*
 * SOFON Mail theme for Cypht 2.12.2
 * Custom presentation layer only; no mail protocol logic is changed.
 */

:root {
  --sofon-blue: #0b63ce;
  --sofon-blue-deep: #084b9f;
  --sofon-cyan: #0aa6c8;
  --sofon-violet: #7158d9;
  --sofon-ink: #162033;
  --sofon-muted: #65728a;
  --sofon-panel: rgba(255, 255, 255, 0.88);
  --sofon-panel-strong: rgba(255, 255, 255, 0.96);
  --sofon-border: rgba(29, 79, 145, 0.13);
  --sofon-shadow: 0 18px 52px rgba(33, 61, 111, 0.14);
  --sofon-shadow-soft: 0 8px 28px rgba(33, 61, 111, 0.10);

  --bs-primary: #0b63ce;
  --bs-primary-rgb: 11, 99, 206;
  --bs-secondary: #65728a;
  --bs-secondary-rgb: 101, 114, 138;
  --bs-success: #168a66;
  --bs-info: #0aa6c8;
  --bs-warning: #c98213;
  --bs-danger: #c54255;
  --bs-light: #f6f9ff;
  --bs-dark: #162033;
  --bs-body-color: #162033;
  --bs-body-color-rgb: 22, 32, 51;
  --bs-body-bg: #ffffff;
  --bs-secondary-bg: #edf3fb;
  --bs-secondary-bg-rgb: 237, 243, 251;
  --bs-tertiary-bg: #f7f9fd;
  --bs-border-color: rgba(29, 79, 145, 0.14);
  --bs-link-color: #0b63ce;
  --bs-link-hover-color: #084b9f;
  --bs-primary-bg-subtle: #e7f0ff;
  --bs-primary-text-emphasis: #084b9f;
  --bs-font-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --bs-border-radius: 0.85rem;
  --bs-border-radius-sm: 0.6rem;
  --bs-border-radius-lg: 1.15rem;
  --bs-border-radius-xl: 1.5rem;
  --bs-focus-ring-color: rgba(11, 99, 206, 0.22);
}

html,
body {
  background-color: #edf3fb !important;
  background-image:
    radial-gradient(circle at 8% 8%, rgba(10, 166, 200, 0.18), transparent 30%),
    radial-gradient(circle at 92% 12%, rgba(113, 88, 217, 0.15), transparent 32%),
    radial-gradient(circle at 72% 92%, rgba(11, 99, 206, 0.13), transparent 34%),
    linear-gradient(135deg, #f4f8ff 0%, #edf6fb 44%, #f6f2ff 100%) !important;
  background-attachment: fixed !important;
  color: var(--sofon-ink) !important;
  font-family: var(--bs-font-sans-serif) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.55;
  background:
    radial-gradient(circle at 25% 30%, rgba(63, 172, 224, 0.15), transparent 23%),
    radial-gradient(circle at 73% 58%, rgba(119, 91, 220, 0.12), transparent 26%);
  animation: sofonAmbient 18s ease-in-out infinite alternate;
}

@keyframes sofonAmbient {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(1.5%, 1%, 0) scale(1.04); }
}

/* Login */
html body .login_form .bg-light {
  background: transparent !important;
}

html body .login_form .vh-100 {
  min-height: 100vh !important;
  padding: 24px !important;
}

html body .login_form .vh-100 > .card {
  width: min(440px, calc(100vw - 32px)) !important;
  max-width: 440px !important;
  padding: 18px 22px 22px !important;
  border: 1px solid rgba(255, 255, 255, 0.82) !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow: 0 30px 80px rgba(31, 61, 111, 0.22) !important;
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
}

html body .login_form .card-body {
  padding: 1.25rem 1.15rem 1rem !important;
}

html body .login_form .card-body > p.text-center {
  margin: 2px auto 0 !important;
}

html body .login_form .card-body > p.text-center img {
  display: block !important;
  width: 112px !important;
  max-width: 112px !important;
  height: 112px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  filter: drop-shadow(0 12px 22px rgba(20, 83, 160, 0.15));
}

html body .login_form .card-body > p.text-center::after {
  content: "SOFON Mail";
  display: block;
  margin-top: 14px;
  color: var(--sofon-ink);
  font-size: 1.62rem;
  line-height: 1.2;
  font-weight: 720;
  letter-spacing: -0.025em;
}

html body .login_form .card-body > .mt-5 {
  margin-top: 1.7rem !important;
}

html body .login_form .form-control,
html body .login_form input[type="text"],
html body .login_form input[type="password"] {
  min-height: 56px;
  border: 1px solid rgba(43, 81, 136, 0.16) !important;
  border-radius: 15px !important;
  background: rgba(247, 250, 255, 0.92) !important;
  color: var(--sofon-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75) !important;
}

html body .login_form .form-control:focus {
  border-color: rgba(11, 99, 206, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(11, 99, 206, 0.11) !important;
  background: #fff !important;
}

html body .login_form #login {
  min-height: 52px;
  margin-top: 6px;
  border: 0 !important;
  border-radius: 15px !important;
  background: linear-gradient(135deg, var(--sofon-blue), #397bd7 58%, var(--sofon-violet)) !important;
  color: #fff !important;
  font-weight: 680;
  letter-spacing: .01em;
  box-shadow: 0 12px 28px rgba(11, 99, 206, 0.25) !important;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

html body .login_form #login:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(11, 99, 206, 0.30) !important;
  filter: brightness(1.035);
}

html body .login_form #login:active {
  transform: translateY(0);
}

html body .login_form .form-check {
  margin: 0.4rem 0 0.8rem;
  color: var(--sofon-muted);
}

/* App shell */
html body .cypht-layout {
  min-height: 100vh;
  background: transparent !important;
}

html body nav.folder_cell {
  min-height: 100vh;
  background: rgba(247, 250, 255, 0.84) !important;
  border-right: 1px solid var(--sofon-border) !important;
  box-shadow: 8px 0 30px rgba(31, 61, 111, 0.07);
  backdrop-filter: blur(20px) saturate(125%);
  -webkit-backdrop-filter: blur(20px) saturate(125%);
}

html body .folder_list {
  background: transparent !important;
}

html body .menu_home {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 16px 54px 12px 22px;
  text-decoration: none !important;
}

html body .menu_home::after {
  content: "SOFON Mail";
  color: var(--sofon-ink);
  font-size: 1.08rem;
  font-weight: 720;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

html body .app-logo {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px;
  object-fit: contain;
  margin: 0 !important;
  padding: 0 !important;
  filter: drop-shadow(0 8px 14px rgba(18, 83, 160, 0.14));
}

html body nav.collapsed .menu_home {
  justify-content: center;
  padding-left: 10px;
  padding-right: 10px;
}

html body nav.collapsed .menu_home::after {
  display: none;
}

html body nav.collapsed .app-logo {
  display: block !important;
}

html body .folder_list .folders {
  margin-left: 0 !important;
  padding: 0 10px 0 10px !important;
}

html body .folder_list li {
  position: relative;
  margin: 3px 0;
  border-radius: 11px;
  transition: background-color .17s ease, transform .17s ease;
}

html body .folder_list li > a,
html body .folder_list li > .wrapper > a {
  border-radius: 11px;
}

html body .folder_list li:hover {
  background: rgba(11, 99, 206, 0.065);
}

html body li.selected_menu {
  background: linear-gradient(135deg, rgba(11, 99, 206, 0.13), rgba(113, 88, 217, 0.08)) !important;
  box-shadow: inset 3px 0 0 var(--sofon-blue);
}

html body li.selected_menu:not(.menu_search) a,
html body li.selected_menu:not(.menu_search) a:hover,
html body li.selected_menu:not(.menu_search) a i.bi {
  color: var(--sofon-blue-deep) !important;
}

html body .menu-icon {
  color: rgba(11, 99, 206, 0.78);
}

html body .sidebar-footer {
  border-top: 1px solid rgba(29, 79, 145, 0.10);
  margin: 28px 12px 0;
  padding: 16px 10px 20px;
}

/* Main work area: one continuous surface, not cards inside cards */
html body .content_cell {
  min-height: 100vh;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: -10px 0 34px rgba(31, 61, 111, 0.055);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

html body .content_cell .message_list,
html body .content_cell .compose_page,
html body .content_cell .msg_text,
html body .content_cell .server_content,
html body .content_cell .profile_content,
html body .content_cell .user_settings,
html body .content_cell .nux_add_account,
html body .content_cell .imap_server_setup,
html body .content_cell .pop3_server_setup,
html body .content_cell .configured_server,
html body .content_cell .content_title,
html body .content_cell .list_controls .add_server {
  background: transparent !important;
}

html body .content_title {
  border-bottom: 1px solid rgba(29, 79, 145, 0.10) !important;
}

html body .title,
html body .subtitle {
  color: var(--sofon-ink) !important;
}

html body .subtitle {
  font-weight: 650;
}

/* Message list */
html body .message_table {
  padding-left: 14px;
  padding-right: 14px;
}

html body .message_table > tbody > tr > td {
  border-bottom: 1px solid rgba(29, 79, 145, 0.08) !important;
  transition: background-color .15s ease;
}

html body .message_table > tbody > tr:hover > td {
  background: rgba(11, 99, 206, 0.045) !important;
}

html body .subject,
html body .from,
html body .msg_date,
html body .source {
  color: var(--sofon-ink);
}

html body .subject div {
  color: var(--sofon-muted);
}

html body .total_unread_count,
html body .total_unread_count.badge,
html body .unread_count {
  color: #fff !important;
  background: linear-gradient(135deg, var(--sofon-blue), var(--sofon-violet)) !important;
  border-radius: 999px !important;
}

/* Buttons and controls */
html body .btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #0b63ce;
  --bs-btn-border-color: #0b63ce;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #084faa;
  --bs-btn-hover-border-color: #084faa;
  --bs-btn-active-bg: #07458f;
  --bs-btn-active-border-color: #07458f;
  --bs-btn-focus-shadow-rgb: 11, 99, 206;
  border-radius: 0.72rem;
  box-shadow: 0 7px 18px rgba(11, 99, 206, 0.14);
}

html body .btn-secondary,
html body .btn-light,
html body .btn-outline-secondary {
  border-radius: 0.72rem;
}

html body .form-control,
html body .form-select,
html body .input-group-text,
html body .form-check-input {
  border-color: rgba(29, 79, 145, 0.16) !important;
}

html body .form-control,
html body .form-select {
  border-radius: 0.72rem;
  background-color: rgba(255, 255, 255, 0.92) !important;
}

html body .form-control:focus,
html body .form-select:focus {
  border-color: rgba(11, 99, 206, 0.52) !important;
  box-shadow: 0 0 0 0.22rem rgba(11, 99, 206, 0.10) !important;
}

html body .card,
html body .modal-content,
html body .popover,
html body .dropdown-menu {
  border-color: rgba(29, 79, 145, 0.12) !important;
  border-radius: 1rem;
  box-shadow: var(--sofon-shadow-soft);
}

html body .modal-content,
html body .dropdown-menu,
html body .popover {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html body .table > :not(caption) > * > * {
  border-bottom-color: rgba(29, 79, 145, 0.09);
}

/* Settings / account setup */
html body .server_content,
html body .user_settings,
html body .profile_content,
html body .nux_add_account {
  color: var(--sofon-ink) !important;
}

html body .user_settings table td {
  border-bottom: 1px solid rgba(29, 79, 145, 0.055);
}

html body .configured_server,
html body .account_folder_block .card {
  border-radius: 14px !important;
}

/* Mail body stays neutral and readable regardless of SOFON chrome */
html body .msg_text_inner {
  background: #fff !important;
  color: #202938 !important;
  border-radius: 12px;
}

html body .msg_text_inner a {
  color: #0b63ce;
}

/* System messages */
html body .sys_messages > div,
html body .alert {
  border-radius: 14px;
  box-shadow: var(--sofon-shadow-soft);
}

/* Mobile */
html body.mobile .menu-toggle {
  background: rgba(247, 250, 255, 0.90) !important;
  border-bottom: 1px solid rgba(29, 79, 145, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html body.mobile nav.folder_cell {
  background: rgba(247, 250, 255, 0.97) !important;
  box-shadow: 16px 0 44px rgba(31, 61, 111, 0.18);
}

html body.mobile .nav-header {
  background: transparent !important;
  border-bottom-color: rgba(29, 79, 145, 0.10) !important;
}

html body.mobile .nav-header .app-logo {
  width: 38px !important;
  height: 38px !important;
}

html body.mobile .content_cell {
  box-shadow: none;
}

@media (max-width: 575.98px) {
  html body .login_form .vh-100 {
    padding: 14px !important;
  }
  html body .login_form .vh-100 > .card {
    border-radius: 22px !important;
    padding: 12px 12px 16px !important;
  }
  html body .login_form .card-body > p.text-center img {
    width: 94px !important;
    height: 94px !important;
  }
  html body .login_form .card-body > p.text-center::after {
    font-size: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none !important;
  }
  *, *::before, *::after {
    scroll-behavior: auto !important;
  }
}

/* Contacts – SOFON polish */
html body .category-tabs-container,
html body .contact-list-section {
  border: 1px solid rgba(29, 79, 145, 0.10) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.70) !important;
  box-shadow: 0 10px 30px rgba(31, 61, 111, 0.06) !important;
}
html body .category-tabs {
  gap: 10px !important;
}
html body .category-tab {
  border: 1px solid rgba(29, 79, 145, 0.10) !important;
  border-radius: 14px !important;
  background: rgba(241, 246, 253, 0.86) !important;
  box-shadow: none !important;
  transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease !important;
}
html body .category-tab:hover {
  transform: translateY(-1px);
  background: rgba(232, 241, 253, 0.96) !important;
  box-shadow: 0 8px 20px rgba(31, 61, 111, 0.08) !important;
}
html body .category-tab.active {
  border-color: rgba(11, 99, 206, 0.25) !important;
  background: linear-gradient(135deg, rgba(231, 240, 255, 0.98), rgba(242, 238, 255, 0.96)) !important;
  box-shadow: inset 0 -3px 0 rgba(11, 99, 206, 0.72), 0 8px 22px rgba(31, 61, 111, 0.07) !important;
}
html body .tab-title,
html body .contact-list-header .list-title {
  color: var(--sofon-ink) !important;
}
html body .tab-description {
  color: var(--sofon-muted) !important;
}
html body .action-btn-add {
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 20px rgba(11, 99, 206, 0.14) !important;
}
html body .contact-list-container {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html body .contact-table {
  border-radius: 14px !important;
  overflow: hidden;
}
html body .contact-table thead th {
  background: rgba(237, 243, 251, 0.88) !important;
  color: var(--sofon-ink) !important;
  border-bottom-color: rgba(29, 79, 145, 0.12) !important;
}
