:root {
    --primary: #426b48;
    --primary-hover: #315637;
    --dark-green: #243e30;
    --background: #f5f7f9;
    --surface: #ffffff;
    --text: #18251d;
    --muted: #6b776f;
    --border: #e0e6e1;
    --danger: #b33b3b;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: Verdana, Arial, sans-serif;
    color: var(--text);
    background: var(--background);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

button, input, textarea {
    font: inherit;
}

button, a, input, textarea {
    -webkit-tap-highlight-color: transparent;
}

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

button {
    cursor: pointer;
}

h1, h2, h3, p {
    margin: 0;
}

h1 {
    font-size: clamp(25px, 4vw, 34px);
    letter-spacing: -1.4px;
    line-height: 1.25;
}

h2 {
    font-size: 19px;
    letter-spacing: -.5px;
}

h3 {
    font-size: 16px;
}

svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.container {
    width: min(1240px, calc(100% - 64px));
    margin-inline: auto;
}

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

.eyebrow {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.topbar {
    background: white;
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--dark-green);
    color: white;
    display: grid;
    place-items: center;
}

.brand-icon svg {
    width: 25px;
    height: 25px;
}

.brand-name {
    display: block;
    font-size: 27px;
    letter-spacing: -1.8px;
    line-height: 1.1;
}

.brand-caption {
    font-size: 8px;
    letter-spacing: 1.3px;
    color: var(--muted);
}

.account {
    display: flex;
    align-items: center;
    gap: 15px;
}

.account-name {
    font-size: 12px;
    font-weight: 700;
}

.btn {
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 11px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 12px;
    min-height: 42px;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}

.btn-primary {
    color: white;
    background: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: white;
    border-color: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: #f0f4f0;
}

.btn-block {
    width: 100%;
    min-height: 48px;
}

.plus {
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
}

.main-content {
    padding-top: 36px;
    padding-bottom: 64px;
    flex: 1;
}

.page-heading {
    margin-bottom: 26px;
}

.page-heading h1 {
    margin: 8px 0;
}

.overview {
    position: relative;
    overflow: hidden;
    background: var(--dark-green);
    color: white;
    border-radius: 17px;
    padding: 30px 34px;
    min-height: 165px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.overview-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
    color: #bdd0bf;
}

.overview-number {
    font-weight: 700;
    font-size: 48px;
    letter-spacing: -2px;
    line-height: 1.35;
}

.overview-number span {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -.8px;
}

.overview p {
    font-size: 12px;
    color: #d3dfd5;
}

.overview-decoration {
    display: grid;
    grid-template-columns: repeat(2, 70px);
    gap: 12px;
    transform: rotate(-12deg);
    margin-right: 15px;
}

.overview-decoration span {
    height: 70px;
    border-radius: 15px;
    border: 1px solid #ffffff25;
    background: #ffffff0c;
}

.toolbar {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 440px;
}

.search-wrapper svg {
    position: absolute;
    left: 14px;
    top: 13px;
    color: var(--muted);
}

.search-wrapper input {
    padding-left: 43px;
}

input:not([type=hidden]):not([type=file]),
textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: white;
    color: var(--text);
    outline: none;
    font-size: 13px;
    transition: border-color .15s;
}

.search-wrapper input[type=search] {
    padding-left: 43px;
}

input:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px #426b4815;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.section-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-meta span {
    font-size: 12px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.project-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    transition: transform .18s, box-shadow .18s;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 26px #183b2010;
}

