/* Voice recorder overrides loaded after the component stylesheet. */
#editor.voice-mode {
  border-color: #eadfed;
  box-shadow: 0 28px 100px #35104438;
}

#editor.voice-mode h2,
#editor.voice-mode h2::after {
  content: none;
  display: none;
}

#editor.voice-mode.voice-active {
  width: 360px;
  height: 104px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

#editor.voice-mode.voice-active .dialog-top {
  display: none;
}

#editor.voice-mode.voice-active .voice-panel {
  position: relative;
  height: 104px;
  margin: 0;
  padding: 0;
}

#editor.voice-mode.voice-active .voice-controls {
  height: 104px;
}

#editor.voice-mode.voice-active #voice-status {
  position: absolute;
  top: 122px;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 10px 18px;
  border: 1px solid #eadfed;
  border-radius: 999px;
  background: #fffffff2;
  box-shadow: 0 9px 28px #35104420;
  color: #5b217f;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}

#editor.voice-mode.voice-active .voice-controls button {
  width: 104px;
  height: 104px;
  min-height: 104px;
  border-radius: 50%;
  background: linear-gradient(145deg, #6b268d, #d7196f);
  box-shadow: 0 0 0 0 #d7196f55;
}

#editor.voice-mode.voice-active.voice-processing .voice-controls button {
  background: linear-gradient(145deg, #72537d, #9a6d8f);
}

@keyframes mic-pulse {
  0% { box-shadow: 0 0 0 0 #d7196f55; }
  70% { box-shadow: 0 0 0 24px #d7196f00; }
  100% { box-shadow: 0 0 0 0 #d7196f00; }
}

/* Confirmação simples após a transcrição por voz. */
#editor.voice-mode.voice-review {
  position: fixed;
  inset: 0;
  width: min(760px, calc(100% - 32px));
  height: auto;
  max-height: min(620px, calc(100dvh - 40px));
  margin: auto;
  padding: 38px 42px 14px;
  border: 0;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
  overflow-y: auto;
}

#editor.voice-mode.voice-review form {
  display: flex;
  flex-direction: column;
}

#editor.voice-mode.voice-review .dialog-top,
#editor.voice-mode.voice-review h2,
#editor.voice-mode.voice-review .voice-panel,
#editor.voice-mode.voice-review .title-field,
#editor.voice-mode.voice-review .form-row,
#editor.voice-mode.voice-review #cancel {
  display: none;
}

#editor.voice-mode.voice-review .body-field {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 0;
}

#editor.voice-mode.voice-review h2::after,
#editor.voice-mode.voice-review .body-field::before {
  content: none;
  display: none;
}

#editor.voice-mode.voice-review .body-field textarea {
  display: block;
  width: 100%;
  height: auto;
  min-height: 48px;
  max-height: min(360px, 52vh);
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: 650 46px/1.4 'Manrope', sans-serif;
  letter-spacing: -.6px;
  text-align: center;
  resize: none;
  field-sizing: content;
}

#editor.voice-mode.voice-review .dialog-footer {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-top: 18px;
}

#editor.voice-mode.voice-review #save-note {
  width: auto;
  min-width: 0;
  min-height: 34px;
  padding: 7px 12px;
  border: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  font-size: 14px;
}

@media (max-width: 700px) {
  #editor.voice-mode.voice-review {
    width: calc(100% - 24px);
    padding: 28px 24px 24px;
  }

  #editor.voice-mode.voice-review .body-field textarea {
    min-height: 48px;
    max-height: 48vh;
    font-size: 36px;
  }
}

/* A confirmação ocupa a tela para manter o texto no centro geométrico real. */
#editor.voice-mode.voice-review {
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

#editor.voice-mode.voice-review form {
  position: relative;
  width: 100%;
  height: 100%;
}

#editor.voice-mode.voice-review .body-field {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100% - 48px));
  transform: translate(-50%, -50%);
}

#editor.voice-mode.voice-review .body-field::after {
  right: 50%;
  bottom: -38px;
  transform: translate(50%, -4px);
}

