/* =================================================================
   GoodLex - Refined Light Theme (Variant A)
   Overlay file - linked after main styles in index.html
   ================================================================= */

/* -- Root overrides ---------------------------------------------- */
:root {
  --bg:          #f2f4f0;
  --border:      #d6ddd6;
  --text:        #1a2e1a;
  --text-muted:  #5c7060;
  --gold:        #b8913a;
  --gold-light:  #d4aa5a;
}

/* -- Body --------------------------------------------------------- */
body {
  background: var(--bg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* -- Header ------------------------------------------------------- */
header {
  background: #12271a;
  height: 56px;
  padding: 0 2rem 0 1.75rem;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 2px 12px rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(201,168,76,0.18);
}
header .logo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
header .logo span { color: rgba(255,255,255,0.9); }
header .tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-left: 6px;
}
header .badge {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid rgba(201,168,76,0.4);
  color: rgba(201,168,76,0.75);
  padding: 3px 10px;
  border-radius: 20px;
}

/* -- App body ----------------------------------------------------- */
.app-body { height: calc(100vh - 56px); }

/* -- Sidebar ------------------------------------------------------ */
.sidebar {
  background: #14291e;
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 1.25rem 0 1.5rem;
}

/* Section tabs inside sidebar */
.section-tabs {
  margin: 0 0.85rem 1.25rem;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(0,0,0,0.15);
}
.section-tab {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.2rem;
  color: rgba(255,255,255,0.42);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, background 0.2s;
}
.section-tab.active {
  background: rgba(201,168,76,0.1);
  color: #c9a84c;
  border-bottom-color: #c9a84c;
  font-weight: 700;
}
.section-tab:hover:not(.active) {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.65);
}

/* Section title labels */
.sidebar-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
  padding: 0.25rem 1.1rem;
  margin: 0.75rem 0 0.35rem;
}

/* Nav items - remove icon square backgrounds */
.nav-item {
  padding: 0.62rem 1.1rem;
  border-left: 2px solid transparent;
  color: rgba(255,255,255,0.55);
  font-size: 0.84rem;
  gap: 10px;
  transition: background 0.13s, color 0.13s;
}
.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.85);
}
.nav-item.active {
  background: rgba(184,145,58,0.1);
  border-left-color: #c9a84c;
  color: #fff;
}

/* Icon: no square box - just the emoji floating */
.nav-item .icon {
  background: none !important;
  border-radius: 0;
  width: 22px;
  height: 22px;
  font-size: 1rem;
  opacity: 0.85;
  flex-shrink: 0;
}
.nav-item.active .icon {
  background: none !important;
  opacity: 1;
}

/* Nav label */
.nav-item .label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

/* -- Main area ---------------------------------------------------- */
.main { background: var(--bg); }

/* -- Tool panel --------------------------------------------------- */
.tool-panel {
  padding: 1.75rem 2.25rem;
  gap: 1.25rem;
}

/* Tool header */
.tool-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.1rem;
  gap: 0.85rem;
  align-items: flex-start;
}
.tool-icon-large {
  width: 44px;
  height: 44px;
  background: rgba(27,58,45,0.08);
  border: 1px solid rgba(27,58,45,0.14);
  border-radius: 10px;
  font-size: 1.2rem;
}

/* Cormorant Garamond italic for tool titles */
.tool-header h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.025em;
  color: #12271a;
  line-height: 1.15;
}
.tool-header p {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 400;
}

/* -- Form elements ------------------------------------------------ */
.form-group label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-group textarea,
.form-group select,
.form-group input {
  border: 1px solid #c8d0c8;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font-size: 0.88rem;
  padding: 0.6rem 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group textarea:focus,
.form-group select:focus,
.form-group input:focus {
  border-color: #1B3A2D;
  box-shadow: 0 0 0 3px rgba(27,58,45,0.08);
}

/* -- Buttons ------------------------------------------------------ */
.btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 0.6rem 1.4rem;
  transition: all 0.15s;
}
.btn-primary {
  background: #1B3A2D;
  color: #fff;
  border: none;
  box-shadow: 0 1px 3px rgba(27,58,45,0.25);
}
.btn-primary:hover:not(:disabled) {
  background: #0f2219;
  box-shadow: 0 3px 8px rgba(27,58,45,0.3);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid #c8d0c8;
}
.btn-secondary:hover:not(:disabled) {
  background: #f4f7f4;
  border-color: #a8b4a8;
}

