/* ── Task Reminder UV — sistema de diseño "planner de estudiante" ──
   Mismo lenguaje visual que la landing: papel crema, tinta cálida,
   azul del logo, Fraunces + Instrument Sans + Caveat, sombras sólidas. */

:root {
    --paper:      #faf6ee;
    --paper-2:    #f3edde;
    --card:       #fffdf7;
    --ink:        #221d16;
    --ink-soft:   #4d463c;
    --ink-faint:  #7a7264;
    --line:       rgba(34,29,22,0.14);
    --blue:       #0171f3;
    --blue-deep:  #014cc1;
    --blue-soft:  rgba(1,113,243,0.1);
    --marker:     #ffd84d;
    --red:        #d9482b;
    --red-soft:   rgba(217,72,43,0.08);
    --green-ok:   #1f8a4c;
    --green-soft: rgba(31,138,76,0.1);
    --note-yellow:#fff3a8;
    --shadow-ink:   4px 4px 0 var(--ink);
    --shadow-card:  5px 5px 0 rgba(34,29,22,0.12);
    --shadow-card-sm: 3px 3px 0 rgba(34,29,22,0.1);
}

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

html { background: var(--paper); }

body {
    font-family: 'Instrument Sans', -apple-system, sans-serif;
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* grano de papel */
body::after {
    content: '';
    position: fixed; inset: 0;
    z-index: 998;
    pointer-events: none;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.06'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, .display { font-family: 'Fraunces', Georgia, serif; }
.hand { font-family: 'Caveat', cursive; }

::selection { background: var(--marker); color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

a { color: var(--blue-deep); }

/* ── layout de página centrada (auth, confirmaciones) ── */
.page-center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    min-height: 100vh;
}

/* ── tarjetas ── */
.card {
    background: var(--card);
    border: 1.5px solid var(--ink);
    border-radius: 16px;
    padding: 30px 28px;
    box-shadow: var(--shadow-card);
}
.auth-card { width: 100%; max-width: 440px; }

/* ── marca ── */
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand h1 {
    font-size: 20px; font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.sub { color: var(--ink-soft); font-size: 14px; line-height: 1.5; margin-bottom: 22px; }

/* etiqueta manuscrita al margen */
.scribble {
    font-family: 'Caveat', cursive;
    font-size: 21px; font-weight: 600;
    color: var(--red);
    transform: rotate(-1.5deg);
    display: inline-block;
}

/* ── formularios ── */
label {
    display: block;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 6px;
}
input[type=text], input[type=password], input[type=email],
input[type=tel], input[type=number], input[type=time], textarea, select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--ink);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Instrument Sans', sans-serif;
    color: var(--ink);
    background: #fff;
    margin-bottom: 14px;
    transition: box-shadow .15s ease, border-color .15s ease;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--blue-deep);
    box-shadow: 3px 3px 0 var(--blue-soft);
}
input::placeholder, textarea::placeholder { color: #b3aa99; }

/* ── botones ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 14.5px; font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    background: var(--blue);
    color: #fff;
    padding: 12px 24px;
    border: 1.5px solid var(--ink);
    border-radius: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-ink);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { background: var(--blue-deep); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: var(--shadow-ink); }
.btn-block { width: 100%; }

.btn-danger { background: var(--red); }
.btn-danger:hover { background: #b73a21; }

.btn-soft {
    background: var(--paper-2);
    color: var(--ink);
}
.btn-soft:hover { background: #ebe3cf; }

.btn-ghost {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 13.5px; font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.btn-ghost:hover { color: var(--ink); background: rgba(34,29,22,0.05); }

/* ── mensajes ── */
.msg, .error-box {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.55;
    border: 1.5px solid var(--ink);
    box-shadow: var(--shadow-card-sm);
    margin-bottom: 16px;
}
.msg.success { background: #eaf6ec; color: #145c33; }
.msg.error, .error-box { background: #fbeae5; color: #93331d; }

/* nota adhesiva informativa */
.note-box {
    background: var(--note-yellow);
    border: 1.5px solid var(--ink);
    border-radius: 4px;
    padding: 14px 18px;
    font-size: 13px;
    color: var(--ink);
    line-height: 1.7;
    box-shadow: var(--shadow-card-sm);
    margin-bottom: 18px;
    transform: rotate(-0.5deg);
}

/* ── badges ── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700;
    padding: 3px 11px;
    border-radius: 999px;
    border: 1px solid var(--ink);
    background: var(--card);
    color: var(--ink-soft);
}
.badge.green  { background: var(--green-soft); color: var(--green-ok); border-color: var(--green-ok); }
.badge.yellow { background: var(--note-yellow); color: var(--ink); }
.badge.red    { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.badge.blue   { background: var(--blue-soft); color: var(--blue-deep); border-color: var(--blue-deep); }

/* ── navbar de app ── */
.tr-nav {
    position: sticky; top: 0; z-index: 200;
    height: 58px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 clamp(16px, 4vw, 36px);
    background: rgba(250,246,238,0.88);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1.5px solid var(--ink);
}
.tr-nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.tr-nav-brand img { width: 32px; height: 32px; object-fit: contain; }
.tr-nav-brand h1 {
    font-size: 16px; font-weight: 700;
    color: var(--ink); letter-spacing: -0.01em;
}

/* ── enlaces de pie de tarjeta ── */
.link-row { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink-soft); }
.link-row a { color: var(--blue-deep); font-weight: 600; text-decoration: none; }
.link-row a:hover { text-decoration: underline; }

.fine-print { font-size: 11px; color: var(--ink-faint); text-align: center; margin-top: 14px; line-height: 1.7; }
.fine-print a { color: var(--blue-deep); }
