* { box-sizing: border-box; }

body, div, a, input, select, textarea { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; }

body { background-color: White; color: Black; max-width: 600px; margin: auto auto 8px; word-wrap: break-word; font-size: 15px; }

hr { color: #c8ced4; }

h1, h2, h3 { font-family: "Times New Roman", Times, serif; margin: 0; }

h1 { font-size: x-large; }

h2 { font-size: large; }

h3 { font-size: medium; }

div, form { color: Black; background: #FFFCE0; border: none; padding: 2px; margin: 0; }

a, a.nolined { text-decoration: none; }

a { color: Blue; }

a:hover { color: #E4143E; }

a.nl { color: #00008B; }

span.mini, a.mini { font-size: 85%; }

span.mini { color: gray; }

.menu.forum_section span.mini { display: block; }

input, select, textarea { background-color: White; border: 1px solid Silver; color: Blue; padding: 2px; }

.form-control { width: 95%; margin-bottom: 5px; }

.form-select { width: auto; }

div[style*="text-align:center"] img {max-width: 235px;}

.btn, .forum_btn, .fm-btn { border: 1px solid #1e90ff; border-radius: 3px; background-color: white; color: blue; cursor: pointer; text-decoration: none; }

.btn, .forum_btn { padding: 6px; min-width: 80px; margin: 2px; display: inline-block; vertical-align: middle; text-align: center; }

.fm-btn { padding: 3px 6px; display: inline-flex; align-items: center; gap: 4px; }

.btn-primary, .fm-btn-primary { background-color: #E6FFE6; border-color: #008000; color: #008000; font-weight: bold; }

.btn-danger { border-color: red; color: red; }

.fm-btn-light { background-color: #F3F3F3; border-color: Silver; color: Black; }

.navbar, .top, .breadcrumb-fm { background: #FFFACD url(./b1.gif) repeat-x top; border: 1px solid #20B2AA; }

.navbar, .top { color: #2A2A2A; margin: 1px; }

.navbar { padding: 4px; font-weight: bold; }

.top { padding: 2px; }

.breadcrumb-fm { padding: 4px; margin: 1px 1px 4px 1px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

.breadcrumb-fm a { color: Blue; text-decoration: underline; }

.breadcrumb-fm span { color: #2A2A2A; font-weight: bold; }

.footer, .btm, .bottom-action-bar { background: #FFFCE1 url(./bd1.gif) repeat-x bottom; color: #2A2A2A; }

.footer, .btm { border: 1px solid #6AC1F9; }

.footer { padding: 4px; margin: 1px; }

.btm { padding: 2px; }

.bottom-action-bar { border-top: 1px solid #6AC1F9; padding: 4px; position: fixed; bottom: -100px; left: 0; width: 100%; z-index: 1000; display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; transition: bottom 0.2s ease; }

.bottom-action-bar.show { bottom: 0; }

.card { background: #FFFCE0; border: 1px solid #D0D0D0; margin: 4px 1px; padding: 4px; }

.card-header, .mdr, .forum_splitter { background: #FFFCE1 url(./bm.gif) repeat-x bottom; color: #2A2A2A; border: 1px solid #6AC1F9; border-radius: 3px; }

.card-header { padding: 4px; margin: 4px 1px 0 1px; font-weight: bold; }

.card-body { padding: 4px; }

.alert { padding: 5px; margin: 5px 1px; border: 1px solid gray; }

.alert-success, span.ok, .fm-toast.success, span.eltitle { background-color: #C0FFC0; }

.alert-success, .fm-toast.success { border-color: #00FF00; }

.alert-danger, .fm-toast.error { background-color: #FFC0C0; border-color: #FF0000; }

span.ok { border: thin solid #00FF00; }

.list-group { list-style-type: none; padding: 0; margin: 0; }

.list-group-item, .forum_message, .fm-list-item { border-bottom: 1px dotted #008080; }

.list-group-item { padding: 4px 0; }

.list-group-item:last-child, .fm-list-item:last-child { border-bottom: none; }

.lnkd { background: transparent url(./db2.png) repeat-x center; color: #2A2A2A; border: none; height: 25px; margin: 0; padding: 0 10px; text-align: center; }

.lnkd_s, img, input[type="checkbox"] { vertical-align: middle; }

.hdr { color: #008000; padding: 2px; border: 1px solid #00FF00; border-radius: 3px; }

.bri { border: 1px solid #FFC0C0; background-color: #FFFFC0; padding: 2px; margin: 1px; }

.spl { height: 7px; background: transparent url(./spl.gif) repeat-x; }

.news_title { color: #008080; background-color: #FFFFFF; border: 1px solid #F0F0F0; }

.forum_topic { color: #008080; background-color: #FFFFC0; border: 1px solid #D0D0D0; padding: 5px; }

.forum_message { padding: 3px; }

.my_forum_message { border: 1px outset #80FF80; background-color: #E6FFE6; }

.forum_auth, .auth { border: 1px solid #E0E0E0; border-radius: 5px; background-color: #FFFFC0; }

.dnblock { border: 1px solid #808080; border-radius: 5px; background-color: #F4F3D9; }

.warning { border-radius: 3px; background: #fffacd; border: 1px solid #ff6347; color: black; }

.touchlink { display: inline-block; padding: 3px; }

.o_block { height: 15px; position: relative; text-align: center; font: bold 18px Arial, sans-serif; background: #3cf url(./o_center.png) 0 0 repeat-x; padding: 5px 15px; }

.left_bok, .right_bok { width: 4px; height: 25px; font-size: 0; overflow: hidden; position: absolute; top: 0; }

.left_bok { background: transparent url(./o_left.png) 0 0 no-repeat; left: 0; }

.right_bok { background: transparent url(./o_right.png) 0 0 no-repeat; right: 0; }

div.gt { text-align: left; background-color: #D7FFD7; border: thin dotted Gray; }

div.fd { background-color: #F3F3F3; color: Green; font-weight: bold; }

.bb_quote:before { content: "Цитата:"; color: black; background-color: Yellow; margin-right: 5px; padding: 2px; }

.bb_spoiler { background-color: #F3F3F3; border: 1px solid #c8ced4; padding: 2px; margin: 4px 0; }

.bb_spoiler summary { cursor: pointer; font-weight: bold; color: #00008B; padding: 2px; outline: none; }

.spoiler_body { padding: 4px; border-top: 1px dotted #c8ced4; background-color: #FFFCE1; color: Black; margin-top: 4px; }

.cp, a.cp { color: #0000FF; }

.cj, a.cj { color: #008000; }

.cs, a.cs { color: #FF8000; }

.co, a.co { color: #B700B7; }

.red, .redtext { color: #FF0000; }

.keyword { color: #008000; }

.citate { color: #585858; }

.text-muted, .fm-file-size { color: gray; }

span.b { font-weight: bold; }

span.box { background-color: #FFFFFF; border: thin solid gray; border-left-color: #dfdfdf; border-top-color: #dfdfdf; padding: 2px; }

.badge { background-color: #FFFFFF; border: thin solid gray; padding: 1px 3px; }
.status-badge { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.st-pro { background: linear-gradient(135deg, #422006, #713f12) !important; color: #fbbf24 !important; }
.nick-pro { color: #fbbf24 !important; font-weight: 700; }

.d-flex, .fm-item-left, .fm-item-right { display: flex; }

.flex-wrap { flex-wrap: wrap; }

.gap-2 { gap: 5px; }

.align-items-center, .fm-item-left, .fm-item-right { align-items: center; }

.fm-item-left, .fm-item-right { gap: 5px; }

div[class*="-meta"], div[class*="-header"], div[class*="-body"], div[class*="-actions"], div[class*="-wrap"], div[class*="-container"], div[class*="-group"], div[class*="-list"], div[class*="-block"], div[class*="-section"], div[class*="-stat"], div[class*="-info"], div[class*="-results"], div[class*="-controls"], div.pagination { padding: 2px !important; margin: 0 !important; border: none !important; }

.post-actions a { text-decoration: none; }

.fm-toast { background-color: #FFFCE0; color: Black; border: 1px solid gray; padding: 5px; margin-top: 5px; opacity: 0; transition: opacity 0.2s; }

.fm-toast.show { opacity: 1; }

.fm-toast.error { color: red; }

.fm-toast.success { color: green; }

.fm-toolbar { background: #FFFCE0; padding: 2px; margin: 4px 1px; display: flex; flex-wrap: wrap; gap: 4px; }

.upload-btn-wrapper { position: relative; overflow: hidden; display: inline-block; }

.upload-btn-wrapper input[type=file] { font-size: 100px; position: absolute; left: 0; top: 0; opacity: 0; cursor: pointer; }

.fm-list-group { list-style: none; padding: 0; margin: 4px 1px; border: 1px solid #D0D0D0; }

.fm-list-item { display: flex; justify-content: space-between; align-items: center; padding: 2px 8px; min-height: 30px; background: #FFFCE0; }

.fm-list-item:hover, .fm-list-item:hover div { background-color: #F3F3F3; }

.fm-list-item[style="background: #f9fafb;"] div { background-color: #f9fafb; }

.fm-checkbox { margin: 0; width: 16px; height: 16px; vertical-align: middle; flex-shrink: 0; }

.fm-file-name { color: Blue; text-decoration: underline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }

@media (hover: hover) {
    .fm-file-name { flex: 0 0 var(--fm-name-w, auto); }
}

.fm-file-size { color: #606060; font-size: 12px; white-space: nowrap; flex-shrink: 0; }

.fm-item-left { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; }

.fm-item-right { flex-shrink: 0; }

.fm-btn-icon { border: 1px solid Silver; background: White; color: Blue; padding: 2px 4px; border-radius: 3px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

.fm-quick-actions { display: none; align-items: center; gap: 4px; flex-shrink: 0; }

.fm-list-item:hover .fm-quick-actions { display: inline-flex; }

.fm-quick-btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid Transparent; border-radius: 3px; color: #0000A0; text-decoration: none; background: Transparent; width: 20px; height: 20px; padding: 0; }

.fm-quick-btn:hover { background: White; border-color: Silver; }

.fm-quick-btn-danger { color: #A00000; }

.fm-quick-btn-danger:hover { background: #FFF0F0; color: #800000; }

@media (hover: none), (max-width: 600px) {
    .fm-quick-actions { gap: 6px; }
    .fm-quick-btn { width: 26px; height: 26px; }
    .fm-file-name { flex: 1; min-width: 0; }
    .fm-file-size { display: none; }
}

.bb_b { font-weight: bold; }

.bb_i { font-style: italic; }

.bb_u { text-decoration: underline; }

.bb_s { text-decoration: line-through; }

.bb_url { color: #0066cc; text-decoration: none; word-wrap: break-word; }

.bb_url:hover { text-decoration: underline; }

.bb_abbr { border-bottom: 1px dotted #666; cursor: help; text-decoration: none; }
.bb_img { max-width: 100%; height: auto; border: none; vertical-align: middle; max-height: 500px; object-fit: contain; display: inline-block; border-radius: 4px; background-color: #f5f5f5; }

.bb_pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 12px;
    border-radius: 6px;
    max-width: 100%;
    max-height: 400px;
    overflow: auto;
    margin: 10px 0;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

.bb_code {
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 13px;
    white-space: pre;
}
.bb_quote { background-color: #f9f9f9; border: 1px dashed gray; color: black; padding: 10px 15px; border-left: 4px solid #ccc; margin: 10px 0; font-style: italic; max-height: 300px; overflow-y: auto; }

.bb_spoiler, .spoiler-create  {
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

.bb_summary {
    cursor: pointer;
    font-weight: bold;
    padding: 5px;
    user-select: none;
}

.bb_spoiler_body {
    padding: 10px;
    border-top: 1px dashed #ddd;
    margin-top: 5px;
}

.bb_img_wrapper {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
}

.bb_img_proxy_fail {
    display: inline-block;
    margin: 10px 0;
    max-width: 100%;
}

.bb_img_proxy_fail .bb_spoiler, .spoiler-create  {
    border: 1px solid #ffc107;
    background-color: #fff9e6;
}

.bb_img_proxy_fail .bb_summary {
    font-size: 13px;
}

.fm-modal-content, .messages-container, .dialogs-list {background: #FFFCE0 !important;}

.footer-controls{display:flex;align-items:center;justify-content:center;gap:12px;margin:16px 12px;}

.theme-form{margin:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;border:none!important;display:block!important;}

.theme-form select{padding:8px 36px 8px 14px;border-radius:24px;border:1px solid var(--border,#e2e8f0);background-color:var(--surface,#fff);color:var(--text-primary,#111827);font-size:13px;cursor:pointer;outline:none;appearance:none;box-shadow:var(--shadow-sm,0 1px 2px rgba(0,0,0,0.05));font-weight:500;}

.theme-toggle:active{transform:scale(0.92);}

.theme-toggle svg{width:20px;height:20px;fill:currentColor;stroke:none;}

html.dark-mode-active .sun-icon{display:block;}

html.dark-mode-active .moon-icon{display:none;}
.theme-toggle { background: transparent; border: none; border-radius: 50%; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: inherit; box-shadow: var(--shadow-sm,0 1px 2px rgba(0,0,0,0.05)); transition: 0.2s ease; padding: 8px; }

.sun-icon, 
.moon-icon {
    width: 24px;
    height: 24px;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}
.sun-icon { display: none; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 18C8.68629 18 6 15.3137 6 12C6 8.68629 8.68629 6 12 6C15.3137 6 18 8.68629 18 12C18 15.3137 15.3137 18 12 18ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16ZM11 1H13V4H11V1ZM11 20H13V23H11V20ZM3.51472 4.92893L4.92893 3.51472L7.05025 5.63604L5.63604 7.05025L3.51472 4.92893ZM16.9497 18.364L18.364 16.9497L20.4853 19.0711L19.0711 20.4853L16.9497 18.364ZM19.0711 3.51472L20.4853 4.92893L18.364 7.05025L16.9497 5.63604L19.0711 3.51472ZM5.63604 16.9497L7.05025 18.364L4.92893 20.4853L3.51472 19.0711L5.63604 16.9497ZM23 11V13H20V11H23ZM4 11V13H1V11H4Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 18C8.68629 18 6 15.3137 6 12C6 8.68629 8.68629 6 12 6C15.3137 6 18 8.68629 18 12C18 15.3137 15.3137 18 12 18ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16ZM11 1H13V4H11V1ZM11 20H13V23H11V20ZM3.51472 4.92893L4.92893 3.51472L7.05025 5.63604L5.63604 7.05025L3.51472 4.92893ZM16.9497 18.364L18.364 16.9497L20.4853 19.0711L19.0711 20.4853L16.9497 18.364ZM19.0711 3.51472L20.4853 4.92893L18.364 7.05025L16.9497 5.63604L19.0711 3.51472ZM5.63604 16.9497L7.05025 18.364L4.92893 20.4853L3.51472 19.0711L5.63604 16.9497ZM23 11V13H20V11H23ZM4 11V13H1V11H4Z'/%3E%3C/svg%3E"); }
.moon-icon { display: block; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 7C10 10.866 13.134 14 17 14C18.9584 14 20.7302 13.2005 22 11.9056C21.2655 17.5855 16.4259 22 10.5 22C4.70101 22 0 17.299 0 11.5C0 5.5741 4.41446 0.734533 10.0944 0C8.79947 1.26982 8 3.04163 8 5C8 5.68114 8.09346 6.34032 8.26732 6.96696C8.80556 6.35338 9.38722 5.79251 10 5.29363V7Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 7C10 10.866 13.134 14 17 14C18.9584 14 20.7302 13.2005 22 11.9056C21.2655 17.5855 16.4259 22 10.5 22C4.70101 22 0 17.299 0 11.5C0 5.5741 4.41446 0.734533 10.0944 0C8.79947 1.26982 8 3.04163 8 5C8 5.68114 8.09346 6.34032 8.26732 6.96696C8.80556 6.35338 9.38722 5.79251 10 5.29363V7Z'/%3E%3C/svg%3E"); }

html[data-theme="_dark_modern"] .sun-icon {
    display: block;
}

html[data-theme="_dark_modern"] .moon-icon {
    display: none;
}

.btm-table {
    display: table !important;
    width: 99%;
}

.btm-table a {
    display: inline;
    border: 0;
    padding: 0;
    background: transparent;
}

.btm-cell {
    display: table-cell;
    vertical-align: middle;
    width: 33.33%;
}

.btm-left {
    text-align: left;
}

.btm-center {
    text-align: center;
    white-space: nowrap;
}

.btm-right {
    text-align: right;
    white-space: nowrap;
}

.btm-link {
    display: inline;
    border: 0;
    padding: 0;
    background: transparent;
}
.messages-container { display: flex; flex-direction: column; height: 75dvh; min-height: 500px; max-height: 850px; max-width: 800px; margin: 0 auto 20px auto; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); position: relative; }

.msg-list, .dialogs-list { background: var(--bg); flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: var(--bg) transparent; }

.msg-list { background: var(--surface); padding: 16px; gap: 12px; }

.dialogs-list { padding: 0; }

.msg-list::-webkit-scrollbar, .dialogs-list::-webkit-scrollbar { width: 6px; }

.msg-list::-webkit-scrollbar-thumb, .dialogs-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.nav-links { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); color: var(--text-primary); border-bottom: 1px solid #e2e8f0; font-size: 1rem; font-weight: 600; position: sticky; top: 0; z-index: 10; }

.btn-back { display: flex; align-items: center; gap: 6px; color: #3b82f6; text-decoration: none; font-weight: 500; }

.btn-back svg { stroke: currentColor; width: 20px; height: 20px; }

.btn-back:hover { color: #2563eb; }

.chat-title-link { flex: 1; text-decoration: none; display: flex; align-items: center; justify-content: center; transform: translateX(-20px); gap: 10px; }

.chat-title-info { display: flex; flex-direction: column; align-items: flex-start; color: var(--text-primary); }

.chat-title-name { color: var(--text-primary); font-size: 1rem; font-weight: 600; line-height: 1.2; }

.chat-title-bot { color: #8b5cf6; font-size: 0.75rem; font-weight: 500; text-transform: lowercase; }

.chat-title-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #e2e8f0; display: flex; align-items: center; justify-content: center; color: #94a3b8; }

.chat-title-avatar svg { width: 20px; height: 20px; }

.bot-tag { background: rgba(139,92,246,0.1); color: #8b5cf6; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; display: inline-block; line-height: 1; }

.msg-form { flex: 0 0 auto; padding: 12px 16px; background: var(--surface); border-top: 1px solid #e2e8f0; position: sticky; bottom: 0; z-index: 10; }

.msg-item { padding: 8px 14px; border-radius: 14px; position: relative; max-width: 80%; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

.msg-mine { background: var(--bg); align-self: flex-end; border-bottom-right-radius: 4px; border: 1px solid #bfdbfe; }

.msg-theirs { background: var(--surface); align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid #e2e8f0; }

.msg-body { color: var(--text-primary); word-wrap: break-word; font-size: 0.95rem; line-height: 1.45; background: transparent !important; }

.msg-footer { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 4px; font-size: 0.75rem; color: #64748b; background: transparent !important; }

.msg-actions { display: flex; gap: 4px; margin-left: auto; }

.btn-icon { background: none; border: none; padding: 0; cursor: pointer; color: #94a3b8; display: inline-flex; align-items: center; transition: 0.2s; }

.btn-icon:hover { color: #3b82f6; }

.btn-icon .icon-del:hover { color: #ef4444; stroke: #ef4444; }

.icon-status { width: 14px; height: 14px; }

.icon-read { color: #3b82f6; }

.icon-unread { color: #94a3b8; }
.dialog-item { border-bottom: 1px solid #6AC1F9; display: flex; align-items: center; gap: 14px; padding: 12px 16px; text-decoration: none; color: inherit; transition: background 0.2s; }
.dialog-item:hover { opacity: 0.8; background: var(--surface); }

.dialog-avatar { width: 48px; height: 48px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #94a3b8; }

.dialog-avatar svg { width: 24px; height: 24px; stroke-width: 1.5; }

.dialog-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.dialog-top { display: flex; justify-content: space-between; align-items: center; }

.dialog-login { font-weight: 600; color: var(--text-primary); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; }

.dialog-time { font-size: 0.8rem; color: #94a3b8; white-space: nowrap; }

.dialog-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.dialog-preview { color: #64748b; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }

.badge-unread { background: #3b82f6; color: #fff; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; flex-shrink: 0; }

.empty-state { text-align: center; color: #94a3b8; padding: 40px 20px; font-size: 0.95rem; flex: 1; display: flex; align-items: center; justify-content: center; }
.empty-state svg { opacity: 0.6; margin-bottom: 12px; width: 48px; height: 48px; }

.chat-input-wrapper { border: 1px solid #cbd5e1; border-radius: 20px; background: var(--surface); display: flex; flex-direction: column; transition: all 0.2s; }

.chat-input-wrapper:focus-within { background: var(--surface); border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }

.chat-input-row { background: var(--bg); display: flex; align-items: flex-end; padding: 6px 8px 8px 14px; gap: 10px; }

.chat-textarea { flex: 1; border: none; outline: none; resize: none; background: transparent; padding: 6px 0; font-size: 0.95rem; line-height: 1.4; max-height: 150px; min-height: 24px; overflow-y: auto; color: var(--text-primary); font-family: inherit; }

.editing-textarea { border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px; width: 100%; box-sizing: border-box; }

.editing-textarea:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); }

.btn-send { background: #3b82f6; color: #fff; border: none; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; flex-shrink: 0; padding: 0; }

.btn-send:hover { background: #2563eb; transform: scale(1.05); }

.btn-send:disabled { background: #cbd5e1; cursor: not-allowed; transform: none; }

.btn-send svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; transform: translateX(-1px) translateY(1px); }

.btn-minimal { background: #3b82f6; color: #fff; border: none; border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 0.9rem; transition: background 0.2s; }

.btn-minimal:hover { background: #2563eb; }

.msg-attachment-img { max-width: 100%; max-height: 250px; border-radius: 8px; margin-top: 8px; display: block; object-fit: contain; }

.msg-attachment-file { display: inline-flex; align-items: center; padding: 8px 12px; background: rgba(0,0,0,0.05); border-radius: 8px; margin-top: 8px; text-decoration: none; color: inherit; font-size: 0.9rem; font-weight: 500; transition: background 0.2s; }

.msg-attachment-file:hover { background: rgba(0,0,0,0.1); }

.msg-attachment-file svg { fill: none; stroke: currentColor; stroke-width: 2; margin-right: 6px; }

.msg-deleted-file { margin-top: 8px; font-size: 0.85rem; color: #ef4444; font-style: italic; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-bottom: 15px; }

.stat-box { background: var(--surface); border: 1px solid var(--border); padding: 15px; border-radius: var(--radius); text-align: center; }

.stat-title { font-size: 0.9em; color: var(--text-secondary); margin-bottom: 5px; }

.stat-val.success { color: #10b981; }

.stat-val.warn { color: var(--accent); }

.table-scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }

th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); background: var(--bg); position: sticky; top: 0; }

tr:hover td { background: var(--bg); }

.badge-success { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.badge-secondary { background: var(--border); color: var(--text-primary); }

.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--accent-hover); }

code { background: var(--bg); color: #ec4899; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); word-break: break-all; }

details.acc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 15px; box-shadow: var(--shadow-sm); }

details.acc > summary { cursor: pointer; list-style: none; padding: 12px 15px; font-weight: bold; color: var(--text-primary); background: var(--surface); border-radius: var(--radius); user-select: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

details.acc > summary::-webkit-details-marker { display: none; }

details.acc > summary .acc-caret { color: var(--text-secondary); transition: transform .15s; flex-shrink: 0; }

details.acc[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }

details.acc[open] > summary .acc-caret { transform: rotate(180deg); }

.fm-toolbar .fm-btn { display: inline-flex; align-items: center; gap: 6px; }

.fm-modal { z-index: 9999; display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); justify-content: center; align-items: center; }

.fm-modal.show { display: flex; }

.fm-modal-content { background: var(--surface) !important; padding: 20px; border-radius: 8px; width: 450px; max-width: 90%; box-shadow: 0 4px 15px rgba(0,0,0,0.2); font-family: sans-serif; }

.fm-tabs { display: flex; border-bottom: 1px solid #e5e7eb; margin-bottom: 15px; }

.fm-tab { flex: 1; padding: 10px; background: none; border: none; cursor: pointer; color: #4b5563; border-bottom: 2px solid transparent; text-align: center; font-size: 14px; }

.fm-tab.active { border-bottom: 2px solid #3b82f6; color: #3b82f6; font-weight: bold; }

.fm-tab-content { display: none; }

.fm-tab-content.active { display: block; }

.drop-area { border: 2px dashed #d1d5db; border-radius: 8px; padding: 40px 20px; text-align: center; color: #6b7280; transition: all 0.2s; cursor: pointer; font-size: 14px; }

.drop-area.dragover { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }

.fm-input-url { width: 100%; padding: 10px; margin-bottom: 15px; border: 1px solid #d1d5db; border-radius: 4px; box-sizing: border-box; font-size: 14px; outline: none; }

.fm-input-url:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }

#fm-main-container { transition: opacity 0.2s; }

.fm-svg-btn { background: transparent; border: none; color: #888888; padding: 4px; cursor: pointer; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s ease; width: 28px; height: 28px; box-sizing: border-box; font-size: 16px; line-height: 1; flex-shrink: 0; }

.fm-svg-btn:hover { background: rgba(127, 127, 127, 0.2); color: inherit; }

.fm-modal-content .fm-btn[data-fm-action="close-modal"] { min-width: 32px; min-height: 32px; line-height: 1; font-size: 16px; }

.fm-editor-tabs { display: flex; background: #1e1e1e; border-bottom: 1px solid #333; }

.fm-editor-tab { padding: 8px 15px; background: #2d2d2d; color: #9cdcfe; cursor: pointer; border-right: 1px solid #1e1e1e; display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; user-select: none; }

.fm-editor-tab.active { background: #1e1e1e; color: #fff; border-top: 2px solid #3b82f6; }

.fm-editor-tab:hover:not(.active) { background: #333; }

.fm-tab-close { cursor: pointer; color: #888; border-radius: 50%; width: 16px; height: 16px; text-align: center; line-height: 16px; font-size: 12px; }

.fm-tab-close:hover { background: #444; color: #fff; }

.fm-ide-layout { display: flex; height: calc(100vh - 140px); min-height: 400px; border: 1px solid #333; border-radius: 8px; overflow: hidden; background: #1e1e1e; position: relative; }

.fm-ide-sidebar { width: 250px; border-right: 1px solid #333; display: flex; flex-direction: column; background: #181818; flex-shrink: 0; overflow: hidden; }

.fm-sidebar-backdrop { display: none; }

.fm-mobile-close { display: none !important; }

@media (min-width: 769px) { .fm-ide-sidebar { display: none; } .fm-ide-sidebar.show { display: flex; } }

.fm-resizer { width: 4px; cursor: col-resize; background: #181818; flex-shrink: 0; z-index: 10; transition: background 0.2s; display: none; }

.fm-resizer:hover, .fm-resizer.resizing { background: #3b82f6; }
@media (max-width: 768px) { .messages-container { height: calc(100dvh - 120px); min-height: auto; max-height: none; max-width: 100%; border-radius: 0; border-left: none; border-right: none; margin-bottom: 0; box-shadow: none; }; .grid-2 { grid-template-columns: 1fr; }; .fm-ide-sidebar { position: absolute; left: 0; top: 0; bottom: 0; z-index: 100; box-shadow: 2px 0 10px rgba(0,0,0,0.5); transform: translateX(-100%); transition: transform 0.25s ease; } .fm-ide-sidebar.show { transform: translateX(0); } .fm-sidebar-backdrop.show { display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 99; backdrop-filter: blur(2px); } .fm-mobile-close { display: inline-flex !important; }; .fm-ide-layout { position: relative; } .fm-resizer { display: none !important; }; }

.fm-ide-sidebar-header { padding: 10px; color: #ccc; border-bottom: 1px solid #333; display: flex; justify-content: space-between; align-items: center; }

.fm-ide-tree { flex: 1; overflow-y: auto; overflow-x: auto; padding: 5px 0; }

.fm-tree-node { display: block; }

.fm-tree-item { padding: 4px 10px; color: #ccc; font-size: 13px; cursor: pointer; display: flex; align-items: center; user-select: none; white-space: nowrap; }

.fm-tree-item:hover { background: #2a2d2e; }

.fm-tree-item.active { background: #37373d; color: #fff; }

.fm-tree-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-right: 6px; }

.fm-tree-icon svg { display: block; }
.fm-file-icon { color: Black; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; margin-right: 6px; }

.fm-file-icon svg { display: block; }

.dir-icon svg { transition: transform 0.2s; }

.dir-node .fm-tree-children { display: none; }

.dir-node.open > .fm-tree-children { display: block; }

.dir-node.open > .fm-tree-item .dir-icon svg { transform: rotate(90deg); }

.dir-node.open > .fm-tree-item .dir-folder-closed { display: none !important; }

.dir-node.open > .fm-tree-item .dir-folder-open { display: inline-flex !important; }

.fm-ide-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.fm-editor-wrapper { flex: 1; position: relative; display: flex; flex-direction: column; }

.fm-ide-layout .CodeMirror { position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; height: 100% !important; width: 100% !important; font-family: 'Courier New', Courier, monospace !important; font-size: 14px !important; z-index: 1 !important; text-align: left !important; line-height: 1.5 !important; }

.fm-ide-layout .CodeMirror-scroll { overflow-y: auto !important; overflow-x: auto !important; height: 100% !important; }

#editor { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 15px; font-family: 'Courier New', Courier, monospace; font-size: 14px; resize: none; box-sizing: border-box; background: #1e1e1e; color: #d4d4d4; outline: none; line-height: 1.5; }

#editor.fm-plain-editor { display: block !important; z-index: 1; tab-size: 4; }

.fm-ide-layout.fullscreen { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100vw !important; height: 100vh !important; z-index: 9999 !important; border-radius: 0 !important; border: none !important; }
.toast-container { position: fixed; bottom: 10px; right: 10px; z-index: 99999 !important; }

.fm-ide-layout ::-webkit-scrollbar, .fm-ide-layout .CodeMirror-vscrollbar::-webkit-scrollbar, .fm-ide-layout .CodeMirror-hscrollbar::-webkit-scrollbar { width: 5px; height: 5px; }

.fm-ide-layout ::-webkit-scrollbar-track, .fm-ide-layout .CodeMirror-vscrollbar::-webkit-scrollbar-track, .fm-ide-layout .CodeMirror-hscrollbar::-webkit-scrollbar-track { background: transparent; }

.fm-ide-layout ::-webkit-scrollbar-thumb, .fm-ide-layout .CodeMirror-vscrollbar::-webkit-scrollbar-thumb, .fm-ide-layout .CodeMirror-hscrollbar::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

.fm-ide-layout ::-webkit-scrollbar-thumb:hover, .fm-ide-layout .CodeMirror-vscrollbar::-webkit-scrollbar-thumb:hover, .fm-ide-layout .CodeMirror-hscrollbar::-webkit-scrollbar-thumb:hover { background: #666; }

@media (max-width: 480px) { .hide-mobile { display: none; } .fm-toolbar .fm-btn { padding: 6px 10px; } }

.fdns-zone-list { max-height: 240px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.fdns-zone-opt { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 15px; -webkit-tap-highlight-color: transparent; }

.fdns-zone-opt:last-child { border-bottom: none; }

.fdns-zone-opt.fdns-zone-sel { background: var(--accent-bg); color: var(--text-primary); font-weight: bold; }

.fdns-zone-opt:hover { background: var(--accent-bg); }

.tls-badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:12px; font-weight:600; white-space:nowrap; }

.tls-ok { background:#e6f6e6; color:#1a7a1a; border:1px solid #bcdcbc; }

.tls-pending { background:#fff4d6; color:#8a6d00; border:1px solid #e6d48a; }

.tls-failed { background:#fbe6e6; color:#a01414; border:1px solid #e6b8b8; }

.tls-none { background:var(--accent-bg); color:var(--text-secondary); border:1px solid var(--border); }

.fdns-zone-sel { font-size:15px; }

.fdns-zone-sel[data-empty] { opacity:.55; font-style:italic; }

@media (max-width: 640px) { .fdns-zone-opt { padding: 10px 12px; font-size: 16px; } .fdns-zone-list { max-height: 200px; } }

.bb-panel { display: flex; gap: 2px; padding: 6px 8px; background: var(--bg); border-bottom: 1px solid #e2e8f0; overflow-x: auto; scrollbar-width: none; border-top-left-radius: 12px; border-top-right-radius: 12px; }

.bb-panel::-webkit-scrollbar { display: none; }

.bb-btn { background: transparent; border: none; border-radius: 4px; padding: 4px; color: #64748b; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s ease; }

.bb-btn:hover { background: #e2e8f0; color: #3b82f6; }

.bb-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }