@import url('https://unpkg.com/normalize.css') layer(normalize);

@layer normalize, base, dashboard;

@layer dashboard {
  .dashboard-container {
    width: clamp(220px, 30vmin, 500px);
    aspect-ratio: 3 / 4;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: light-dark(#fff, canvas);
    position: relative;
    z-index: 1;
  }
  
  .dashboard-container::before {
    content: "";
    position: absolute;
    inset: -1rem;
    border: 2px solid color-mix(in oklch, canvas, canvasText);
    border-radius: 6px;
    background: light-dark(#fff, canvas);
  }

  .login-form {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
  }

  .login-form h2 {
    padding-inline: 1rem;
    margin: 0;
    font-size: 2rem;
    font-weight: 300;
  }
  
  .input-wrapper {
    padding-inline: 1rem;
    width: 100%;
  }
  
  .input-wrapper input {
    text-align: center;
    display: block;
    width: 100%;
    padding: .75rem;
    border-radius: 6px;
    background: color-mix(in oklch, canvas, canvasText 8%);
    font-size: 1.25rem;
    border: 0;
    color: canvasText;
  }

  .input-wrapper input::placeholder {
    color: color-mix(in oklch, canvasText, transparent 50%);
  }

  .input-wrapper input:focus {
    outline: 2px solid color-mix(in oklch, canvasText, transparent 70%);
    outline-offset: 2px;
  }

  .login-btn {
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    background: #c0c0c0 !important;
    color: #000 !important;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .login-btn:hover {
    background: #a0a0a0 !important;
    transform: translateY(-2px);
  }

  /* Dashboard embedado após login */
  .dashboard-content {
    display: none;
    width: 100%;
    height: 100vh;
    background: light-dark(#fff, #000);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2;
    overflow-y: auto;
    padding: 2rem;
  }

  .dashboard-content.active {
    display: block;
  }

  .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid color-mix(in oklch, canvasText, transparent 80%);
  }

  .welcome-text {
    font-size: 1.5rem;
    font-weight: 300;
  }

  .logout-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    color: canvasText;
    border: 1px solid color-mix(in oklch, canvasText, transparent 70%);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .logout-btn:hover {
    background: color-mix(in oklch, canvasText, transparent 90%);
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
  }

  /* Dashboard cards removed */

  .dashboard-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
  }

  .stat-item {
    text-align: center;
  }

  .stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: color-mix(in oklch, canvasText, transparent 10%);
  }

  .stat-label {
    font-size: 0.9rem;
    opacity: 0.7;
  }
}

@layer base {
  :root {
    --font-size-min: 16;
    --font-size-max: 20;
    --font-ratio-min: 1.2;
    --font-ratio-max: 1.33;
    --font-width-min: 375;
    --font-width-max: 1500;
  }

  html {
    color-scheme: light dark;
  }

  [data-theme='light'] {
    color-scheme: light only;
  }

  [data-theme='dark'] {
    color-scheme: dark only;
  }

  *,
  *:after,
  *:before {
    box-sizing: border-box;
  }

  body {
    background: light-dark(#fff, #000);
    display: grid;
    place-items: center;
    min-height: 100vh;
    font-family: 'SF Pro Text', 'SF Pro Icons', 'AOS Icons', 'Helvetica Neue',
      Helvetica, Arial, sans-serif, system-ui;
    margin: 0;
  }

  /* Grid background */
  body::before {
    --size: 45px;
    --line: color-mix(in hsl, canvasText, transparent 70%);
    content: '';
    height: 100vh;
    width: 100vw;
    position: fixed;
    background: linear-gradient(
          90deg,
          var(--line) 1px,
          transparent 1px var(--size)
        )
        50% 50% / var(--size) var(--size),
      linear-gradient(var(--line) 1px, transparent 1px var(--size)) 50% 50% /
        var(--size) var(--size);
    mask: linear-gradient(-20deg, transparent 50%, white);
    top: 0;
    transform-style: flat;
    pointer-events: none;
    z-index: -1;
  }

  /* Header styles */
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1000;
    pointer-events: none;
  }

  .header-wrapper {
    position: relative;
    height: 100%;
  }

  .nav-but-wrap {
    position: absolute;
    top: 1rem;
    right: 1rem;
    pointer-events: all;
  }

  /* Logo removido - agora temos apenas o botão de tema universal */

  /* Theme toggle removido - usando sistema universal */

  /* Utilities */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
}
