/* FONT IMPORT */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* VARIABLES */
:root {
    --primary-light: #99CC33;
    --primary-dark: #76b900;
    --text-dark: #333333;
    --text-light: #666666;
    --background-light: #f7f7f7;
    --white: #ffffff;
    --shadow: 0 8px 24px rgba(0,0,0,0.05);
}

/* RESET & BASE */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Poppins', sans-serif;
  background: var(--background-light);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
    flex: 1;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
    max-width: 100%;
    height: auto;
}

/* LAYOUT CONTAINER */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* =================================
   Header & Navigation (Unified)
   ================================= */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo img {
    height: 90px;
}

.main-nav .nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.main-nav .nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-bottom-color 0.3s;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-light);
}

/* =================================
   Buttons (Unified)
   ================================= */
.btn {
  padding: 0.8em 1.5em;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}
.btn-primary {
  background: var(--primary-dark);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: #e0e0e0;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #d5d5d5;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* =================================
   Typography & Section Headers (Unified)
   ================================= */
.section-title, .hero-title {
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.3;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: var(--text-light);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* =================================
   Hero Section (Index Page)
   ================================= */
.hero {
  background: var(--white);
  padding: 5rem 1rem;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-text-column {
    flex: 1;
    max-width: 50%;
    text-align: left;
}

.hero-image-column {
    flex: 1;
    max-width: 45%;
}

.hero-title {
  font-size: 2.8rem;
  text-align: left; /* Override unified style */
  margin-bottom: 1.5rem;
}

.hero-text {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  color: var(--text-light);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* =================================
   Value Proposition Section (Index Page)
   ================================= */
.value-proposition {
    padding: 5rem 1rem;
    background: var(--background-light);
}

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

.value-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.value-icon {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.value-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.value-card p {
    color: var(--text-light);
}

/* =================================
   Tools Section (Shared & Index)
   ================================= */
.tools {
  background: var(--white);
  padding: 5rem 1rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem; /* Unificado */
}

.tool-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}
.tool-card .tool-header {
    background: var(--primary-dark);
    color: var(--white);
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 5px solid var(--primary-light);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-card .tool-title {
    font-size: 1.5rem;
    color: var(--white);
    margin: 0;
}

.tool-card .tool-body {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.tool-card .tool-description {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 1.5em;
  flex-grow: 1;
  text-align: center;
}

.tool-card .btn-primary {
    margin-top: auto;
}

.tool-card.placeholder {
    background-color: #f9f9f9;
    border: 2px dashed #e0e0e0;
}

.tool-card.placeholder .tool-header {
    background: #e0e0e0;
    border-bottom-color: #ccc;
}

.tool-card.placeholder .tool-icon {
    color: #999;
}

.tool-card.placeholder .tool-title {
    color: #777;
}

.tool-card.placeholder .tool-description {
    color: #888;
}

/* =================================
   Corte Page Styles
   ================================= */
.corte-main {
    padding: 4rem 1rem; /* Unificado */
    background-color: var(--background-light);
}

.corte-tool {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.corte-tool .tool-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Usando .section-title da unificação */
.corte-tool .tool-title {
    font-size: 2.5rem;
}

/* Usando .section-description da unificação */
.corte-tool .tool-description {
    font-size: 1.1rem;
}

.upload-form .form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}
.upload-form .form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1.5rem;
}
.form-section .section-title {
    font-size: 1.75rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
    display: inline-block;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}
.form-group input[type="file"],
.form-group input[type="number"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input[type="file"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(118, 185, 0, 0.25);
}
.form-group small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}
.submit-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Processing & Results */
.processing-section, .results-section {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}
.hidden { display: none; }

.processing-section { text-align: center; }
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-dark);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#popup-status-text {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 500;
}
.progress-container {
    width: 100%;
    max-width: 90%; /* Alterado de 400px para porcentagem */
    margin: 1.5rem auto 0;
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.progress-bar {
    height: 12px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 8px;
}

.results-section .section-title {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: left;
}
.status-box {
    background: #f4f7f6;
    border-left: 5px solid var(--primary-light);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}
.status-box p { margin: 0; font-weight: 500; }

.download-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.download-button {
    display: block;
    background: var(--primary-dark);
    color: #fff;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
    word-break: break-all;
}
.download-button:hover {
    background-color: #5e9400;
    transform: translateY(-2px);
}

/* =================================
   Footer (Unified)
   ================================= */
.main-footer {
    background: var(--text-dark);
    color: #e0e0e0;
    padding: 3rem 1rem 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #444;
    align-content: flex-end;
}

.footer-section {
    flex: 1;
    min-width: 200px; /* Reduz um pouco para mais flexibilidade */
}

.footer-section.about {
    flex: 1;
    max-width: 450px; /* Define uma largura máxima para a seção 'sobre' */
    min-width: 280px; /* Garante que não fique muito espremida */
}

.footer-links-group {
    display: flex;
    flex: 2; /* Ocupa o espaço restante */
    justify-content: flex-end; /* Alinha as colunas de link à direita */
    gap: 4rem; /* Aumenta o espaço entre as colunas de links */
    flex-wrap: wrap;
}

.footer-section.links {
    min-width: 150px; /* Largura mínima para cada coluna de link */
}

.footer-logo img {
    max-height: 100px; /* Aumenta ligeiramente a altura da logo */
    margin-bottom: 1rem;
}

.footer-section .about-text {
    font-size: 0.9rem;
    color: #ccc; /* Deixa o texto um pouco mais claro */
    line-height: 1.6;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.6rem;
}

.footer-section ul a {
    color: #ccc;
    transition: color 0.3s, padding-left 0.3s;
}

.footer-section ul a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* =================================
   Responsive Design
   ================================= */
@media (max-width: 992px) {
    .hero-title { font-size: 2.5rem; }
    .hero-text-column { max-width: 100%; text-align: center; }
    .hero-image-column { display: none; } /* Oculta a imagem em telas menores para focar no texto */
    .hero-buttons { justify-content: center; }
    .hero-title { text-align: center; } /* Centraliza o título no mobile */

    .header-container {
        padding: 0 2rem;
    }
    .main-nav .nav-list {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .section-title, .hero-title, .corte-tool .tool-title {
        font-size: 2rem;
    }

    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav .nav-list {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links-group {
        justify-content: center;
        gap: 2rem;
        margin-top: 1rem;
    }

    .footer-section.about {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .container { width: 95%; }
    .hero-title { font-size: 2rem; }
    .corte-tool .tool-title { font-size: 2rem; }
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* =================================
   UUID & Recent Tasks Components
   ================================= */
.uuid-box {
    margin-top: 1.5rem;
    padding: 1.25rem 1.25rem 1rem;
    background: #f8faff;
    border: 2px solid var(--primary-dark);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.uuid-box h3 { margin: 0 0 0.75rem; font-size: 1.3rem; color: var(--primary-dark); }
.uuid-display {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    background: #eef4e6;
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
    border: 1px solid #d3e4c2;
    margin-bottom: 0.75rem;
}
.uuid-display code {
    font-family: "Poppins", monospace;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: .5px;
    word-break: break-all;
    flex: 1;
    user-select: all;
}
.copy-btn, .copy-recent-btn {
    background: var(--primary-dark);
    color: #fff;
    border: none;
    padding: 0.55rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .25s, transform .15s;
    align-self: center;
}
.copy-btn:hover, .copy-recent-btn:hover { background: var(--primary-light); }
.copy-btn:active, .copy-recent-btn:active { transform: scale(.95); }
.delete-btn { background:#c0392b; }
.delete-btn:hover { background:#e74c3c; }
.delete-btn:active { background:#a93226; }
.uuid-instructions { font-size: .85rem; line-height: 1.4; color: var(--text-light); }
.uuid-instructions a { color: var(--primary-dark); text-decoration: underline; }
.uuid-instructions a:hover { color: var(--primary-light); }

.recent-tasks-box {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem 0.9rem;
    background: #ffffff;
    border: 1px solid #e2e8d8;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,.04);
}
.recent-tasks-box h4 { margin: 0 0 .75rem; font-size: 1.05rem; color: var(--text-dark); }
.recent-task-list { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.recent-task-list li { display: flex; gap: .5rem; align-items: center; }
.recent-task-list a { flex: 1; font-size: .8rem; background: #f4f7f3; padding: .45rem .55rem; border-radius: 6px; border: 1px solid #dfe7d3; word-break: break-all; transition: background .25s; }
.recent-task-list a:hover { background: #e8efdf; }
.recent-hint { margin: 0; font-size: .7rem; color: var(--text-light); }

/*
    =================================
    Flowchart (Corte Page)
    ================================= 
*/

.flowchart-wrapper {
    background: #ffffff;
    border: 1px solid #e3e9da;
    border-radius: 14px;
    padding: 1.3rem 1.2rem 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    margin-bottom: 2rem;
}
.flowchart-title {
    margin: 0 0 .9rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-align: center;
    letter-spacing: .5px;
}
.flowchart {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: .6rem;
    flex-wrap: wrap;
}
.flow-node {
    background: linear-gradient(135deg,#f7fbf1,#eef5e6);
    border: 1px solid #d6e5c8;
    min-width: 120px;
    flex: 1 1 120px;
    padding: .7rem .65rem .6rem;
    border-radius: 10px;
    position: relative;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform .25s, box-shadow .25s;
}
.flow-node:hover { transform: translateY(-4px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.flow-node.danger { background: linear-gradient(135deg,#fff4f4,#ffecec); border-color: #f5c6c6; }
.flow-step {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-dark);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: .75rem;
    line-height: 26px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.flow-node.danger .flow-step { background:#d9534f; }
.flow-node h4 {
    margin:.4rem 0 .35rem;
    font-size:.85rem;
    font-weight:600;
    letter-spacing:.5px;
    color: var(--text-dark);
}
.flow-node p {
    margin:0;
    font-size:.65rem;
    color: var(--text-light);
    font-weight:500;
}
.flow-arrow {
    align-self: center;
    font-size: 1.4rem;
    color: #b6c6a5;
    font-weight: 600;
    line-height:1;
}
.flow-tip {
    margin: .85rem 0 0;
    font-size: .7rem;
    text-align: center;
    color: var(--text-light);
}
@media (max-width: 760px) {
  .flow-arrow { display: none; }
  .flow-node { flex: 1 1 calc(50% - .6rem); }
}
@media (max-width: 500px) {
  .flow-node { flex: 1 1 100%; }
}

