* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f3f2f1;
  color: #242424;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* =========================
   COMMON
========================= */
.primary-action,
.tool-btn,
.small-btn,
.primary-login-btn {
  border: 1px solid #c8c6c4;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s ease;
}

.primary-action,
.small-btn.primary,
.primary-login-btn {
  background: #0f6cbd;
  color: white;
  border-color: #0f6cbd;
}

.primary-action:hover,
.small-btn.primary:hover,
.primary-login-btn:hover {
  background: #0b57a3;
  border-color: #0b57a3;
}

.tool-btn:hover,
.small-btn:hover {
  background: #f5f5f5;
}

.primary-action {
  padding: 9px 16px;
}

.small-primary {
  padding: 8px 14px;
}

.tool-btn,
.small-btn {
  padding: 8px 12px;
}

/* =========================
   LOGIN PAGE - NGCXAI
========================= */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 45%, #f3f8ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.login-shell {
  width: min(1120px, 96%);
  min-height: 640px;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border: 1px solid #e5e7eb;
}

.login-left {
  background: linear-gradient(135deg, #0f6cbd 0%, #1559d6 45%, #1d4ed8 100%);
  color: #fff;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  position: relative;
}

.login-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(255,255,255,0.1), transparent 30%);
  pointer-events: none;
}

.login-left > div {
  position: relative;
  z-index: 1;
}

.login-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.brand-square {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  font-size: 26px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.brand-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-copy h1 {
  font-size: 52px;
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -0.8px;
}

.hero-copy p {
  font-size: 18px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.92);
  max-width: 540px;
  margin: 0;
}

.login-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 34px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fafc 100%);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: 22px;
  padding: 34px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header h2 {
  margin: 14px 0 8px;
  font-size: 32px;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.auth-header p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.ms-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.ms-logo span:nth-child(1) {
  background: #f25022;
}
.ms-logo span:nth-child(2) {
  background: #7fba00;
}
.ms-logo span:nth-child(3) {
  background: #00a4ef;
}
.ms-logo span:nth-child(4) {
  background: #ffb900;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-top: 4px;
}

.auth-form input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: 0.2s ease;
}

.auth-form input:focus {
  border-color: #0f6cbd;
  box-shadow: 0 0 0 3px rgba(15, 108, 189, 0.12);
}

.primary-login-btn {
  margin-top: 14px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #0f6cbd;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.auth-message {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  color: #0f6cbd;
  min-height: 20px;
}

/* =========================
   DASHBOARD
========================= */
.outlook-body {
  height: 100vh;
  overflow: hidden;
}

.app-frame {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-ribbon {
  height: 58px;
  background: #f3f2f1;
  border-bottom: 1px solid #d1d1d1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.ribbon-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mini {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #0f6cbd;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.menu-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.menu-tab {
  background: transparent;
  border: none;
  padding: 8px 12px;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: #334155;
}

.menu-tab.active {
  border-bottom-color: #0f6cbd;
  font-weight: 600;
  color: #0f172a;
}

.ribbon-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-wrap {
  min-width: 320px;
}

.global-search {
  width: 100%;
  height: 38px;
  border: 1px solid #c8c6c4;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  background: white;
  outline: none;
}

.global-search:focus {
  border-color: #0f6cbd;
  box-shadow: 0 0 0 3px rgba(15, 108, 189, 0.08);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.toolbar {
  min-height: 52px;
  background: #ffffff;
  border-bottom: 1px solid #e1dfdd;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  flex-wrap: wrap;
}

.main-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 52px 250px 330px 1fr;
  min-height: 0;
}

.icon-rail {
  background: #f3f2f1;
  border-right: 1px solid #e1dfdd;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
  gap: 12px;
}

.rail-icon {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
}

.rail-icon.active,
.rail-icon:hover {
  background: #e5f1fb;
}

.folders-pane {
  background: #f7f7f7;
  border-right: 1px solid #e1dfdd;
  padding: 14px 10px;
  overflow: auto;
}

.pane-section {
  margin-bottom: 22px;
}

.pane-title {
  font-size: 14px;
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
}

.folder-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  background: transparent;
  padding: 10px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
}

