@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #18282e;
  --muted: #6d7d82;
  --paper: #f6f4ee;
  --panel: #fffefb;
  --line: #e5e2d9;
  --navy: #17343a;
  --navy-2: #21464b;
  --gold: #e6ad3d;
  --gold-soft: #fff3d4;
  --teal: #2b8b7b;
  --teal-soft: #e6f5f1;
  --red: #c94f50;
  --red-soft: #fdecec;
  --blue: #4d73c8;
  --purple: #7654c8;
  --shadow: 0 18px 50px rgba(28, 47, 51, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 0%, rgba(230, 173, 61, 0.08), transparent 28rem),
    var(--paper);
  font-family: "Tajawal", system-ui, sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 30;
  display: flex;
  width: 272px;
  padding: 28px 20px 22px;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(circle at 30% 15%, rgba(230, 173, 61, 0.18), transparent 13rem),
    linear-gradient(160deg, #153237, #0f272c 75%);
  box-shadow: -8px 0 30px rgba(18, 40, 44, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: var(--navy);
  background: linear-gradient(145deg, #f4c466, var(--gold));
  box-shadow: 0 10px 22px rgba(230, 173, 61, 0.22);
  font-size: 25px;
  font-weight: 800;
}

.brand-mark.large { width: 60px; height: 60px; border-radius: 18px; font-size: 30px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; }
.brand small { margin-top: 2px; color: rgba(255, 255, 255, 0.6); font-size: 12px; }

.main-nav { display: grid; gap: 7px; margin-top: 42px; }

.main-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  transition: 0.2s ease;
}

.main-nav a:hover, .main-nav a.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(-2px);
}

.main-nav a.active .nav-icon { color: var(--gold); background: rgba(230, 173, 61, 0.13); }

.nav-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  font-weight: 800;
}

.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.09); }
.user-card, .portal-user { display: flex; align-items: center; gap: 10px; }
.user-card span:last-child, .portal-user span:nth-child(2) { min-width: 0; }
.user-card strong, .user-card small, .portal-user strong, .portal-user small { display: block; }
.user-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card small { color: rgba(255, 255, 255, 0.55); }

.avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: #f1c369;
  font-weight: 800;
}

.avatar-photo {
  overflow: hidden;
  border: 2px solid rgba(230, 173, 61, 0.76);
  background: #fff;
}

.avatar-photo img {
  width: 155%;
  height: 155%;
  max-width: none;
  object-fit: cover;
}

.link-button {
  padding: 8px 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
}

.sidebar-footer .link-button { margin-top: 10px; color: rgba(255, 255, 255, 0.55); }
.sidebar-footer .link-button:hover { color: #fff; }

.main-content { min-height: 100vh; margin-right: 272px; }

.topbar {
  display: flex;
  min-height: 108px;
  padding: 24px 36px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(24, 40, 46, 0.07);
  background: rgba(246, 244, 238, 0.86);
  backdrop-filter: blur(14px);
}

.topbar h1 { margin: 3px 0 0; font-size: 28px; line-height: 1.2; }
.eyebrow { color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.today { padding: 9px 13px; border-radius: 10px; color: var(--muted); background: rgba(255, 255, 255, 0.7); font-size: 13px; }
.menu-button { display: none; border: 0; background: transparent; font-size: 24px; cursor: pointer; }

.page-content { max-width: 1540px; padding: 30px 36px 50px; margin: 0 auto; }

.button {
  display: inline-flex;
  min-height: 42px;
  padding: 9px 17px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s ease;
}

.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--navy-2), var(--navy)); box-shadow: 0 10px 20px rgba(23, 52, 58, 0.14); }
.button-secondary { color: var(--ink); border-color: var(--line); background: rgba(255, 255, 255, 0.75); }
.button-block { width: 100%; }

