/* KTOPH Theme for Roundcube Elastic */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=EB+Garamond:ital,wght@0,400;0,600;1,400&display=swap");

/* ---------- login page ---------- */
body.task-login { background: #f4ecdb; }
html:has(body.task-login), body.task-login { height: auto !important; min-height: 100%; overflow-y: auto !important; }
body.task-login #layout { display: flex; flex-wrap: wrap; min-height: 100vh; height: auto !important; position: static !important; overflow: visible !important; }
body.task-login #layout-content { height: auto !important; overflow: visible !important; }
@media (max-width: 1000px), (max-height: 820px) {
  body.task-login #layout { align-content: flex-start; }
  body.task-login #layout-content { justify-content: flex-start; padding-top: 28px; }
  #ktoph-brand { padding: 28px 32px; gap: 18px; }
  #ktoph-brand h2 { font-size: 30px; margin-bottom: 8px; }
  #ktoph-brand .kb-motto { display: none; }
  body.task-login #logo { display: none; }
}
#ktoph-brand { flex: 1 1 520px; background: #0f223b; color: #f3e6c8; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 56px 64px; box-sizing: border-box; font-family: 'EB Garamond', Georgia, serif; }
#ktoph-brand .kb-head { display: flex; align-items: center; gap: 22px; }
#ktoph-brand .kb-head img { width: 132px; height: auto; flex: none; filter: drop-shadow(0 8px 18px rgba(0,0,0,.45)); }
#ktoph-brand .kb-name { font-family: Cinzel, serif; font-weight: 700; font-size: 19px; letter-spacing: .08em; line-height: 1.3; color: #fbf8f1; }
#ktoph-brand .kb-ordre { font-family: Cinzel, serif; font-weight: 600; font-size: 14px; letter-spacing: .12em; margin-top: 8px; color: #b3893f; }
#ktoph-brand .kb-kicker { font-family: Cinzel, serif; font-size: 13px; letter-spacing: .3em; color: #b3893f; margin-bottom: 18px; }
#ktoph-brand h2 { font-family: Cinzel, serif; font-weight: 700; font-size: 44px; line-height: 1.15; margin: 0 0 20px; color: #fbf8f1; }
#ktoph-brand p { font-size: 20px; line-height: 1.55; margin: 0; color: #d9cfb8; max-width: 460px; }
#ktoph-brand .kb-motto { font-style: italic; font-size: 17px; color: #b3893f; }
body.task-login #layout-content { flex: 1 1 420px; background: #f4ecdb !important; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; box-sizing: border-box; }
body.task-login #layout-content form { width: 100%; max-width: 400px; background: #fffaf0; border: 1px solid #e2d6bd; border-top: 4px solid #7a1620; border-radius: 10px; padding: 32px 32px 24px; box-sizing: border-box; box-shadow: 0 18px 40px rgba(15,34,59,.12); }
body.task-login #logo { max-width: 84px; max-height: 84px; margin: 0 auto 8px; display: block; }
body.task-login #layout-content input.form-control { border-color: #cdbf9f; font-size: 16px; padding: 12px 14px; height: auto; }
body.task-login #layout-content input.form-control:focus { border-color: #b3893f; box-shadow: 0 0 0 2px rgba(179,137,63,.35); }
body.task-login #rcmloginsubmit { background: #7a1620; border-color: #7a1620; font-family: Cinzel, serif; font-weight: 700; letter-spacing: .14em; min-height: 48px; }
body.task-login #rcmloginsubmit:hover { background: #5e1017; border-color: #5e1017; }
#ktoph-login-extra { width: 100%; max-width: 400px; margin-top: 16px; text-align: center; font-family: 'EB Garamond', Georgia, serif; font-size: 16px; color: #5c5240; }
#ktoph-login-extra a { color: #7a1620; }
#ktoph-login-extra .kl-note { font-size: 15px; margin-top: 12px; }
body.task-login #login-footer { color: #8a7f6a; }
@media (max-width: 700px) {
  #ktoph-brand { padding: 28px 22px; gap: 18px; }
  #ktoph-brand .kb-head img { width: 76px; }
  #ktoph-brand .kb-name { font-size: 15px; }
  #ktoph-brand .kb-ordre { font-size: 12px; }
  #ktoph-brand h2 { font-size: 26px; margin-bottom: 8px; }
  #ktoph-brand p { font-size: 17px; }
  #ktoph-brand .kb-motto { display: none; }
  body.task-login #logo { display: none; }
  body.task-login #layout { align-content: flex-start; }
  body.task-login #layout-content { justify-content: flex-start; padding-top: 28px; }
}

/* ---------- main window ---------- */
#layout-menu { background: #0f223b !important; }
#layout-menu #logo { max-width: 100%; max-height: 56px; width: auto; height: auto; object-fit: contain; padding: 4px; box-sizing: border-box; }
#layout-menu .popover-header, #layout-menu .special-buttons { background: #0a1829 !important; }
.floating-action-buttons a.button, .floating-action-buttons a.compose { background-color: #7a1620 !important; color: #fff !important; box-shadow: 0 6px 16px rgba(122,22,32,.35); }
.floating-action-buttons a.button:hover { background-color: #5e1017 !important; }
#taskmenu a, #taskmenu .special-buttons a { color: #cbbf9f !important; }
#taskmenu a:hover { background: #1b3152 !important; color: #fbf8f1 !important; }
#taskmenu a.selected { background: #1d3557 !important; color: #e9c77a !important; }
#taskmenu a.compose { color: #e9c77a !important; }
#taskmenu a.ktoph-cal { color: #e9c77a !important; }
#taskmenu a.ktoph-cal:before { content: "\f073"; }
#taskmenu a.logout { color: #e08a8a !important; }

html:not(.dark-mode) .header, html:not(.dark-mode) #layout-sidebar > .header, html:not(.dark-mode) #layout-list > .header { background: #fbf6ea; }
html:not(.dark-mode) #layout-sidebar { background: #f7f0e1; }
html:not(.dark-mode) .header .header-title { font-family: Cinzel, serif; font-weight: 700; color: #0f223b; letter-spacing: .03em; }
html:not(.dark-mode) .listing li.selected, html:not(.dark-mode) .listing li.selected > a,
html:not(.dark-mode) table.records-table tr.selected td { background-color: #efe3c6 !important; color: #0f223b !important; }
html:not(.dark-mode) .listing li:not(.selected) > a:hover, html:not(.dark-mode) table.records-table tr:hover td { background-color: #f8f1e2; }
html:not(.dark-mode) table.messagelist tr.selected td { border-left-color: #b3893f; }
html:not(.dark-mode) table.messagelist tr.unread td span.subject a, html:not(.dark-mode) table.messagelist tr.unread .fromto { color: #0f223b; }
.listing li .unreadcount, #folderlist-content li .unreadcount { background-color: #7a1620 !important; color: #fff !important; }
.btn-primary, .btn.btn-primary, .button.mainaction, button.mainaction { background-color: #7a1620 !important; border-color: #7a1620 !important; color: #fff !important; }
.btn-primary:hover, .button.mainaction:hover { background-color: #5e1017 !important; border-color: #5e1017 !important; }
html:not(.dark-mode) #layout-content a, html:not(.dark-mode) .formcontent a { color: #7a1620; }
html:not(.dark-mode) .toolbar a.button:hover, html:not(.dark-mode) .toolbar a.button:focus { color: #7a1620; }
.quota-widget .bar .value { background-color: #b3893f !important; }

/* ---------- login seal spotlight ---------- */
#ktoph-brand { align-items: center; text-align: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(233,199,122,.30) 0, rgba(179,137,63,.12) 22%, rgba(15,34,59,0) 46%),
    radial-gradient(ellipse at 50% 120%, #1d3557 0, rgba(15,34,59,0) 60%),
    #0b1a2e !important; }
#ktoph-brand .kb-head { flex-direction: column; gap: 18px; }
#ktoph-brand .kb-head img { width: 320px; max-width: 70%; border-radius: 50%; box-shadow: 0 0 0 10px rgba(233,199,122,.10), 0 0 0 22px rgba(233,199,122,.05), 0 0 80px 20px rgba(233,199,122,.28); filter: none; }
#ktoph-brand .kb-name { font-size: 22px; }
#ktoph-brand p { margin-left: auto; margin-right: auto; }
@media (max-width: 1000px), (max-height: 820px) {
  #ktoph-brand .kb-head img { width: 220px; }
  #ktoph-brand .kb-name { font-size: 18px; }
}
@media (max-width: 700px) {
  #ktoph-brand .kb-head img { width: 140px; box-shadow: 0 0 0 8px rgba(233,199,122,.10), 0 0 50px 12px rgba(233,199,122,.28); }
  #ktoph-brand .kb-name { font-size: 15px; }
}
body.task-login #logo { display: none !important; }
body.task-login #login-form { top: auto !important; }
/* end spotlight */

/* ---------- login card premium ---------- */
body.task-login #layout-content {
  background-color: #f1e6cf !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='%23b3893f' fill-opacity='.13'%3E%3Cpath d='M36 36L31 22h10zM36 36l14-5v10zM36 36l5 14H31zM36 36l-14 5V31z'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle at 50% 45%, #fdf9ef 0, #f4ead4 55%, #e8d9b8 100%) !important;
  background-size: 72px 72px, 100% 100% !important; }
body.task-login #layout-content form {
  background: #fffdf7 !important; border: 1px solid #c9ad6e !important; border-top: 1px solid #c9ad6e !important; border-radius: 12px !important;
  padding: 34px 34px 22px !important;
  box-shadow: 0 0 0 6px #fffaf0, 0 0 0 7px #d9c38f, 0 28px 60px rgba(15,34,59,.22) !important; position: relative; }
body.task-login #login-form:before {
  content: "\2720  SIGN IN  \2720"; display: block; text-align: center; font-family: Cinzel, serif; font-weight: 700; font-size: 22px; letter-spacing: .18em; color: #0f223b;
  padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid #e2cf9f; }
body.task-login #login-form:after {
  content: ""; position: absolute; left: 50%; top: -9px; width: 120px; height: 4px; margin-left: -60px; border-radius: 4px; background: linear-gradient(90deg, rgba(179,137,63,0), #b3893f, rgba(179,137,63,0)); }
body.task-login #layout-content .input-group-text, body.task-login #layout-content .input-group-prepend span {
  background: #f6eedb !important; color: #b3893f !important; border-color: #d9c38f !important; }
body.task-login #layout-content input.form-control { border-color: #d9c38f !important; background: #fff !important; }
body.task-login #rcmloginsubmit {
  background: linear-gradient(180deg, #8f1d29 0%, #6d121c 100%) !important; border: 1px solid #b3893f !important; color: #fff6e0 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 18px rgba(122,22,32,.28) !important; transition: transform .15s, box-shadow .15s; }
body.task-login #rcmloginsubmit:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 12px 24px rgba(122,22,32,.34) !important; }
body.task-login #login-footer { font-size: 13px; }
#ktoph-login-extra { margin-top: 26px; }
#ktoph-login-extra .kl-links a { font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(122,22,32,.25); }
#ktoph-login-extra .kl-links a:hover { border-bottom-color: #7a1620; }
/* end card */

/* ---------- inbox cross pattern ---------- */
#layout-menu { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='%23e9c77a' fill-opacity='.07'%3E%3Cpath d='M36 36L31 22h10zM36 36l14-5v10zM36 36l5 14H31zM36 36l-14 5V31z'/%3E%3C/g%3E%3C/svg%3E") !important; background-size: 56px 56px !important; }
html:not(.dark-mode) #layout-sidebar { background-color: #f4ead4 !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='%23b3893f' fill-opacity='.12'%3E%3Cpath d='M36 36L31 22h10zM36 36l14-5v10zM36 36l5 14H31zM36 36l-14 5V31z'/%3E%3C/g%3E%3C/svg%3E"), linear-gradient(180deg, #f8f1e1 0, #efe2c6 100%) !important; background-size: 72px 72px, 100% 100% !important; }
html:not(.dark-mode) #layout-sidebar .scroller, html:not(.dark-mode) #layout-sidebar #folderlist-content, html:not(.dark-mode) #layout-sidebar .listing { background: transparent !important; }
html:not(.dark-mode) #layout-sidebar .listing li > a { background-color: transparent; }
html:not(.dark-mode) #layout-sidebar .listing li.selected > a, html:not(.dark-mode) #layout-sidebar .listing li.selected { background-color: rgba(255,250,240,.92) !important; box-shadow: inset 3px 0 0 #b3893f; }
html:not(.dark-mode) #layout-sidebar .listing li:not(.selected) > a:hover { background-color: rgba(255,250,240,.6) !important; }
html:not(.dark-mode) #layout-sidebar .footer, html:not(.dark-mode) #layout-sidebar .header { background-color: rgba(251,246,234,.94) !important; }
/* end inbox pattern */

/* ---------- meetings panel ---------- */
#ktoph-meetings { margin: 18px 10px 14px; background: rgba(255,250,240,.94); border: 1px solid #d9c38f; border-radius: 10px; padding: 12px 12px 10px; box-shadow: 0 4px 14px rgba(15,34,59,.08); }
#ktoph-meetings .km-head { font-family: Cinzel, serif; font-weight: 700; font-size: 13px; letter-spacing: .12em; color: #0f223b; text-transform: uppercase; padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid #e2cf9f; }
#ktoph-meetings .km-item { position: relative; padding: 8px 54px 8px 0; border-bottom: 1px dashed #e8dcc4; }
#ktoph-meetings .km-item:last-of-type { border-bottom: 0; }
#ktoph-meetings .km-when { font-size: 12px; color: #7a1620; font-weight: 600; }
#ktoph-meetings .km-tz { font-size: 10px; color: #8a7f6a; font-weight: 400; }
#ktoph-meetings .km-title { font-size: 13px; color: #1c1710; line-height: 1.3; margin-top: 2px; }
#ktoph-meetings .km-join { position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: #0f223b; color: #e9c77a !important; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 6px; text-decoration: none; }
#ktoph-meetings .km-join:hover { background: #1d3557; }
#ktoph-meetings .km-live .km-join { background: #7a1620; color: #fff !important; }
#ktoph-meetings .km-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c62828; margin-right: 5px; vertical-align: middle; animation: kmPulse 1.4s infinite; }
@keyframes kmPulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
#ktoph-meetings .km-empty { font-size: 13px; color: #5c5240; padding: 6px 0; }
#ktoph-meetings .km-all { display: block; text-align: right; font-size: 12px; font-weight: 600; color: #7a1620 !important; text-decoration: none; margin-top: 6px; }
html.dark-mode #ktoph-meetings { background: #2a3337; border-color: #4a5257; }
html.dark-mode #ktoph-meetings .km-head, html.dark-mode #ktoph-meetings .km-title { color: #e8dfca; }

/* ---------- announcement banner ---------- */
#ktoph-notice { margin: 8px 10px; background: linear-gradient(135deg, #0f223b 0%, #1d3557 100%); color: #e8dfca; border: 1px solid #b3893f; border-radius: 10px; padding: 12px 14px; box-shadow: 0 6px 16px rgba(15,34,59,.18); flex: none; }
#ktoph-notice .kn-row { display: flex; gap: 12px; align-items: flex-start; }
#ktoph-notice .kn-cross { color: #e9c77a; font-size: 22px; line-height: 1; padding-top: 2px; }
#ktoph-notice .kn-main { flex: 1; min-width: 0; }
#ktoph-notice .kn-title { font-family: Cinzel, serif; font-weight: 700; font-size: 15px; letter-spacing: .04em; color: #fbf8f1; }
#ktoph-notice .kn-text { font-size: 13px; color: #d9cfb8; margin-top: 3px; line-height: 1.4; }
#ktoph-notice .kn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
#ktoph-notice .kn-toggle { background: #b3893f; color: #0f223b; border: 0; border-radius: 6px; padding: 6px 12px; font-weight: 700; font-size: 12px; cursor: pointer; }
#ktoph-notice .kn-link { border: 1px solid #b3893f; color: #e9c77a !important; border-radius: 6px; padding: 5px 12px; font-weight: 700; font-size: 12px; text-decoration: none; }
#ktoph-notice .kn-close { background: none; border: 0; color: #cbbf9f; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; min-width: 28px; min-height: 28px; }
#ktoph-notice .kn-close:hover { color: #fff; }
#ktoph-notice .kn-details { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(233,199,122,.35); font-size: 13px; line-height: 1.45; max-height: 320px; overflow-y: auto; }
#ktoph-notice .kn-details .kn-h { font-family: Cinzel, serif; font-weight: 700; color: #e9c77a; margin: 8px 0 3px; font-size: 13px; }
#ktoph-notice .kn-details ul { margin: 0 0 4px; padding-left: 18px; }
#ktoph-notice .kn-details li { margin: 2px 0; }

/* ---------- impersonation alert ---------- */
.ktoph-alert { margin: 10px 0 12px; padding: 12px 14px; border-radius: 8px; background: #fdecea; border: 1px solid #e0a4a4; border-left: 5px solid #b71c1c; color: #5b1010; font-size: 14px; line-height: 1.45; }
.ktoph-alert .ka-title { font-weight: 700; font-size: 15px; color: #9f1414; margin-bottom: 4px; }
