:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  background: #fbf7f1;
  color: #20242d;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #fbf7f1;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(255, 145, 30, .13), transparent 34rem),
    #fbf7f1;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 430px);
  padding: 34px;
  border: 1px solid rgba(188, 104, 25, .12);
  border-radius: 28px;
  background: rgba(255, 253, 249, .88);
  box-shadow: 0 24px 70px rgba(117, 65, 20, .12);
  backdrop-filter: blur(22px);
}

.brand-logo {
  display: block;
  width: 190px;
  max-width: 70%;
  height: auto;
  margin: 0 auto 12px;
}

h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: .08em;
}

.tagline {
  margin: 0 0 28px;
  color: #6f747c;
  text-align: center;
  font-weight: 400;
}

.tagline-strong {
  font-weight: 900;
}

.auth-card-title {
  margin: 0 0 10px;
  color: #20242d;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -.03em;
  text-align: center;
}

.auth-card-description {
  margin: 0 0 24px;
  color: #6f747c;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

label {
  display: block;
  margin: 16px 0 7px;
  font-size: 14px;
  color: #5c626b;
}

input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(174,99,25,.18);
  border-radius: 14px;
  background: #fffdfa;
  color: #20242d;
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: #ff8618;
  box-shadow: 0 0 0 3px rgba(255,134,24,.14);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: transparent;
  color: #77716b;
  box-shadow: none;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(242,140,40,.10);
  color: #d96f10;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button {
  width: 100%;
  margin-top: 22px;
  padding: 15px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff9c18, #ff4d16);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  opacity: .6;
  cursor: wait;
}

.forgot-password-link,
.auth-secondary-action {
  width: auto;
  margin: 12px 0 0;
  padding: 2px 0;
  border-radius: 6px;
  background: transparent;
  color: #b85d14;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(184, 93, 20, .35);
  text-underline-offset: 3px;
}

.forgot-password-link:hover,
.forgot-password-link:focus-visible,
.auth-secondary-action:hover,
.auth-secondary-action:focus-visible {
  color: #d96f10;
  background: rgba(242,140,40,.08);
  text-decoration-color: currentColor;
}

.auth-secondary-action {
  display: block;
  margin-top: 12px;
}

.password-hint {
  margin: 8px 0 -4px;
  color: #77716b;
  font-size: 13px;
}

.secondary {
  background: rgba(255,255,255,.08);
  color: #20242d;
}

.message {
  margin: 14px 0 0;
  color: #d94b32;
  font-size: 14px;
}

.message:empty {
  display: none;
}

.message.is-success {
  color: #33824a;
}

.hidden {
  display: none !important;
}

.app-view {
  width: min(100%, 700px);
}

@media (max-width: 520px) {
  .shell { padding: 16px; }
  .login-card { padding: 26px 22px; border-radius: 22px; }
}

body {
  font-weight: 400;
  letter-spacing: -0.005em;
}

