/* ==========================================================================
   LEGALDOT INFORMA - Global Notion-like Styles
   ========================================================================== */

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

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  
  /* Notion-like Core Palette */
  --bg-color: #ffffff;
  --surface-color: #f7f7f5;
  --surface-hover: #efefed;
  --text-main: #37352f;
  --text-muted: #787774;
  --border-color: #e9e9e7;
  
  /* Accent Colors (Subtle maps) */
  --acc-red: #eb5757;
  --acc-red-bg: rgba(235, 87, 87, 0.1);
  --acc-amber: #d9730d;
  --acc-amber-bg: rgba(217, 115, 13, 0.1);
  --acc-green: #0f7b6c;
  --acc-green-bg: rgba(15, 123, 108, 0.1);
  --acc-blue: #2eaadc;
  --acc-blue-bg: rgba(46, 170, 220, 0.1);
  --acc-purple: #9a6dd7;
  --acc-purple-bg: rgba(154, 109, 215, 0.1);
  
  --layout-max-width: 900px;
  --radius: 4px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Layout --- */
.page-container {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 40px 20px;
}

.header {
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-badge {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* --- Typography --- */
h1, h2, h3 {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.2rem;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* --- Tools Grid (Hub View) --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 2rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-color);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.2s ease;
}

/* Card Accents on Hover */
.tool-card.cnae:hover::before { background: var(--acc-blue); }
.tool-card.plusvalia:hover::before { background: var(--acc-red); }
.tool-card.irpf:hover::before { background: var(--acc-amber); }
.tool-card.isd:hover::before { background: var(--acc-green); }
.tool-card.itp:hover::before { background: var(--acc-purple); }

.tool-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.tool-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.tool-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.4;
}

/* --- App View (Inside a tool) --- */
.app-header {
  margin-bottom: 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--text-main);
}

/* UI Elements */
input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface-color);
  color: var(--text-main);
  transition: border-color 0.2s ease, background 0.2s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: #aeb4b7;
  background: var(--bg-color);
}