.alert { padding: 13px 16px; margin-bottom: 18px; border-radius: 13px; font-weight: 600; }
.alert-success { color: #176858; background: var(--teal-soft); border: 1px solid #bfe5dc; }
.alert-error { color: #9b3739; background: var(--red-soft); border: 1px solid #f2c6c7; }

.month-toolbar {
  display: flex;
  min-height: 86px;
  padding: 14px 18px;
  margin-bottom: 22px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.month-toolbar.slim { max-width: 1050px; margin-inline: auto; }
.month-toolbar > div { min-width: 180px; text-align: center; }
.month-toolbar span, .month-toolbar strong { display: block; }
.month-toolbar span { color: var(--muted); font-size: 12px; }
.month-toolbar strong { font-size: 20px; }
.month-arrow { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 19px; font-weight: 800; }
.month-picker { display: flex; margin-inline-start: auto; align-items: end; gap: 8px; }

input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #dcd9d0;
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  transition: border 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(43, 139, 123, 0.1); }
textarea { resize: vertical; }
label { display: grid; gap: 7px; color: #48595e; font-size: 13px; font-weight: 700; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  min-height: 128px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(30, 54, 58, 0.05);
}

.stat-card > span, .stat-card > strong, .stat-card > small { display: block; }
.stat-card > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-card > strong { margin-top: 6px; font-size: 30px; line-height: 1.2; }
.stat-card > small { margin-top: 8px; color: #899499; }
.stat-card.accent { color: #fff; border-color: transparent; background: linear-gradient(145deg, var(--navy-2), var(--navy)); }
.stat-card.accent > span { color: rgba(255, 255, 255, 0.72); }
.stat-card.danger strong { color: var(--red); }

.progress { height: 7px; overflow: hidden; margin-top: 12px; border-radius: 10px; background: #e9e7df; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), #f2c568); }
.stat-card.accent .progress { background: rgba(255, 255, 255, 0.14); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.7fr); gap: 20px; align-items: start; }
.project-work-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.62fr); }

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-header { display: flex; margin-bottom: 18px; align-items: flex-start; justify-content: space-between; gap: 14px; }
.panel-header h2 { margin: 0 0 4px; font-size: 20px; }
.panel-header p { margin: 0; color: var(--muted); font-size: 13px; }
.filter-panel { margin-bottom: 20px; }
.filters { display: flex; align-items: end; gap: 12px; }
.filters .grow { flex: 1; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.project-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.project-card {
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  transition: 0.2s ease;
}

.project-card:hover { transform: translateY(-3px); border-color: rgba(43, 139, 123, 0.35); box-shadow: 0 14px 26px rgba(30, 54, 58, 0.08); }
.project-card.outside-month { opacity: 0.72; }
.project-card-top { display: flex; align-items: center; justify-content: space-between; }
.project-initial { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 12px; color: var(--navy); background: var(--gold-soft); font-weight: 800; }
.project-initial.has-logo { overflow: hidden; border: 1px solid var(--line); background: #fff; }
.project-initial img { width: 100%; height: 100%; object-fit: contain; }
.project-card h3 { min-height: 48px; margin: 13px 0 3px; font-size: 16px; line-height: 1.45; }
.project-card p { min-height: 40px; margin: 0; color: var(--muted); font-size: 13px; }
.project-card small { color: #909a9e; }
.project-meta { display: flex; margin-top: 9px; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.project-meta strong { margin-inline-start: auto; color: var(--ink); }
.month-badge, .status, .task-status, .priority-label {
  display: inline-flex;
  padding: 5px 9px;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.month-badge { color: #557177; background: #edf2f1; }
.status-active, .status-in_progress { color: #176858; background: var(--teal-soft); }
.status-completed, .status-done { color: #33715f; background: #dff4e9; }
.status-planned, .status-todo { color: #526877; background: #ebf0f3; }
.status-review { color: #775d18; background: var(--gold-soft); }
.status-paused, .status-blocked { color: #9b3739; background: var(--red-soft); }
.urgent-text { color: var(--red); font-weight: 800; }

.focus-list { display: grid; gap: 9px; }
.focus-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; padding: 13px 0; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.focus-item:last-child { border: 0; }
.focus-item strong, .focus-item small { display: block; }
.focus-item small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.priority-dot { display: inline-block; width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; }
.priority-low { background: #79a49b; }
.priority-medium { background: var(--blue); }
.priority-high { background: #e49b2c; }
.priority-urgent { background: var(--red); }

.empty-state { padding: 30px 20px; border: 1px dashed #d9d5ca; border-radius: 16px; color: var(--muted); text-align: center; background: #fbfaf6; }
.empty-state.large { padding-block: 55px; }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 17px; }
.empty-state p { margin: 0 0 18px; }

.project-hero {
  display: flex;
  padding: 24px 28px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 15% 20%, rgba(230, 173, 61, 0.2), transparent 15rem),
    linear-gradient(135deg, var(--navy-2), var(--navy));
  box-shadow: var(--shadow);
}

.project-hero h2 { margin: 5px 0 8px; font-size: 26px; }
.project-hero .eyebrow { color: #f0c56d; }
.back-link { display: inline-flex; margin-bottom: 9px; color: inherit; opacity: 0.66; font-size: 12px; font-weight: 700; }
.project-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: rgba(255, 255, 255, 0.66); font-size: 12px; }
.project-hero-meta a { color: #f2ca79; font-weight: 700; }

.progress-ring {
  --progress: 0;
  display: grid;
  width: 110px;
  height: 110px;
  flex: 0 0 auto;
  place-content: center;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--navy) 76%, transparent 78% 99%),
    conic-gradient(var(--gold) calc(var(--progress) * 1%), rgba(255, 255, 255, 0.12) 0);
  text-align: center;
}

.progress-ring strong, .progress-ring span { display: block; }
.progress-ring strong { font-size: 22px; }
.progress-ring span { color: rgba(255, 255, 255, 0.62); font-size: 10px; }

.legend { display: flex; gap: 10px; color: var(--muted); font-size: 11px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.task-list { display: grid; gap: 10px; }

.task-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px 5px minmax(0, 1fr) auto;
  min-height: 94px;
  overflow: hidden;
  padding: 15px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.task-item.is-done { opacity: 0.68; background: #f8faf8; }
.task-item.is-done h3 { text-decoration: line-through; }
.task-check { display: grid; width: 31px; height: 31px; place-items: center; border: 2px solid #b8c2c0; border-radius: 10px; color: #fff; background: transparent; cursor: pointer; font-weight: 900; }
.is-done .task-check { border-color: var(--teal); background: var(--teal); }
.priority-bar { width: 5px; align-self: stretch; border-radius: 8px; }
.task-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.task-copy h3 { margin: 0; font-size: 15px; }
.task-copy p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.task-meta { display: flex; margin-top: 8px; gap: 14px; color: #8b969a; font-size: 11px; }
.priority-label.priority-low { color: #55776f; background: #edf5f3; }
.priority-label.priority-medium { color: #3e5c9d; background: #eaf0ff; }
.priority-label.priority-high { color: #8f641e; background: #fff2da; }
.priority-label.priority-urgent { color: #9b3739; background: var(--red-soft); }
.task-actions { display: flex; gap: 5px; }
.task-actions form { display: inline; }
.icon-button { padding: 6px 8px; border: 0; border-radius: 8px; color: var(--teal); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.danger-link { color: var(--red); }
.plan-panel form { display: grid; gap: 14px; }

.form-panel { max-width: 1050px; margin-inline: auto; }
.narrow-panel { max-width: 850px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; }
.range-field { display: flex; min-height: 44px; align-items: center; gap: 12px; }
.range-field input { padding: 0; border: 0; box-shadow: none; }
.range-field output { min-width: 44px; color: var(--teal); font-weight: 800; }

/* Portal */
.portal-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 0 0, rgba(47, 140, 124, 0.14), transparent 26rem),
    radial-gradient(circle at 100% 10%, rgba(230, 173, 61, 0.12), transparent 25rem),
    var(--paper);
}

.portal-header {
  display: flex;
  max-width: 1320px;
  padding: 25px 34px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-horizontal { color: var(--ink); }
.brand-horizontal small { color: var(--muted); }
.portal-user { gap: 12px; }
.portal-user strong, .portal-user small { display: block; }
.portal-user small { color: var(--muted); font-size: 11px; }
.portal-user form { margin-inline-start: 10px; }
.portal-user .link-button { color: var(--muted); }
.portal-main { max-width: 1250px; padding: 28px 34px 60px; margin: 0 auto; }

.portal-hero {
  display: flex;
  min-height: 260px;
  padding: 42px 48px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(230, 173, 61, 0.24), transparent 17rem),
    linear-gradient(135deg, #21464b, #112c32);
  box-shadow: 0 28px 70px rgba(18, 42, 47, 0.16);
}

.portal-hero .eyebrow { color: #efc36a; }
.portal-hero h1 { max-width: 720px; margin: 8px 0 12px; font-size: clamp(35px, 5vw, 58px); line-height: 1.16; }
.portal-hero p { max-width: 650px; margin: 0; color: rgba(255, 255, 255, 0.65); font-size: 16px; }
.portal-date { display: grid; width: 150px; height: 150px; flex: 0 0 auto; place-content: center; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 50%; background: rgba(255, 255, 255, 0.07); text-align: center; }
.portal-date span, .portal-date strong, .portal-date small { display: block; }
.portal-date span { color: #f0c56d; font-size: 12px; font-weight: 700; }
.portal-date strong { font-size: 46px; line-height: 1; }
.portal-date small { margin-top: 6px; color: rgba(255, 255, 255, 0.65); }

.services-section { margin-top: 38px; }
.section-heading { display: flex; margin-bottom: 17px; align-items: end; justify-content: space-between; }
.section-heading h2 { margin: 4px 0 0; font-size: 26px; }
.service-count { padding: 7px 11px; border-radius: 10px; color: var(--teal); background: var(--teal-soft); font-size: 12px; font-weight: 800; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }

.service-card {
  position: relative;
  min-height: 250px;
  padding: 23px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: 0.22s ease;
}

a.service-card:hover { transform: translateY(-5px); box-shadow: 0 22px 45px rgba(29, 54, 58, 0.11); }
.finance-card { background: linear-gradient(155deg, #fffefb 60%, #fff5d8); }
.work-card { background: linear-gradient(155deg, #fffefb 60%, #e4f4f1); }
.private-card { background: linear-gradient(155deg, #fffefb 55%, #ece8fb); }
.service-icon { display: grid; width: 51px; height: 51px; place-items: center; border-radius: 16px; color: #fff; background: var(--navy); font-size: 15px; font-weight: 800; }
.work-card .service-icon { background: var(--teal); font-size: 25px; }
.private-card .service-icon { background: #5d4c93; font-size: 12px; }
.service-status { position: absolute; top: 23px; left: 23px; padding: 5px 9px; border-radius: 20px; font-size: 10px; font-weight: 800; }
.service-status.ready { color: #176858; background: var(--teal-soft); }
.service-status.soon { color: #7b6b48; background: #f2eee4; }
.service-card h3 { margin: 23px 0 7px; font-size: 20px; }
.service-card p { margin: 0; color: var(--muted); font-size: 13px; }
.service-link { position: absolute; right: 23px; bottom: 22px; color: var(--teal); font-size: 12px; font-weight: 800; }
.muted-card { opacity: 0.68; }

.platform-note { display: flex; padding: 20px 23px; margin-top: 20px; align-items: center; gap: 15px; border: 1px solid #d8e8e4; border-radius: 18px; background: rgba(230, 245, 241, 0.72); }
.note-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #fff; background: var(--teal); font-size: 20px; font-weight: 800; }
.platform-note strong, .platform-note p { display: block; margin: 0; }
.platform-note p { color: var(--muted); font-size: 13px; }

/* Private space */
.private-shortcut {
  padding: 8px 12px;
  border: 1px solid #ddd7f1;
  border-radius: 11px;
  color: #4f407f;
  background: #f5f2ff;
  font-size: 12px;
  font-weight: 800;
}

.private-hero {
  display: flex;
  min-height: 285px;
  padding: 42px 48px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 15%, rgba(204, 181, 255, 0.22), transparent 18rem),
    linear-gradient(135deg, #493c73, #1c2938);
  box-shadow: 0 28px 70px rgba(41, 34, 67, 0.18);
}

.private-hero .eyebrow { display: block; margin-top: 18px; color: #d7c5ff; }
.private-hero h1 { margin: 7px 0 12px; font-size: clamp(34px, 5vw, 55px); line-height: 1.18; }
.private-hero p { max-width: 680px; margin: 0; color: rgba(255, 255, 255, 0.68); }
.back-link { display: inline-flex; margin-bottom: 10px; color: var(--teal); font-size: 13px; font-weight: 800; }
.back-link.light { color: rgba(255, 255, 255, 0.72); }

.security-seal {
  display: grid;
  width: 155px;
  height: 155px;
  flex: 0 0 auto;
  place-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}
.security-seal span, .security-seal strong, .security-seal small { display: block; }
.security-seal span { color: #d7c5ff; font-size: 11px; font-weight: 800; }
.security-seal strong { font-size: 37px; line-height: 1.1; }
.security-seal small { color: rgba(255, 255, 255, 0.58); }

.private-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.private-module {
  position: relative;
  display: flex;
  min-height: 220px;
  padding: 24px;
  align-items: flex-start;
  gap: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: 0.22s ease;
}
.private-module:hover { transform: translateY(-4px); box-shadow: 0 22px 45px rgba(43, 40, 64, 0.12); }
.private-module .module-icon { display: grid; width: 50px; height: 50px; flex: 0 0 auto; place-items: center; border-radius: 16px; color: #fff; font-weight: 900; }
.notes-module .module-icon { background: #167565; }
.plans-module .module-icon { background: #b27a20; }
.vault-module .module-icon { background: #594785; }
.module-count { color: var(--muted); font-size: 11px; font-weight: 800; }
.private-module h2 { margin: 8px 0; font-size: 21px; }
.private-module p { margin: 0; color: var(--muted); font-size: 13px; }
.module-arrow { position: absolute; right: 24px; bottom: 20px; color: var(--teal); font-size: 24px; font-weight: 900; }

.security-note { display: flex; padding: 18px 22px; margin-top: 18px; align-items: center; gap: 14px; border: 1px solid #e4def5; border-radius: 18px; background: #f8f6ff; }
.security-note-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: #fff; background: #594785; font-weight: 900; }
.security-note strong, .security-note p { display: block; margin: 0; }
.security-note p { color: var(--muted); font-size: 12px; }

.private-page-head { display: flex; padding: 20px 2px 24px; align-items: flex-end; justify-content: space-between; gap: 24px; }
.private-page-head.compact { max-width: 880px; margin-inline: auto; }
.private-page-head h1 { margin: 5px 0; font-size: 36px; }
.private-page-head p { max-width: 700px; margin: 0; color: var(--muted); }
.private-empty { padding: 70px 25px; border: 1px dashed #cdc4e7; border-radius: 24px; background: #fbfaff; text-align: center; }
.private-empty.compact { padding: 42px 20px; }
.private-empty > span { display: grid; width: 58px; height: 58px; margin: 0 auto 14px; place-items: center; border-radius: 18px; color: #fff; background: #594785; font-size: 22px; font-weight: 900; }
.private-empty h2 { margin: 0 0 7px; }
.private-empty p { margin: 0 0 18px; color: var(--muted); }

.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.note-card { display: flex; min-height: 285px; padding: 23px; flex-direction: column; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.note-card.important { border-color: #e3c57e; background: linear-gradient(150deg, #fff 65%, #fff8e4); }
.note-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.note-card-top small { color: var(--muted); font-size: 10px; }
.note-kind { padding: 5px 9px; border-radius: 20px; color: #584681; background: #eee9fa; font-size: 10px; font-weight: 800; }
.note-card.important .note-kind { color: #805910; background: #fff0c8; }
.note-card h2 { margin: 20px 0 9px; font-size: 20px; }
.note-card > p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 13px; -webkit-box-orient: vertical; -webkit-line-clamp: 7; }
.note-actions { display: flex; margin-top: auto; padding-top: 18px; align-items: center; gap: 14px; }
.link-danger { padding: 0; border: 0; color: #ad4343; background: transparent; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.button-small { min-height: 34px; padding: 7px 12px; font-size: 11px; }

.private-form-card { max-width: 880px; padding: 26px; margin: 0 auto; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.private-form-card form { display: grid; gap: 16px; }
.private-form-card textarea { resize: vertical; }
.form-actions { display: flex; align-items: center; gap: 11px; }

.vault-layout { display: grid; grid-template-columns: minmax(300px, 0.85fr) minmax(420px, 1.15fr); gap: 20px; align-items: start; }
.vault-form { max-width: none; margin: 0; }
.vault-list { display: grid; gap: 12px; }
.vault-item { display: flex; padding: 17px; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.vault-item-icon { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 14px; color: #fff; background: #594785; font-weight: 900; }
.vault-item-body { min-width: 0; flex: 1; }
.vault-item-body > span { color: var(--muted); font-size: 10px; font-weight: 800; }
.vault-item-body h3 { margin: 2px 0 3px; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.vault-item-body code { color: #897e9e; font-family: monospace; letter-spacing: 2px; }
.vault-actions { display: flex; align-items: center; gap: 11px; }
.vault-actions form { margin: 0; }

.revealed-secret { padding: 24px; margin-bottom: 20px; border: 1px solid #cfc3ef; border-radius: 23px; background: linear-gradient(145deg, #fbfaff, #f0ebff); box-shadow: var(--shadow); }
.revealed-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.revealed-head h2 { margin: 4px 0 16px; }
.secret-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin: 0; }
.secret-details > div { padding: 13px; border: 1px solid rgba(89, 71, 133, 0.13); border-radius: 13px; background: rgba(255, 255, 255, 0.74); }
.secret-details .wide { grid-column: 1 / -1; }
.secret-details dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.secret-details dd { margin: 0; overflow-wrap: anywhere; }
.secret-value { color: #3f306b; font-family: monospace; font-size: 17px; font-weight: 800; }

/* Login */
.auth-shell { min-height: 100vh; background: var(--navy); }
.auth-main { display: grid; min-height: 100vh; padding: 28px; place-items: center; }
.auth-card { display: grid; width: min(1020px, 100%); min-height: 620px; overflow: hidden; grid-template-columns: 1.05fr 0.95fr; border-radius: 30px; background: var(--panel); box-shadow: 0 35px 90px rgba(0, 0, 0, 0.25); }
.auth-showcase { display: flex; padding: 55px; flex-direction: column; justify-content: center; color: #fff; background: radial-gradient(circle at 20% 20%, rgba(230, 173, 61, 0.22), transparent 15rem), linear-gradient(145deg, #21464b, #112b31); }
.auth-showcase .eyebrow { margin-top: 32px; color: #efc36a; }
.auth-showcase h1 { margin: 8px 0 14px; font-size: 42px; line-height: 1.22; }
.auth-showcase > p { color: rgba(255, 255, 255, 0.64); }
.auth-points { display: grid; gap: 11px; margin-top: 46px; color: rgba(255, 255, 255, 0.72); font-size: 13px; }
.auth-form { display: flex; padding: 55px; flex-direction: column; justify-content: center; }
.auth-form h2 { margin: 3px 0; font-size: 30px; }
.auth-form > div > p:last-child { margin: 0 0 24px; color: var(--muted); }
.auth-form form { display: grid; gap: 15px; }

.sidebar-backdrop { display: none; }

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(110%); transition: transform 0.25s ease; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .main-content { margin-right: 0; }
  .menu-button { display: block; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(8, 27, 31, 0.45); }
  .sidebar-open .sidebar-backdrop { display: block; }
  .content-grid, .project-work-grid { grid-template-columns: 1fr; }
  .project-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-hero { padding: 35px; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-showcase { min-height: 360px; }
  .private-grid, .notes-grid { grid-template-columns: 1fr; }
  .vault-layout { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar { min-height: 92px; padding: 18px; }
  .topbar h1 { font-size: 22px; }
  .topbar .eyebrow, .today { display: none; }
  .topbar-actions .button { padding-inline: 12px; font-size: 12px; }
  .page-content { padding: 18px 14px 40px; }
  .month-toolbar { flex-wrap: wrap; }
  .month-toolbar > div { min-width: 150px; flex: 1; }
  .month-picker { width: 100%; margin: 0; }
  .month-picker input { flex: 1; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-height: 110px; padding: 16px; }
  .stat-card > strong { font-size: 25px; }
  .project-grid, .project-grid.compact { grid-template-columns: 1fr; }
  .filters { align-items: stretch; flex-direction: column; }
  .filters label, .filters .button { width: 100%; }
  .panel { padding: 16px; border-radius: 18px; }
  .panel-header { align-items: stretch; flex-direction: column; }
  .project-hero { align-items: flex-start; padding: 22px; flex-direction: column; }
  .progress-ring { width: 88px; height: 88px; align-self: flex-end; }
  .task-item { grid-template-columns: 34px 4px minmax(0, 1fr); }
  .task-actions { grid-column: 3; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .portal-header { padding: 18px; }
  .portal-header .brand small, .portal-user span:nth-child(2), .portal-user form { display: none; }
  .private-shortcut { padding: 7px 9px; font-size: 10px; }
  .portal-main { padding: 16px 14px 40px; }
  .portal-hero { min-height: 330px; padding: 28px; align-items: flex-start; flex-direction: column; }
  .portal-hero h1 { font-size: 35px; }
  .portal-date { width: 105px; height: 105px; align-self: flex-end; }
  .portal-date strong { font-size: 32px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 225px; }
  .private-hero { min-height: 390px; padding: 28px; align-items: flex-start; flex-direction: column; }
  .private-hero h1, .private-page-head h1 { font-size: 32px; }
  .security-seal { width: 108px; height: 108px; align-self: flex-end; }
  .security-seal strong { font-size: 28px; }
  .private-page-head { align-items: stretch; flex-direction: column; }
  .private-page-head .button { width: 100%; }
  .private-module { min-height: 205px; }
  .private-form-card { padding: 18px; }
  .form-actions, .vault-item { align-items: stretch; flex-direction: column; }
  .vault-actions { width: 100%; justify-content: space-between; }
  .secret-details { grid-template-columns: 1fr; }
  .secret-details .wide { grid-column: auto; }
  .platform-note { align-items: flex-start; }
  .auth-main { padding: 12px; }
  .auth-card { min-height: auto; border-radius: 22px; }
  .auth-showcase, .auth-form { padding: 32px 25px; }
  .auth-showcase { min-height: 330px; }
  .auth-showcase h1 { font-size: 32px; }
  .auth-points { margin-top: 25px; }
}