.folder-item.active,
.folder-item:hover {
  background: #edebe9;
}

.count-badge {
  color: #0f6cbd;
  font-weight: 600;
}

.mailbox-name {
  font-size: 14px;
  color: #444;
  word-break: break-word;
}

.list-pane {
  background: #ffffff;
  border-right: 1px solid #e1dfdd;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.list-header {
  padding: 10px 14px;
  border-bottom: 1px solid #e1dfdd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-tabs {
  display: flex;
  gap: 16px;
}

.list-tab {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: #605e5c;
}

.list-tab.active {
  color: #0f6cbd;
  font-weight: 600;
}

.list-sort {
  font-size: 13px;
  color: #605e5c;
}

.mail-list-title {
  padding: 10px 14px 0 14px;
  font-weight: 600;
  font-size: 15px;
}

.mail-list {
  flex: 1;
  overflow: auto;
  padding: 8px 0;
}

.mail-item {
  border-bottom: 1px solid #edebe9;
  padding: 12px 14px;
  cursor: pointer;
  background: #fff;
  transition: 0.15s ease;
}

.mail-item:hover {
  background: #f5f9fd;
}

.mail-item.active {
  background: #deecf9;
  border-left: 3px solid #0f6cbd;
}

.mail-item h4 {
  margin: 0 0 6px 0;
  font-size: 15px;
  font-weight: 600;
}

.mail-meta {
  font-size: 13px;
  color: #605e5c;
  margin-top: 4px;
  line-height: 1.35;
}

.reading-pane {
  background: #fff;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.reading-empty {
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: #605e5c;
  padding: 24px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.reading-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.reading-header {
  border-bottom: 1px solid #edebe9;
  padding: 18px 18px 14px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.reading-subject {
  margin: 0 0 10px 0;
  font-size: 22px;
  font-weight: 600;
}

.reading-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: #605e5c;
}

.reading-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.reading-attachments {
  padding: 12px 18px 0;
}

.reading-attachments a,
.attachment-links a {
  display: inline-block;
  margin-right: 10px;
  margin-bottom: 8px;
  color: #0f6cbd;
  font-size: 14px;
}

.reading-body {
  flex: 1;
  overflow: auto;
  padding: 18px;
  background: #fff;
}

.thread-body {
  font-size: 15px;
  line-height: 1.6;
  color: #242424;
}

.thread-body pre {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
}

.reply-panel {
  border-top: 1px solid #edebe9;
  padding: 16px 18px;
  background: #faf9f8;
}

.reply-panel h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.reply-panel input,
.reply-panel textarea,
.compose-form input,
.compose-form textarea {
  width: 100%;
  border: 1px solid #c8c6c4;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 10px;
  background: #fff;
  outline: none;
}

.reply-panel input:focus,
.reply-panel textarea:focus,
.compose-form input:focus,
.compose-form textarea:focus {
  border-color: #0f6cbd;
  box-shadow: 0 0 0 3px rgba(15, 108, 189, 0.08);
}

.reply-actions,
.compose-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.message-line {
  font-size: 13px;
  margin-top: 10px;
  color: #0f6cbd;
  min-height: 18px;
}

.compose-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  display: grid;
  place-items: center;
  z-index: 999;
}