.app-view {
  width: min(100%, 760px);
  align-self: start;
  padding: 22px 0 42px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.app-logo {
  display: block;
  width: 118px;
  height: auto;
}

.logout-button {
  width: auto;
  margin: 0;
  padding: 9px 15px;
  border: 1px solid #f1dfcf;
  background: rgba(255,255,255,.72);
  color: #5f6470;
  font-size: 14px;
  font-weight: 600;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.change-password-button {
  width: auto;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #f1dfcf;
  border-radius: 12px;
  background: rgba(255,255,255,.45);
  color: #6b6864;
  font-size: 14px;
  font-weight: 700;
}

.change-password-button:hover,
.change-password-button:focus-visible {
  border-color: rgba(242,140,40,.35);
  color: #d96f10;
}

.change-password-dialog {
  width: min(calc(100% - 32px), 430px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(188, 104, 25, .16);
  border-radius: 22px;
  background: #fffdfa;
  color: #20242d;
  box-shadow: 0 24px 70px rgba(85, 48, 20, .22);
}

.change-password-dialog::backdrop {
  background: rgba(48, 34, 22, .28);
  backdrop-filter: blur(3px);
}

.change-password-dialog form {
  padding: 28px;
}

.change-password-dialog-header {
  margin-bottom: 22px;
}

.change-password-dialog h2 {
  margin: 0 0 7px;
  color: #20242d;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: -.03em;
}

.change-password-dialog-header p {
  margin: 0;
  color: #6f747c;
  font-size: 14px;
  line-height: 1.45;
}

.change-password-dialog label:first-of-type {
  margin-top: 0;
}

.change-password-message {
  min-height: 20px;
}

.change-password-message.is-success {
  color: #33824a;
}

.change-password-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.change-password-dialog-actions button {
  width: auto;
  margin: 0;
  padding: 12px 15px;
  font-size: 14px;
}

.change-password-dialog-actions .change-password-cancel {
  border: 1px solid #f1dfcf;
  background: rgba(255,255,255,.72);
  color: #5f6470;
}

@media (max-width: 390px) {
  .user-actions { gap: 6px; }
  .change-password-button,
  .logout-button { padding: 8px 10px; font-size: 13px; }
  .change-password-dialog form { padding: 24px 20px; }
  .change-password-dialog-actions { gap: 8px; }
  .change-password-dialog-actions button { padding: 12px 11px; }
}

.welcome-block {
  margin-bottom: 26px;
}

.welcome-kicker {
  margin: 0 0 4px;
  color: #f28c28;
  font-size: 16px;
  font-weight: 800;
}

.welcome-block h2 {
  margin: 0;
  max-width: 600px;
  color: #171717;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.teo-panel {
  padding: 30px;
  border: 1px solid #f1dfcf;
  border-radius: 30px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 16px 40px rgba(160,82,18,.10);
  text-align: center;
}

.teo-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5f6470;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
}

.teo-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f28c28;
  box-shadow: 0 0 0 5px rgba(242,140,40,.12);
}

.teo-panel h3 {
  margin: 18px 0 7px;
  color: #171717;
  font-size: clamp(27px, 5vw, 36px);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.teo-panel > p {
  margin: 0;
  color: #5f6470;
  font-size: 16px;
}

.voice-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  margin: 28px auto 26px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff9c18, #ff4d16);
  box-shadow: 0 14px 32px rgba(225,92,18,.25);
}

.voice-button svg {
  width: 35px;
  height: 35px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ask-form {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 590px;
  margin: 0 auto;
}

.ask-form input {
  flex: 1;
  min-width: 0;
  height: 52px;
}

.ask-form button {
  width: auto;
  height: 52px;
  margin: 0;
  padding: 0 22px;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .app-view { padding: 8px 0 28px; }
  .app-header { margin-bottom: 26px; }
  .app-logo { width: 104px; }
  .welcome-block { margin-bottom: 20px; }
  .teo-panel { padding: 26px 18px 22px; border-radius: 24px; }
  .voice-button { width: 82px; height: 82px; }
  .ask-form { gap: 8px; }
  .ask-form button { padding: 0 16px; }
}

@media (max-width: 620px) {
  .app-logo { width: 92px; }
  .welcome-block { margin-top: 4px; }
  .ask-form button { border-radius: 14px; }
}

.logout-button {
  border: 0;
  background: linear-gradient(135deg, #ff9c18, #ff4d16);
  color: #ffffff;
  font-weight: 800;
}

@media (max-width: 620px) {
  .app-view { padding-top: 30px; }
}

@media (max-width: 620px) {
  .welcome-block { margin-bottom: 34px; }
}

@media (max-width: 620px) {
  .welcome-block { margin-bottom: 54px; }
}

.welcome-block h2 {
  text-align: center;
}

.teo-avatar-wrap {
  width: 112px;
  height: 112px;
  margin: 0 auto 12px;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff9c18, #ff5a18);
  box-shadow: 0 12px 28px rgba(225,92,18,.18);
}

.teo-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #fffaf4;
}

@media (max-width: 620px) {
  .teo-avatar-wrap {
    width: 104px;
    height: 104px;
  }
}

.teo-avatar-wrap {
  width: 144px;
  height: 144px;
}

@media (max-width: 620px) {
  .teo-avatar-wrap {
    width: 132px;
    height: 132px;
  }
}

.teo-title {
  font-size: 15px;
  font-weight: 900;
}

.teo-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 24px;
  margin: -10px auto 22px;
  color: #5f6470;
  font-size: 14px;
  font-weight: 700;
}

.teo-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b7b0a8;
}

.teo-status[data-state="listening"] {
  color: #f28c28;
}

.teo-status[data-state="listening"] .teo-status-dot,
.teo-status[data-state="speaking"] .teo-status-dot {
  background: #f28c28;
  box-shadow: 0 0 0 5px rgba(242,140,40,.12);
}

.teo-status[data-state="thinking"] .teo-status-dot {
  background: #d96f10;
}

.teo-status[data-state="speaking"] {
  color: #d96f10;
}

.teo-status[data-state="error"] {
  color: #c74b3c;
}

.teo-notifications {
  margin: -8px auto 18px;
  text-align: center;
}

.teo-notifications-button {
  width: auto;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 13px;
}

.teo-notifications-status {
  min-height: 18px;
  margin: 7px 0 0;
  color: #77716b;
  font-size: 12px;
}