#editor.voice-mode.voice-review .body-field.has-more-text::after {
  transform: translate(50%, 0);
}

#editor.voice-mode.voice-review .dialog-footer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  width: auto;
  margin: 0;
  transform: translateX(-50%);
}

#editor.voice-mode.voice-review.analysis-pending .dialog-footer {
  display: none;
}

body:not(.authenticated)>.sidebar,body:not(.authenticated)>main,body:not(.authenticated)>dialog,body:not(.authenticated)>.context-menu,body:not(.authenticated)>#toast{display:none}
.auth-screen{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 78% 18%,#8f3478 0,transparent 32%),radial-gradient(circle at 15% 90%,#71288f 0,transparent 36%),linear-gradient(145deg,#3d115a,#671f82 55%,#9f286f)}.auth-screen[hidden]{display:none}.auth-card{position:relative;width:min(920px,100%);min-height:570px;display:grid;grid-template-columns:1.05fr .95fr;overflow:hidden;border:1px solid #ffffff24;border-radius:32px;background:#ffffff10;box-shadow:0 35px 100px #23062f66;backdrop-filter:blur(20px)}.auth-copy{display:flex;flex-direction:column;justify-content:center;padding:70px;color:#fff}.auth-copy>span{font-size:10px;font-weight:700;letter-spacing:2px;color:#f1cbe5}.auth-copy h1{max-width:430px;margin:18px 0 14px;color:#fff;font-size:46px;line-height:1.08;letter-spacing:-2px}.auth-copy p{margin:0;color:#ead9ef;font-size:15px}.auth-brand{position:absolute;display:flex;align-items:center;gap:9px;margin:38px 42px;color:#fff;font:800 29px 'Manrope',sans-serif}.auth-brand>span:last-child{color:#ff8c9b}.auth-card form{display:flex;flex-direction:column;justify-content:center;gap:17px;padding:58px 62px;background:#fff}.auth-card form label{display:flex;flex-direction:column;gap:8px;color:#5c4164;font-size:12px;font-weight:600}.auth-card form input{width:100%;padding:14px 15px;border:1px solid #e2d4e6;border-radius:12px;outline:0;background:#fcfafd;color:#351544;font-size:14px}.auth-card form input:focus{border-color:#b6479b;box-shadow:0 0 0 3px #b6479b16}.auth-card .primary{margin-top:5px;min-height:47px}.auth-switch{border:0;background:transparent;color:#8b347f;font-size:12px;font-weight:650}.auth-switch:hover{text-decoration:underline;filter:none}#auth-message{min-height:18px;margin:0;color:#bd345e;font-size:12px;line-height:1.5}.category-heading{display:flex;align-items:center;justify-content:space-between;padding-right:9px}.category-heading button{width:25px;height:25px;display:flex;align-items:center;justify-content:center;padding:2px 0 0;border:1px solid #ffffff30;border-radius:50%;background:#ffffff10;color:#fff;font-family:Arial,sans-serif;font-size:18px;font-weight:300;line-height:1}.category-heading button:hover{background:#ffffff22}.profile{position:relative}.profile>div{min-width:0}.profile strong,.profile small{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile #logout{margin-left:auto;border:0;background:transparent;color:#eadcf0;font-size:19px;padding:5px;border-radius:7px}.profile #logout:hover{background:#ffffff14}.category-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:11px 2px;border-bottom:1px solid #efe5f1}.category-row>span{display:flex;align-items:center;gap:10px;color:#54345c;font-size:13px}.category-row i{width:10px;height:10px;border-radius:50%}.category-row button{border:0;background:transparent;color:#b43867;font-size:11px}.category-row small{color:#aa97ae;font-size:10px}#category-dialog{width:520px}#category-form{display:grid;grid-template-columns:1fr 70px;align-items:end;gap:15px;margin-bottom:24px}#category-form label{margin:0}#category-form .primary{grid-column:1/-1}#category-color{height:42px;padding:4px}#category-list{max-height:260px;overflow:auto}
@media(max-width:700px){.auth-card{min-height:0;grid-template-columns:1fr}.auth-copy{padding:100px 28px 34px}.auth-copy h1{font-size:34px}.auth-card form{padding:35px 28px 42px}.auth-brand{margin:28px}.category-heading{display:none}}

/* NotePost */
#editor:not(.voice-mode) .voice-panel{display:none}
#reader{scrollbar-width:none;scrollbar-gutter:auto}
#reader::-webkit-scrollbar{display:none;width:0;height:0}
#reader::-webkit-scrollbar-track{margin:18px 0;background:transparent}
#reader::-webkit-scrollbar-thumb{min-height:48px;border:2px solid transparent;border-radius:999px;background:#b989bc;background-clip:content-box}
#reader::-webkit-scrollbar-thumb:hover{background:#96549f;background-clip:content-box}
#reader::-webkit-scrollbar-button{display:none;width:0;height:0}
#reader::-webkit-scrollbar-corner{background:transparent}
#reader .reader-footer{position:sticky;z-index:4;bottom:-42px;height:68px;margin:24px -40px -42px;display:flex;align-items:center;justify-content:center;border-top:1px solid #eee2f0;background:linear-gradient(180deg,#fff9,#fff 42%);backdrop-filter:blur(10px)}
#reader-scroll-bottom{width:36px;height:36px;padding:0;border:1px solid #ead9ec;border-radius:50%;background:#fffffff0 center/16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%238d247f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");box-shadow:0 8px 22px #4b176b25;cursor:pointer;animation:reader-footer-arrow 1.5s ease-in-out infinite}
#reader-scroll-bottom:hover{border-color:#d7b5dc;background-color:#fff;box-shadow:0 10px 26px #4b176b35}
@keyframes reader-footer-arrow{0%,100%{transform:translateY(0)}50%{transform:translateY(4px)}}
@keyframes reader-arrow{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,4px)}}
#category-dialog{width:590px;padding:34px 38px}
#category-dialog h2{font-size:30px;margin:16px 0 30px}
#category-dialog #category-form label{gap:11px;color:#57335f;font-size:15px;font-weight:700}
#category-dialog #category-name{min-height:54px;padding:14px 16px;font-size:18px;font-weight:600}
#category-dialog #category-color{height:54px;padding:0;overflow:hidden;border:0;border-radius:12px;background:transparent;cursor:pointer}
#category-dialog #category-color::-webkit-color-swatch-wrapper{padding:0}
#category-dialog #category-color::-webkit-color-swatch{border:0;border-radius:12px}
#category-dialog #category-color::-moz-color-swatch{border:0;border-radius:12px}
#category-dialog #category-form .primary{min-height:50px;font-size:15px}
.card .date{max-width:72%;font-size:11px;font-weight:600;line-height:1.45;color:#74577b}
.card .badge{padding:7px 13px;font-size:14px;font-weight:700;line-height:1.2}
.card h2{display:-webkit-box;min-height:64px;margin:18px 0 12px;overflow:hidden;font-size:23px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-overflow:ellipsis}
.card .ai-summary strong{font-size:16px}
.card .ai-summary p,.card .ai-summary li{font-size:16px;line-height:1.72}
.card>.card-content{font-size:16px;line-height:1.75}
.card .card-actions button{font-size:13px}
.card .date{font-size:12px;line-height:1.55}
.card .source-copy b{font-size:15px}
.card .source-copy small{font-size:12px}
.card.trashed{opacity:.82;filter:saturate(.72)}
.card.trashed:hover{opacity:1;filter:saturate(.9)}
.card.trashed .card-actions button[data-action="restore"]{padding:7px 11px;border-radius:999px;background:#ffffffb8;color:#71327b;font-size:12px;font-weight:700}
.card:not(.expanded) .ai-additions,.card:not(.expanded) .ai-sources{display:none}
.card:not(.expanded):has(.ai-summary)>.card-content{display:none}
.card.expanded .ai-additions,.card.expanded .ai-sources,.card.expanded>.card-content{animation:card-content-in .24s ease both}
@keyframes card-content-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
.card-view-toggle{display:flex;align-items:center;gap:8px;color:#75567d;font-size:12px;font-weight:650;white-space:nowrap;cursor:pointer}
.card-view-toggle input{width:17px;height:17px;margin:0;accent-color:#a82b83;cursor:pointer}
.page-heading .eyebrow{font-size:13px;line-height:1.5;letter-spacing:2px}
.page-heading p{font-size:15px;line-height:1.65}
.breadcrumbs{font-size:13px}
.header-label{font-size:11px;letter-spacing:1.6px}
.search{height:48px}
.search input{font-size:15px;line-height:1.4}
.search input::placeholder{font-size:15px}
@media(max-width:700px){.page-heading .eyebrow{font-size:11px}.page-heading p{font-size:14px}.breadcrumbs{font-size:11px}}
#editor:not(.voice-mode){width:680px;padding:34px 38px}
#editor:not(.voice-mode) h2{font-size:29px;margin:16px 0 28px}
#editor:not(.voice-mode) form>label,#editor:not(.voice-mode) .form-row>label{gap:11px;font-size:15px;font-weight:650}
#editor:not(.voice-mode) #title{min-height:54px;padding:14px 16px;font-size:19px;font-weight:650;line-height:1.4}
#editor:not(.voice-mode) #body{min-height:280px;padding:17px 18px;font-size:17px;line-height:1.7}
#editor:not(.voice-mode) #category{min-height:52px;padding:13px 44px 13px 16px;font-size:16px}
#editor:not(.voice-mode) .dialog-footer{margin-top:30px}
.body-field::after{display:none}
#body{overflow-y:auto;resize:none;scrollbar-width:none;cursor:grab}
#body::-webkit-scrollbar{display:none;width:0;height:0}
#body.drag-scrolling{cursor:grabbing;user-select:none}
.form-row select{appearance:none;-webkit-appearance:none;padding-right:42px;background:#fff right 14px center/14px 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%238d247f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
.brand,.auth-brand{gap:10px;letter-spacing:-.9px}
.brand{font-size:24px;margin-left:7px}
.brand-name{display:inline-flex;white-space:nowrap}
.brand-name>span{color:#ff91a4}
.brand-icon.brand-mark{position:relative;width:39px;height:42px;flex:0 0 auto;overflow:hidden;border-radius:12px 12px 12px 5px;background:linear-gradient(145deg,#ff7b8d 0%,#e51b76 58%,#b81688 100%);color:#fff;font:800 21px/1 'Manrope',sans-serif;letter-spacing:-1px;box-shadow:0 10px 24px #2e0f4755}
.brand-icon.brand-mark::after{content:"";position:absolute;top:0;right:0;width:11px;height:11px;border-radius:0 0 0 5px;background:#ffffff70;box-shadow:-1px 1px 0 #ffffff36}
.auth-brand{font-size:27px}
@media(max-width:700px){.brand{font-size:22px}.brand-icon.brand-mark{width:35px;height:37px;font-size:19px}}
@media(max-width:700px){#editor:not(.voice-mode){width:calc(100% - 24px);padding:26px 22px}#editor:not(.voice-mode) h2{font-size:25px}#editor:not(.voice-mode) #title{font-size:17px}#editor:not(.voice-mode) #body{min-height:230px;font-size:16px}}
@media(max-width:700px){#category-dialog{width:calc(100% - 24px);padding:27px 22px}#category-dialog h2{font-size:25px}#category-dialog #category-name{font-size:17px}}



#editor.voice-mode.voice-review #body::placeholder{color:transparent;opacity:0}

.analysis-status{display:none}
#editor.voice-mode.voice-review.analysis-pending .analysis-status{display:block;position:absolute;top:calc(100% + 18px);left:0;width:100%;color:#fff;font:550 18px/1.4 'DM Sans',sans-serif;letter-spacing:.1px;text-align:center}
.analysis-status-text{position:relative;display:inline-block}
.analysis-status-dots{position:absolute;left:100%;top:0;width:3ch;font-family:monospace;letter-spacing:0;text-align:left;clip-path:inset(0 100% 0 0);animation:analysis-status-dots 1.6s steps(1,end) infinite}

@media(prefers-reduced-motion:reduce){.analysis-status-dots{animation:none;clip-path:none}}

#editor.voice-mode.voice-text-entry .voice-panel,
#editor.voice-mode.voice-text-entry .dialog-top,
#editor.voice-mode.voice-text-entry h2{display:none}
#editor.voice-mode.voice-text-entry .body-field{margin-top:0}

#editor.voice-mode.voice-active.voice-silence-message #voice-status{display:block!important;z-index:2;width:320px;max-width:calc(100vw - 32px);text-align:center}

.card-top-actions .icon-button.delete{display:grid;place-items:center;width:28px;height:28px;padding:5px;flex:none;color:#b95070}
.card-top-actions .icon-button.delete svg{display:block;width:18px;height:18px;flex:none}
.card-top-actions .icon-button.delete:hover{background:#ffffff8c}

#editor.voice-mode.voice-active #voice-status{animation:none;transition:none;min-height:42px;white-space:normal}

.voice-status-text{position:relative;display:inline-block}
.voice-status-dots{position:absolute;left:100%;top:0;width:3ch;font-family:monospace;letter-spacing:0;text-align:left;clip-path:inset(0 100% 0 0);animation:analysis-status-dots 1.6s steps(1,end) infinite}
@media(prefers-reduced-motion:reduce){.voice-status-dots{animation:none;clip-path:none}}

#editor.voice-mode.voice-active #voice-status,
#editor.voice-mode.voice-active.voice-silence-message #voice-status{
  box-sizing:border-box;
  display:flex!important;
  align-items:center;
  justify-content:center;
  width:320px;
  max-width:calc(100vw - 32px);
  height:64px;
  min-height:64px;
  padding:10px 24px;
  text-align:center;
}

#editor.voice-mode.voice-active.voice-processing .voice-controls button::before{content:'';display:block;width:46px;height:46px;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205a3%203%200%200%200-5.8-1A4%204%200%200%200%204%2011a4%204%200%200%200%202%207%203%203%200%200%200%206%201V5Z%22%2F%3E%3Cpath%20d%3D%22M12%205a3%203%200%200%201%205.8-1A4%204%200%200%201%2020%2011a4%204%200%200%201-2%207%203%203%200%200%201-6%201M8%207a3%203%200%200%200-2%203M7%2014a3%203%200%200%201%203%202M16%207a3%203%200%200%201%202%203M17%2014a3%203%200%200%200-3%202%22%2F%3E%3C%2Fsvg%3E");font-size:0;letter-spacing:0;opacity:1;animation:none}

.voice-status-text,.analysis-status-text{
  position:relative;
  display:inline-block;
  box-sizing:content-box;
  padding-right:1.8em;
  text-align:center;
}
.voice-status-dots,.analysis-status-dots{
  left:auto;
  right:0;
  top:0;
  width:1.8em;
  text-align:left;
}

.voice-status-text,.voice-status-dots,.analysis-status-text{font-weight:inherit}
.analysis-status-dots{font-weight:400}

.voice-status-dots,.analysis-status-dots{display:none!important;animation:none!important}
.voice-status-text,.analysis-status-text{padding:0;text-align:center;animation:none}
#editor.voice-mode.voice-active #voice-status,.analysis-status{text-align:center;animation:none}

#editor.voice-mode.voice-review.analysis-pending .analysis-status{
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  left:50%;
  transform:translateX(-50%);
  width:320px;
  max-width:calc(100vw - 32px);
  height:64px;
  padding:10px 24px;
  margin:0;
  border:1px solid #eadfed;
  border-radius:999px;
  background:#fffffff2;
  box-shadow:0 9px 28px #35104420;
  color:#5b217f;
  font-size:15px;
  font-weight:650;
  line-height:1.4;
  text-align:center;
}