.compose-window {
  width: min(900px, 92vw);
  height: min(720px, 90vh);
  background: white;
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.compose-header {
  height: 54px;
  background: #f3f2f1;
  border-bottom: 1px solid #e1dfdd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.compose-header h2 {
  margin: 0;
  font-size: 17px;
}

.close-btn {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.compose-form {
  flex: 1;
  padding: 16px;
  overflow: auto;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px) {
  .main-shell {
    display: block;
  }

  .icon-rail,
  .folders-pane {
    display: none;
  }

  .list-pane {
    border-right: none;
    border-bottom: 1px solid #e1dfdd;
    min-height: 280px;
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-left {
    padding: 34px 28px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .login-right {
    padding: 24px;
  }
}

@media (max-width: 700px) {
  .search-wrap {
    min-width: 100%;
  }

  .toolbar {
    height: auto;
    padding: 10px 14px;
  }

  .reading-header {
    flex-direction: column;
  }

  .top-ribbon {
    height: auto;
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .ribbon-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .user-chip {
    width: 100%;
    justify-content: space-between;
  }

  .auth-card {
    padding: 26px 20px;
  }
}
.hidden {
  display: none !important;
}

.text-link-btn {
  margin-top: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: #0f6cbd;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.text-link-btn:hover {
  text-decoration: underline;
}

.secondary-login-btn {
  padding: 12px 14px;
  border: 1px solid #0f6cbd;
  border-radius: 12px;
  background: #ffffff;
  color: #0f6cbd;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-login-btn:hover {
  background: #f4f9fe;
}

.inline-action-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.workspace-mode {
  width: 100%;
}

.workspace-shell {
  padding: 28px;
  min-height: 100%;
  background: #f8f9fb;
}

.workspace-top {
  margin-bottom: 22px;
}

.workspace-title {
  margin: 0 0 8px;
  font-size: 36px;
  font-weight: 700;
  color: #1f2937;
}

.workspace-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
}

.workspace-content {
  min-height: 300px;
}

.workspace-empty-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 28px;
  max-width: 520px;
}

.workspace-empty-card h3 {
  margin: 0 0 12px;
  font-size: 26px;
}

.workspace-empty-card p {
  margin: 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.6;
}

/* calendar */
.calendar-board {
  display: grid;
  gap: 18px;
}

.calendar-group {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
}

.calendar-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f3f6fb;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
}

.calendar-group-body {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.calendar-row {
  width: 100%;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
  text-align: left;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  cursor: pointer;
}

.calendar-row:hover {
  background: #f8fbff;
}

.calendar-row-time {
  color: #0f6cbd;
  font-size: 13px;
  font-weight: 700;
}

.calendar-row-subject {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.calendar-row-meta,
.calendar-row-preview {
  font-size: 13px;
  color: #6b7280;
}

/* people */
.people-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
}

.people-list {
  display: grid;
  gap: 12px;
}

.people-card {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  text-align: left;
  cursor: pointer;
}

.people-card:hover {
  background: #f8fbff;
}

.people-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #deecf9;
  color: #0f6cbd;
  font-weight: 700;
  font-size: 22px;
}

.people-email {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  word-break: break-word;
}

.people-mini-meta {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

.people-detail-panel {
  min-width: 0;
}

.people-detail-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 22px;
}

.people-detail-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  word-break: break-word;
}

.people-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #6b7280;
  font-size: 13px;
}

.people-message-list {
  margin-top: 22px;
}

.people-message-list h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.people-message-item {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  margin-bottom: 10px;
  text-align: left;
  cursor: pointer;
}

.people-message-item:hover {
  background: #f8fbff;
}

.people-message-subject {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.people-message-meta {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

/* cloud */
.cloud-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.cloud-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
}

.cloud-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  word-break: break-word;
}

.cloud-card-meta {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 6px;
  line-height: 1.5;
}

.cloud-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* settings/help/menu */
.settings-board,
.help-board,
.menu-board {
  display: grid;
  gap: 16px;
}

.settings-box,
.help-box,
.menu-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 20px;
}

.settings-box h3,
.help-box h3,
.menu-box h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.settings-row label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.settings-row select {
  width: 100%;
  max-width: 320px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.settings-actions {
  margin-top: 8px;
}

.help-box p,
.menu-box p {
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
}

.menu-box {
  text-align: left;
  cursor: pointer;
}

.menu-box:hover {
  background: #f8fbff;
}

@media (max-width: 1100px) {
  .people-layout {
    grid-template-columns: 1fr;
  }

  .calendar-row {
    grid-template-columns: 1fr;
  }
}
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.login-logo img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}