.agenda-link {
  display: block;
  width: fit-content;
  margin: 18px auto 0;
  padding: 10px 14px;
  color: #76706a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.agenda-link:hover,
.agenda-link:focus-visible {
  color: #d96f10;
}

.agenda-view {
  width: min(100%, 640px);
  margin: 0 auto;
}

.agenda-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.agenda-header .app-logo {
  width: 98px;
}

.return-teo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #f1dfcf;
  border-radius: 13px;
  background: rgba(255,255,255,.72);
  color: #5f6470;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.return-teo svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agenda-intro {
  margin-bottom: 18px;
}

.agenda-kicker {
  margin: 0 0 3px;
  color: #f28c28;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}

.agenda-intro h1 {
  margin: 0;
  color: #171717;
  font-size: clamp(36px, 8vw, 46px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.agenda-card {
  padding: 24px;
  border: 1px solid #f1dfcf;
  border-radius: 28px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 16px 40px rgba(160,82,18,.10);
}

.agenda-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(188,104,25,.12);
}

.agenda-date-row h2 {
  min-width: 0;
  margin: 0;
  color: #20242d;
  font-size: clamp(18px, 3.7vw, 23px);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.agenda-navigation {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
  padding: 3px;
  border: 1px solid #f1dfcf;
  border-radius: 14px;
  background: #fffaf4;
}

.date-button {
  width: auto;
  min-width: 38px;
  height: 38px;
  margin: 0;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5f6470;
  font-size: 14px;
  font-weight: 800;
}

.date-button-today {
  background: #fffdfa;
  color: #d96f10;
  box-shadow: 0 2px 8px rgba(160,82,18,.08);
}

.date-button:hover,
.date-button:focus-visible,
.return-teo:hover,
.return-teo:focus-visible {
  border-color: rgba(242,140,40,.35);
  color: #d96f10;
}

.date-button-icon {
  display: grid;
  place-items: center;
  padding: 0;
}

.date-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agenda-content {
  min-height: 116px;
}

.agenda-loading {
  display: flex;
  align-items: center;
  min-height: 116px;
  margin: 0;
  color: #77716b;
  font-size: 15px;
  font-weight: 600;
}

.agenda-list {
  position: relative;
}

.agenda-list::before {
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 91px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(to bottom, rgba(242,140,40,.28), rgba(242,140,40,.08));
  content: "";
}

.agenda-appointment {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px;
  padding: 25px 0;
}

.agenda-appointment + .agenda-appointment {
  border-top: 1px solid rgba(188,104,25,.08);
}

.appointment-time {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 1px;
  color: #171717;
}

.appointment-time::after {
  position: absolute;
  top: 7px;
  right: -15px;
  width: 10px;
  height: 10px;
  border: 3px solid #fffdfa;
  border-radius: 50%;
  background: #f28c28;
  box-shadow: 0 0 0 3px rgba(242,140,40,.13);
  content: "";
}

.appointment-start {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.035em;
}

.appointment-end {
  margin-top: 4px;
  color: #918a83;
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
}

.appointment-details {
  min-width: 0;
  padding-left: 2px;
}

.appointment-person {
  margin: 0 0 8px;
  color: #171717;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.025em;
}

.company-tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(242,140,40,.12);
  border-radius: 999px;
  background: #fff4e8;
  color: #9b5a1e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .055em;
}

.appointment-title,
.appointment-description,
.appointment-context {
  margin: 0 0 6px;
  color: #62666e;
  font-size: 14px;
  line-height: 1.48;
}

.appointment-title {
  color: #34383f;
  font-weight: 750;
}

.appointment-description {
  color: #5f6470;
}

.appointment-context {
  margin-top: 8px;
  color: #8a6a4c;
  font-size: 13px;
  font-weight: 650;
}

.meeting-link {
  display: inline-block;
  margin-top: 4px;
  color: #d96f10;
  font-size: 14px;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.agenda-empty,
.agenda-error {
  padding: 30px 0 8px;
}

.agenda-empty-title,
.agenda-error-copy {
  margin: 0 0 5px;
  color: #30333a;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.agenda-empty-copy,
.agenda-error-detail {
  margin: 0;
  color: #77716b;
  font-size: 14px;
  line-height: 1.5;
}

.agenda-retry {
  width: auto;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
}

@media (max-width: 620px) {
  .agenda-header { margin-bottom: 34px; }
  .agenda-card { padding: 20px 16px; border-radius: 24px; }
  .agenda-date-row { gap: 10px; }
  .agenda-date-row h2 { max-width: 162px; }
  .date-button { min-width: 40px; height: 40px; padding: 0 10px; }
  .agenda-list::before { left: 66px; }
  .agenda-appointment { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .appointment-time::after { right: -7px; }
}

.return-teo {
  background: linear-gradient(135deg, #ff9c18, #ff4d16) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

.return-teo svg {
  stroke: #ffffff !important;
}

.agenda-subtitle {
  margin: 8px 0 0;
  color: #6f747c;
  font-size: 15px;
  line-height: 1.45;
}
