* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #1f2933;
}

a {
    text-decoration: none;
}

/* =========================
   PÁGINA PÚBLICA
========================= */

.public-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 18px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    color: #111827;
    letter-spacing: 1px;
}

.public-logo img {
    height: 52px;
}

.public-nav a {
    color: #1f2937;
    margin-left: 28px;
    font-size: 14px;
    font-weight: 600;
}

.public-nav a:hover {
    color: #0f4c81;
}

.hero-public {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    padding: 90px 60px;
}

.hero-content {
    max-width: 1100px;
    margin: auto;
}

.hero-public h1 {
    font-size: 44px;
    max-width: 750px;
    margin: 0 0 20px;
}

.hero-public p {
    max-width: 680px;
    font-size: 18px;
    line-height: 1.7;
    color: #cbd5e1;
}

.btn-primary {
    display: inline-block;
    margin-top: 20px;
    background: #2563eb;
    color: white;
    padding: 13px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.public-section {
    max-width: 1100px;
    margin: auto;
    padding: 55px 25px;
}

.section-title {
    font-size: 28px;
    margin-bottom: 25px;
    color: #111827;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.public-card {
    background: white;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.public-card h3 {
    margin-top: 0;
    color: #0f172a;
}

.public-card p {
    color: #475569;
    line-height: 1.6;
}

.public-footer {
    background: #0f172a;
    color: white;
    text-align: center;
    padding: 25px;
    margin-top: 40px;
}

/* =========================
   LOGIN
========================= */

.login-body {
    min-height: 100vh;
    background:
        linear-gradient(rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.90)),
        url("/img/login-bg.jpg");
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-wrapper {
    width: 100%;
    max-width: 460px;
    padding: 20px;
}

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand img {
    max-width: 260px;
    background: rgba(255,255,255,0.94);
    padding: 20px;
    border-radius: 14px;
}

.login-card {
    background: rgba(15, 23, 42, 0.92);
    color: white;
    padding: 34px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.login-card h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.login-card p {
    color: #cbd5e1;
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 13px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #f8fafc;
    outline: none;
}

.login-footer-text {
    margin-top: 22px;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

/* =========================
   SISTEMA / PROYECTOS
========================= */

.system-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #0f172a;
    color: white;
    padding: 28px 20px;
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 34px;
}

.sidebar-logo img {
    width: 160px;
    background: white;
    padding: 12px;
    border-radius: 10px;
}

.sidebar a {
    display: block;
    color: #cbd5e1;
    padding: 13px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.sidebar a:hover {
    background: #1e293b;
    color: white;
}

.system-main {
    flex: 1;
    background: #f4f6f8;
}

.system-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.system-content {
    padding: 35px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.project-card {
    background: white;
    padding: 26px;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    border-top: 5px solid #2563eb;
}

.project-card h3 {
    margin-top: 0;
    color: #0f172a;
}

.project-card p {
    color: #64748b;
    min-height: 48px;
}

.status {
    display: inline-block;
    padding: 5px 10px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 15px;
}

.detail-card {
    background: white;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

@media (max-width: 1000px) {
    .grid-3,
    .project-grid {
        grid-template-columns: 1fr;
    }

    .public-header {
        flex-direction: column;
        gap: 18px;
    }

    .system-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }
}

.page-description {
    color: #64748b;
    margin-bottom: 28px;
}

.module-grid,
.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.module-card,
.tool-card,
.workflow-card {
    background: white;
    border-radius: 14px;
    padding: 26px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.module-card {
    display: block;
    color: inherit;
    border-top: 5px solid #2563eb;
}

.module-card:hover {
    transform: translateY(-2px);
}

.module-label {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 12px;
    color: #0369a1;
    background: #e0f2fe;
    padding: 5px 10px;
    border-radius: 20px;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.module-header p {
    color: #64748b;
    max-width: 760px;
}


.subsection-title {
    margin: 28px 0 18px;
}

.btn-disabled {
    margin-top: 12px;
    background: #e2e8f0;
    color: #64748b;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: not-allowed;
}

.btn-secondary-light,
.btn-login-exit {
    display: inline-block;
    color: #2563eb;
    font-weight: 600;
}

.btn-login-exit {
    display: block;
    text-align: center;
    margin-top: 14px;
    color: #cbd5e1;
}

@media (max-width: 1000px) {
    .module-grid,
    .tool-grid,
    .workflow-steps {
        grid-template-columns: 1fr;
    }

    .module-header {
        flex-direction: column;
    }
}

.sidebar-button {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: #cbd5e1;
    padding: 13px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.sidebar-button:hover {
    background: #1e293b;
    color: white;
}

.login-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.tool-card-link {
    color: inherit;
    text-decoration: none;
}

.btn-primary-small {
    display: inline-block;
    margin-top: 14px;
    background: #2563eb;
    color: white;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.breadcrumb-text {
    color: #64748b;
    font-weight: 600;
    margin-bottom: 6px;
}

.process-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
    margin-bottom: 22px;
}

.process-panel {
    background: white;
    border-radius: 14px;
    padding: 26px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    margin-bottom: 22px;
}

.upload-box {
    display: grid;
    gap: 18px;
}

.form-grid,
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
}

.form-control,
.file-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
}

.summary-grid div {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 10px;
}

.summary-grid span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 6px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.compact-control {
    max-width: 190px;
}

.table-preview-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 36px;
    color: #64748b;
    text-align: center;
    background: #f8fafc;
}

.action-row {
    display: flex;
    gap: 14px;
}

@media (max-width: 1000px) {
    .process-layout,
    .form-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .panel-header {
        flex-direction: column;
    }

    .compact-control {
        max-width: 100%;
    }
}