html, body { height: 100%; }
body { font-family: system-ui, Arial, sans-serif; margin: 0; padding: 0; background: #0b1220; color: #e6e9ef; }
.container { width: 100%; height: 100vh; margin: 0; padding: 16px; box-sizing: border-box; }
.container:has(.grid-main) { display: grid; grid-template-rows: auto 1fr; gap: 12px; }
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 0; }
.box { background: #121a2b; border: 1px solid #1f2a44; border-radius: 8px; padding: 12px; margin: 10px 0; }
h2 { margin: 12px 0 8px; font-size: 18px; }
ul, ol { padding-left: 18px; margin: 6px 0 0; }
button { background: #2b6de8; color: white; border: none; padding: 8px 12px; border-radius: 6px; cursor: pointer; }
button:hover { opacity: .9; }
.small { opacity: .85; font-size: 14px; }
.row { display: flex; gap: 8px; align-items: center; }
.chat { max-height: 340px; overflow-y: auto; background: #0e1626; border: 1px solid #1f2a44; border-radius: 6px; padding: 8px; }
.msg { padding: 6px 8px; margin: 4px 0; border-radius: 4px; background: #1a243a; }
.hr { height: 1px; background: #1f2a44; border: 0; margin: 10px 0; }

.grid-admin { display: grid; grid-template-columns: 320px 1fr; gap: 12px; height: calc(100vh - 32px); }
.sidebar { background: #121a2b; border: 1px solid #1f2a44; border-radius: 8px; padding: 10px; overflow-y: auto; }
.detail { background: #121a2b; border: 1px solid #1f2a44; border-radius: 8px; padding: 12px; overflow: auto; }

.sidebar a.enc-item { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #e6e9ef; text-decoration: none; padding: 10px 12px; border-radius: 8px; border: 1px solid #1f2a44; margin-bottom: 8px; background: #0e1626; transition: background .2s ease; min-height: 42px; }
.sidebar a.enc-item:hover { background: #162433; }

.enc-item .enc-title { display: block; font-size: 14px; line-height: 1.2; }
.enc-item .enc-sub { display: block; font-size: 12px; opacity: .8; }
.enc-item > div:first-child { flex: 1 1 auto; min-width: 0; }

.kebab { flex-shrink: 0; width: 26px; height: 26px; border-radius: 6px; background: #1a243a; color: #e6e9ef; border: 1px solid #1f2a44; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: background .2s ease; margin-left: auto; }
.kebab:hover { background: #22335a; }
.kebab:after { content: "⋯"; font-size: 18px; line-height: 1; }

.menu { position: absolute; right: 8px; top: calc(100% + 6px); background: #0e1626; border: 1px solid #1f2a44; border-radius: 8px; min-width: 170px; z-index: 1000; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.menu.hidden { display: none; }
.menu .mi { padding: 10px 12px; cursor: pointer; font-size: 14px; }
.menu .mi:hover { background: #162433; }

.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.btn { background: #2b6de8; color: #fff; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.btn:hover { opacity: .9; }

.grid-main { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; height: 100%; }
.column-left, .column-right { min-width: 0; display: flex; flex-direction: column; }
#transcriptBox { flex: 1 1 auto; display: flex; flex-direction: column; margin: 0; min-height: 0; }
#transcriptBody { flex: 1 1 auto; display: flex; min-height: 0; }
textarea.textarea-dark { width: 100%; height: 100%; min-height: 0; background: #0e1626; color: #e6e9ef; border: 1px solid #1f2a44; border-radius: 6px; padding: 10px 12px; font-family: inherit; font-size: 16px; line-height: 1.4; box-sizing: border-box; outline: none; resize: none; }

@media (max-width: 1024px) { .grid-admin { grid-template-columns: 280px 1fr; } .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-admin { grid-template-columns: 1fr; height: auto; } .sidebar { max-height: 40vh; } .grid-main { grid-template-columns: 1fr; } }
