/* =========================================================
   WORKINMAX - CSS
   Puedes ajustar las variables de color para que coincidan
   exactamente con tu manual de marca.
   ========================================================= */

:root {
    --primary: #5c7f9d;
    --primary-dark: #46657f;
    --accent: #d7b48a;
    --cream: #f7f3ed;
    --white: #ffffff;
    --ink: #24313d;
    --muted: #697783;
    --border: #dfe4e8;
    --success: #3d7a58;
    --danger: #b64d4d;
    --shadow: 0 12px 35px rgba(35, 50, 65, .08);
    --radius: 18px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Yrsa", Georgia, serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.5;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
    padding: 12px 5%;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 30px;
    font-weight: 700;
    text-decoration: none;
}

.brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand span span {
    color: var(--primary);
}

nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

nav a {
    font-weight: 600;
}

.hamb {
    display: none;
    border: 0;
    background: transparent;
    font-size: 28px;
}

.wrap {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 38px 0 70px;
    min-height: calc(100vh - 140px);
}

footer {
    padding: 26px 20px;
    text-align: center;
    color: var(--muted);
    background: var(--white);
    border-top: 1px solid var(--border);
}

h1,
h2,
h3 {
    line-height: 1.15;
}

h1 {
    font-size: clamp(34px, 5vw, 58px);
    margin: 0 0 18px;
}

h2 {
    font-size: 30px;
}

h3 {
    font-size: 23px;
}

p {
    font-size: 18px;
}

small {
    color: var(--muted);
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.soft {
    background: #fbfaf7;
    box-shadow: none;
}

.hero {
    display: grid;
    grid-template-columns: 1.35fr .65fr;
    align-items: center;
    gap: 50px;
    padding: 65px 0;
}

.hero h1 b {
    color: var(--primary);
}

.hero p {
    max-width: 650px;
    color: var(--muted);
    font-size: 21px;
}

.hero-card {
    padding: 35px;
    border-radius: 28px;
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow);
}

.hero-card p {
    color: rgba(255, 255, 255, .9);
}

.bigicon {
    font-size: 80px;
}

.tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(92, 127, 157, .12);
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 20px;
    border: 1px solid var(--primary);
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    text-decoration: none;
    transition: .2s ease;
}

.btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn.ghost {
    background: transparent;
    color: var(--primary-dark);
}

.btn.ghost:hover {
    background: rgba(92, 127, 157, .08);
    color: var(--primary-dark);
}

.btn.danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn.mini {
    min-height: 36px;
    padding: 7px 13px;
    font-size: 15px;
}

.btn.full {
    width: 100%;
}

.inline {
    display: inline;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth {
    width: min(100%, 720px);
    margin: 20px auto;
}

.form label,
.auth label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0 0 17px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: white;
    color: var(--ink);
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(92, 127, 157, .12);
}

textarea {
    resize: vertical;
}

.check {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 9px !important;
    font-weight: 500 !important;
}

.check input {
    width: auto;
    margin-top: 5px;
}

.roles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 18px 0;
}

.roles label {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 15px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    cursor: pointer;
}

.roles input {
    width: auto;
}

.welcome,
.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.welcome h1,
.page-title h1 {
    margin-bottom: 8px;
}

.search {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 26px;
}

.offer h3 {
    margin-bottom: 10px;
}

.line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
    color: var(--muted);
    font-size: 16px;
}

.pre {
    white-space: pre-line;
}

.facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 28px 0;
}

.facts div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 15px;
    border-radius: 12px;
    background: #f8fafb;
}

.facts span {
    color: var(--muted);
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 30px 0;
}

.profile {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 22px;
}

.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 90px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 38px;
    font-weight: 700;
}

.messages {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 20px;
}

.contact {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 13px;
    margin: 7px 0;
    border-radius: 11px;
    background: #f8fafb;
}

.chat {
    min-height: 520px;
}

.chat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 380px;
    max-height: 500px;
    overflow-y: auto;
    padding: 12px 0;
}

.bubble {
    align-self: flex-start;
    max-width: 75%;
    padding: 12px 15px;
    border-radius: 15px;
    background: #eef2f5;
}

.bubble.mine {
    align-self: flex-end;
    background: rgba(92, 127, 157, .16);
}

.bubble small {
    display: block;
    margin-top: 4px;
}

.chat-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.stack {
    display: grid;
    gap: 14px;
}

.note.unread {
    border-left: 5px solid var(--primary);
}

.badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--ink);
    font-size: 12px;
}

.alert {
    margin-bottom: 16px;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: white;
    font-weight: 600;
}

.alert.ok {
    border-color: rgba(61, 122, 88, .35);
    background: rgba(61, 122, 88, .08);
}

.alert.err {
    border-color: rgba(182, 77, 77, .35);
    background: rgba(182, 77, 77, .08);
}

@media (max-width: 900px) {
    .hero,
    .grid.three,
    .messages {
        grid-template-columns: 1fr;
    }

    .search {
        grid-template-columns: 1fr 1fr;
    }

    .facts {
        grid-template-columns: repeat(2, 1fr);
    }

    nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        background: white;
        border-bottom: 1px solid var(--border);
    }

    body.menu nav {
        display: flex;
    }

    .hamb {
        display: block;
    }
}

@media (max-width: 650px) {
    .top {
        padding-inline: 16px;
    }

    .brand {
        font-size: 25px;
    }

    .brand img {
        width: 40px;
        height: 40px;
    }

    .wrap {
        width: min(100% - 22px, var(--max));
        padding-top: 25px;
    }

    .grid.two,
    .roles,
    .search,
    .facts {
        grid-template-columns: 1fr;
    }

    .welcome,
    .page-title,
    .profile {
        align-items: flex-start;
        flex-direction: column;
    }

    .chat-form {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 35px 0;
    }

    .hero-card {
        padding: 25px;
    }
}
