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

:root {
  --bg: #f4f7f3;
  --panel: #ffffff;
  --text: #132018;
  --accent: #0a7f5a;
  --muted: #6a766e;
  --line: #d9e1dc;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: radial-gradient(circle at top left, #e6f8ef, var(--bg) 45%);
  color: var(--text);
}

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  overflow-x: clip;
}

.sidebar {
  background: #102419;
  color: #d9f4e6;
  padding: 24px 16px;
}

.brand {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.sidebar nav a {
  display: block;
  color: #d9f4e6;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
}

.sidebar nav a:hover { background: rgba(255, 255, 255, 0.12); }

.content {
  min-width: 0;
  width: 100%;
  padding: 20px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 18px;
}

.topbar-company {
  min-width: 0;
}

.topbar-company strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.user-menu {
  position: relative;
}

.user-menu__trigger {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
  color: #1d3529;
}

.user-menu__trigger::-webkit-details-marker {
  display: none;
}

.user-menu__popup {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  min-width: 210px;
  box-shadow: 0 14px 30px rgba(14, 34, 23, 0.14);
  z-index: 20;
}

.user-menu__popup .button_to {
  margin: 0;
}

.user-menu__popup .btn {
  width: 100%;
  text-align: center;
}

.btn {
  border: none;
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}

.btn.subtle {
  background: #eff4f1;
  color: #234337;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.grid.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 108px;
  padding: 18px 20px;
}

.metric span {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.metric strong {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.15;
  font-weight: 800;
  color: #0f1f16;
}

.kanban {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
}

.kanban-column {
  flex: 0 0 260px;
  min-width: 260px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.kanban-dropzone {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deal-card {
  background: #f5faf7;
  border: 1px solid #d3e6dc;
  border-radius: 10px;
  padding: 10px;
}

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
}

table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }

.flash { padding: 10px; border-radius: 8px; }
.flash.notice { background: #ddf6ea; }
.flash.alert { background: #fde3e3; }

.session-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(420px, 92vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 2; }
  .content { padding: 16px; }
  .grid.metrics { grid-template-columns: 1fr; }
  .user-menu { width: 100%; }
  .user-menu__popup { left: 0; right: auto; min-width: 100%; }
}

body.modal-open { overflow: hidden; }

.docs-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  z-index: 999;
  padding: 18px;
}

.docs-modal[hidden] {
  display: none;
}

.docs-modal__dialog {
  width: min(1100px, 100%);
  height: min(88vh, 900px);
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.docs-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.docs-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f9fbfa;
}
