/* static/css/app.css */

/* -----------------------------
   Design tokens
------------------------------ */
:root{
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #fbfcfe;
  --border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.65);

  /* accents (use sparingly) */
  --accent-a: rgba(34, 197, 94, 0.14);  /* greenish */
  --accent-b: rgba(59, 130, 246, 0.14); /* bluish */

  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 14px 40px rgba(15, 23, 42, 0.10);

  --radius: 18px;
  --radius-sm: 12px;

  --focus: 0 0 0 4px rgba(59, 130, 246, 0.22);
}

/* -----------------------------
   Base / Page background
------------------------------ */
html, body {
  height: 100%;
  overflow-x: hidden;
  font-size: 14px;
}


body {
  color: var(--text);
  background:
    radial-gradient(900px 420px at 10% -10%, var(--accent-b), transparent 57%),
    radial-gradient(800px 400px at 95% 0%, var(--accent-a), transparent 65%),
    linear-gradient(180deg, var(--bg), #ffffff 70%);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.title {
  letter-spacing: -0.02em;
}

/* A light, modern default for text rendering */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -----------------------------
   Unified layouts shell
------------------------------ */
.app-shell {
  min-height: 100vh;
}

.app-section {
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}

/* Sidebar wrapper: consistent height + clean border */
.app-sidebar {
  min-height: calc(100vh - 3.25rem); /* Bulma navbar height */
  border-right: 1px solid var(--border);
  background: var(--surface);
}

/* Content column background */
.app-content {
  background: transparent;
}

/* -----------------------------
   Cards / Boxes (unified)
------------------------------ */
.app-card {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.app-card--auth {
  padding: 1.5rem 1.5rem;
}

.app-card--auth .title {
  letter-spacing: -0.02em;
}

/* -----------------------------
   Navbar polish
------------------------------ */
.navbar.app-navbar {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(10px);
}

.navbar .navbar-item strong.app-brand {
  letter-spacing: -0.02em;
}

/* Brand accent: blue-to-green gradient text */
.app-brand-accent {
  background: linear-gradient(90deg, rgba(59,130,246,0.85), rgba(34,197,94,0.85));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -----------------------------
   Sidebar menu: modern hover
------------------------------ */
.menu.app-menu {
  padding: 1rem;
}

.menu.app-menu .menu-list a {
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  color: rgba(15, 23, 42, 0.82);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}

.menu.app-menu .menu-list a:hover {
  background: rgba(15, 23, 42, 0.04);
  transform: translateX(2px);
  color: var(--text);
}

.menu.app-menu .menu-list a.is-active {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
}

/* -----------------------------
   Buttons: black, modern focus
------------------------------ */
.button.is-black {
  border-radius: 14px;
  box-shadow: 0 10px 18px rgba(0,0,0,0.16);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.button.is-black:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(0,0,0,0.22);
  filter: brightness(1.02);
}

.button.is-black:focus,
.button.is-black:focus-visible {
  box-shadow: var(--focus), 0 16px 26px rgba(0,0,0,0.22);
}

/* Inputs focus styling (clean and modern) */
.input:focus,
.input:focus-visible {
  box-shadow: var(--focus) !important;
  border-color: rgba(59, 130, 246, 0.45) !important;
}

/* -----------------------------
   Hero typography refinement
------------------------------ */
.app-hero__title {
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.app-hero__subtitle {
  color: var(--muted);
}

/* -----------------------------
   Error pages (403/404/500) unified
------------------------------ */
.error-hero {
  background:
    radial-gradient(900px 420px at 12% 10%, var(--accent-b), transparent 65%),
    radial-gradient(800px 420px at 90% 0%, var(--accent-a), transparent 65%),
    linear-gradient(180deg, var(--surface-2), #ffffff 70%);
}

/* Footer border consistent */
.footer.app-footer {
  border-top: 1px solid var(--border);
}

/* Vertically center the pages box */
.hero.is-fullheight-with-navbar .hero-body {
    padding: 0;
}

/* Auth card professional spacing */
.app-card--auth {
    padding: 3rem 2.5rem !important;
}

/* Success accent tag */
.tag.is-success-light {
    background-color: var(--accent-a);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    font-weight: 600;
}

/* Link hover effect */
.hover-link:hover {
    color: var(--text) !important;
    text-decoration: underline;
}

/* -----------------------------
   Login page
------------------------------ */

/* Fullheight hero for standalone login (no navbar) */
.hero.is-fullheight .hero-body {
    align-items: center;
    display: flex;
}

/* Error notifications on login page */
.app-card--auth .notification.is-danger.is-light {
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
}

/* Checkbox alignment */
.app-card--auth .checkbox input[type="checkbox"] {
    margin-right: 0.35em;
    vertical-align: middle;
}

/* -----------------------------
   Team management pages
------------------------------ */

/* Table inside app-card: remove double borders */
.app-card .table {
    border-radius: 12px;
    overflow: hidden;
}

.app-card .table thead th {
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    padding: 1rem;
}

.app-card .table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

/* Status tags in tables: refined sizing */
.table .tag.is-success,
.table .tag.is-danger {
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
}

/* Feature checkbox list: consistent spacing */
.app-feature-checkbox {
    display: block;
    margin-bottom: 0.5rem;
}

.app-feature-checkbox input[type="checkbox"] {
    margin-right: 0.4em;
    vertical-align: middle;
}

/* Sidebar divider between feature items and admin items */
.app-sidebar-divider {
    margin: 0.5rem 1rem;
    border-top: 1px solid var(--border);
}