.project-cover {
    display: grid;
    place-items: center;
    height: 170px;
    background: #e8f0e9;
    overflow: hidden;
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-placeholder {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    border-radius: 23px;
    background: #d2e2d4;
    color: #426b48;
    font-size: 38px;
    font-weight: 700;
}

.project-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.project-heading h3 {
    overflow-wrap: anywhere;
    padding-top: 4px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.icon-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
}

.icon-button svg {
    width: 16px;
    height: 16px;
}

.icon-button:hover {
    background: #edf3ee;
    color: var(--primary);
}

.icon-button.danger:hover {
    color: var(--danger);
    background: #fceeee;
}

.project-description {
    color: var(--muted);
    font-size: 12px;
    margin: 12px 0 22px;
    min-height: 40px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.project-link {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

.project-link svg {
    width: 16px;
    height: 16px;
}

.empty-state {
    text-align: center;
    padding: 55px 20px;
    background: white;
    border: 1px dashed #cddacf;
    border-radius: var(--radius);
}

.empty-state p {
    color: var(--muted);
    margin: 12px 0 24px;
}

.empty-icon {
    width: 60px;
    height: 60px;
    background: #e6efe7;
    color: var(--primary);
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 32px;
    margin: 0 auto 18px;
}

.footer {
    border-top: 1px solid var(--border);
    background: white;
}

.footer-inner {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: var(--muted);
    font-size: 11px;
}

.back-link {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 25px;
}

.form-card {
    max-width: 680px;
    padding: 34px;
    margin-inline: auto;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.form-heading {
    margin-bottom: 25px;
}

.form-heading h1 {
    margin: 7px 0;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 12px;
    font-weight: 700;
}

.field small {
    font-size: 11px;
}

.form-actions {
    border-top: 1px solid var(--border);
    padding-top: 22px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.upload-area {
    position: relative;
    display: block;
    border: 1px dashed #b8cabb;
    border-radius: 12px;
    background: #f7faf7;
    cursor: pointer;
    overflow: hidden;
}

.upload-instructions {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--primary);
    text-align: center;
    padding: 15px;
}

.upload-instructions small {
    color: var(--muted);
    font-weight: 400;
}

.upload-icon {
    font-size: 30px;
    font-weight: 400;
}

.image-preview {
    width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
}

.file-input {
    max-width: 100%;
    color: var(--muted);
    font-size: 11px;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fff0f0;
    border: 1px solid #f1d5d5;
    color: #9a3030;
}

.login-body {
    background: white;
}

.login-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.login-decoration {
    background: var(--dark-green);
    color: white;
    display: grid;
    place-items: center;
    padding: 50px;
}

.decoration-content {
    max-width: 510px;
}

.workspace-label {
    color: #bcd2bf;
    font-size: 11px;
    letter-spacing: 2px;
}

.decoration-content h1 {
    font-size: clamp(30px, 4vw, 49px);
    margin: 20px 0;
    line-height: 1.2;
}

.decoration-content p {
    color: #c2d1c5;
    font-size: 14px;
}

.decor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 13px;
    margin-top: 45px;
}

.decor-tile {
    background: #ffffff09;
    border: 1px solid #ffffff20;
    border-radius: 10px;
    padding: 12px;
}

.decor-tile div {
    height: 55px;
    background: #ffffff14;
    border-radius: 5px;
    margin-bottom: 14px;
}

.decor-tile span {
    display: block;
    height: 5px;
    width: 80%;
    border-radius: 5px;
    background: #ffffff24;
    margin-top: 8px;
}

.decor-tile span:last-child {
    width: 55%;
}

.login-section {
    padding: 40px;
    display: grid;
    place-items: center;
}

.login-card {
    width: min(100%, 390px);
}

.login-brand {
    color: var(--dark-green);
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -3px;
    margin-bottom: 35px;
}

.login-card h2 {
    font-size: 29px;
    margin: 8px 0;
}

.login-card > .muted {
    margin-bottom: 30px;
    font-size: 13px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input[type=password],
.password-wrapper input[type=text] {
    padding-right: 85px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 12px;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}

.login-note {
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    margin-top: 24px;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

@media (min-width: 1450px) {
    .projects-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login-decoration {
        padding: 30px;
    }
}

@media (max-width: 650px) {
    .container {
        width: calc(100% - 32px);
    }

    .topbar-inner {
        min-height: 72px;
        gap: 10px;
    }

    .account-name {
        display: none;
    }

    .brand-caption {
        font-size: 7px;
    }

    .account .btn {
        padding: 9px 10px;
        font-size: 10px;
    }

    .overview {
        padding: 24px;
    }

    .overview-decoration {
        display: none;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper {
        max-width: none;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .project-cover {
        height: 190px;
    }

    .form-card {
        padding: 22px;
    }

    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-decoration {
        display: none;
    }

    .login-section {
        min-height: 100vh;
        padding: 25px;
    }

    .main-content {
        padding-top: 26px;
    }

    .footer-inner {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
    }

    .project-card:hover {
        transform: none;
    }
}

/* MAIN v1.1.0 - Dialogs and notifications */

.main-modal {
    width: min(440px, calc(100% - 32px));
    max-height: calc(100vh - 40px);
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 24px 80px #00000035;
}

.main-modal::backdrop {
    background: #14251db0;
    backdrop-filter: blur(3px);
}

.main-modal[open] {
    animation: modal-enter .18s ease-out;
}

.modal-content {
    padding: 26px;
}

.modal-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.modal-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #e5efe6;
    color: var(--primary);
    font-size: 24px;
    font-weight: 700;
}

.modal-icon-danger {
    background: #fce8e8;
    color: var(--danger);
}

.modal-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
}

.modal-close:hover {
    background: #f0f3f0;
}

.modal-content h2 {
    font-size: 21px;
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 26px;
}

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

.btn-danger:hover {
    background: #922c2c;
}

.main-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    width: min(390px, calc(100% - 32px));
    padding: 17px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #d5e4d7;
    border-radius: 14px;
    box-shadow: 0 12px 40px #16351e20;
    animation: modal-enter .2s ease-out;
}

.toast-check {
    background: #e4f0e6;
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 19px;
}

.main-toast strong {
    font-size: 13px;
}

.main-toast p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

#toast-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 22px;
    margin-left: auto;
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 650px) {

    .modal-content {
        padding: 22px;
    }

    .modal-actions > .btn {
        flex: 1;
        white-space: normal;
    }

    .main-toast {
        right: 16px;
        bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .main-modal,
    .main-toast {
        animation: none !important;
    }
}

/* AT-MAIN-009C: Interfaz simplificada */

.topbar-inner {
    min-height: 72px;
}

.brand-name {
    font-size: 27px;
}

.public-dashboard {
    padding-top: 32px;
    padding-bottom: 48px;
}

.public-dashboard .page-heading {
    margin-bottom: 24px;
}

.public-dashboard .page-heading h1 {
    margin: 0;
}

.public-dashboard .toolbar {
    margin-bottom: 26px;
}

.public-dashboard .search-wrapper {
    max-width: 480px;
}

.admin-dashboard .section-meta {
    justify-content: flex-end;
}

.project-description {
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 650px) {

    .public-dashboard {
        padding-top: 24px;
    }

    .public-dashboard .page-heading {
        margin-bottom: 18px;
    }

    .public-dashboard .toolbar {
        margin-bottom: 20px;
    }

    .public-dashboard .search-wrapper {
        max-width: none;
    }

    .public-dashboard .page-heading h1 {
        font-size: 25px;
    }
}