/* -- Output box --------------------------------------------------- */
.output-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.75;
}

/* -- Protocol / Tables -------------------------------------------- */
.protocol-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.protocol-table th {
  background: #1B3A2D;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.protocol-table tr:hover td:not(:first-child):not(:last-child) {
  background: #f7faf7;
}

/* -- CRM refinements ---------------------------------------------- */
.crm-layout {
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.crm-sidebar {
  background: #f7faf7;
  border-right-color: var(--border);
  border-radius: 10px 0 0 10px;
}
.crm-detail { background: #fff; border-radius: 0 10px 10px 0; }
.crm-detail-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  font-style: italic;
  color: #12271a;
  letter-spacing: 0.02em;
}
.crm-tab {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.crm-tab.active {
  color: #1B3A2D;
  border-bottom-color: #1B3A2D;
}
.crm-search-wrap input:focus { border-color: #1B3A2D; }
.crm-client-item:hover { background: #f0f5f0; }
.crm-client-item.active {
  background: #edf4ed;
  border-left-color: #1B3A2D;
}
.crm-client-item-name { color: #12271a; }
.crm-fields-grid input:focus,
.crm-fields-grid select:focus,
.crm-fields-grid textarea:focus { border-color: #1B3A2D; }

/* -- Task items --------------------------------------------------- */
.task-item {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 7px;
}
.task-item:hover { box-shadow: 0 2px 8px rgba(27,58,45,0.08); }
.dash-task-item {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 7px;
}
.dash-task-item:hover { box-shadow: 0 2px 8px rgba(27,58,45,0.08); }
.dash-task-client { color: #1B3A2D; }

/* Task status badges - refined */
.status-nova     { background: #e6f4ee; color: #1B5E40; }
.status-v-roboti { background: #fef8e7; color: #7a5000; }
.status-vykonano { background: #e8f5e9; color: #1B5E20; }

/* -- Client cards ------------------------------------------------- */
.client-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.client-card:hover { box-shadow: 0 2px 10px rgba(27,58,45,0.09); }
.client-card-name { color: #12271a; }

/* -- Users panel -------------------------------------------------- */
.users-tab-btn.active { color: #1B3A2D; border-bottom-color: #1B3A2D; }
.users-tab-btn:hover:not(.active) { color: #1B3A2D; background: #f2f6f2; }
.users-table th { color: var(--text-muted); border-bottom-color: var(--border); }
.users-table td { border-bottom-color: #f0f4f0; }
.users-table tr:hover td { background: #f7faf7; }
#create-invite-btn { background: #1B3A2D; }
#create-invite-btn:hover { background: #2a5040; }

/* -- File upload zone --------------------------------------------- */
.file-zone {
  border-color: #c8d0c8;
  border-radius: 6px;
  background: #fff;
}
.file-zone:hover { border-color: #1B3A2D; background: #f7faf7; }
.file-zone.has-file {
  border-color: #c9a84c;
  background: rgba(184,145,58,0.05);
}

/* -- Toast -------------------------------------------------------- */
.toast { background: #12271a; border-left: 3px solid #c9a84c; }

/* -- Scrollbar ---------------------------------------------------- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: #c8d4c8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a8b8a8; }

/* -- Section dividers in forms ------------------------------------ */
.crm-section-divider {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  margin-top: 0.5rem;
}

/* -- Status bar --------------------------------------------------- */
.status-bar { color: var(--text-muted); }
.status-dot.done { background: #2e7d5a; }
.output-header label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
