/* RESET */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

/* BODY */

body{

    font-family:Arial, Helvetica, sans-serif;

   background:#f4f6f8;
 }


/* HEADER */

header{

    background:#0F172A;

    color:white;

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:20px 60px;

}

/* LOGO */

.logo{

    font-size:28px;

    font-weight:bold;

}

/* MENU */

nav ul{

    display:flex;

    list-style:none;

    gap:25px;

}

nav a{

    color:white;

    text-decoration:none;

    transition:.3s;

}

nav a:hover{

    color:#38BDF8;

}

/* LOGIN */

.auth{

    display:flex;

    gap:15px;

}

.auth a{

    color:white;

    text-decoration:none;

}

/* MAIN */

main{

    padding:80px;

}

/* FOOTER */

footer {
    background: #0f172a;
    color: #ffffff;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

footer p {
    margin: 0;
}


/* HERO */

.hero{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:80px;
    gap:50px;
}
.hero-text{

    flex:1;

}

.hero-image{

    flex:1;

    text-align:center;

}

.hero-image img{

    width:100%;

    max-width:450px;
    border-radius: 12px;

}

.hero h1{

    font-size:52px;

    color:#0F172A;

    margin-bottom:25px;

}

.hero p{

    font-size:22px;

    line-height:1.7;

    color:#555;

    margin-bottom:35px;

}

.btn{

    display:inline-block;

    background:#2563EB;

    color:white;

    padding:18px 35px;

    border-radius:8px;

    text-decoration:none;

    transition:.3s;
    margin-top: 20px;

}

.btn:hover{

    background:#1D4ED8;

}

.auth {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth span {
    color: #38bdf8;
    font-weight: bold;
}

/* ===========================
   ADMIN - GESTÃO DE CURSOS
=========================== */

.admin-courses{
    max-width:1200px;
    margin:40px auto;
    padding:0 20px;
}

.admin-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
}

.admin-header h1{
    margin:0;
    color:#0f172a;
    font-size:32px;
}

.admin-header p{
    margin-top:8px;
    color:#666;
}

.btn-primary{
    display:inline-block;
    padding:12px 20px;
    background:#2563eb;
    color:#fff;
    text-decoration:none;
    border-radius:8px;
    font-weight:bold;
    transition:.3s;
}

.btn-primary:hover{
    background:#1d4ed8;
}

.table-container{
    overflow-x:auto;
}

.courses-table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
    border-radius:10px;
    overflow:hidden;
}

.courses-table thead{
    background:#0f172a;
    color:#fff;
}

.courses-table th,
.courses-table td{
    padding:15px;
    text-align:left;
}

.courses-table tbody tr{
    border-bottom:1px solid #ececec;
}

.courses-table tbody tr:hover{
    background:#f7f9fc;
}

.status{
    padding:6px 12px;
    border-radius:30px;
    font-size:13px;
    font-weight:bold;
}

.status.active{
    background:#d1fae5;
    color:#047857;
}

.status.inactive{
    background:#fee2e2;
    color:#b91c1c;
}

.actions{
    white-space:nowrap;
}

.btn-edit,
.btn-delete{
    display:inline-block;
    padding:8px 14px;
    border-radius:6px;
    text-decoration:none;
    color:#fff;
    font-size:14px;
    margin-right:8px;
}

.btn-edit{
    background:#2563eb;
}

.btn-edit:hover{
    background:#1d4ed8;
}

.btn-delete{
    background:#dc2626;
}

.btn-delete:hover{
    background:#b91c1c;
}

.empty-message{
    text-align:center;
    padding:40px;
    color:#777;
}

.courses-table td,
.courses-table th{
    vertical-align: middle;
}

.status{
    display:inline-block;
}

.actions{
    text-align:center;
    white-space:nowrap;
}

.btn-edit{
    margin-right:8px;
}

.courses-table tbody tr{
    transition:0.25s;
}

@media (max-width: 768px) {
    header {
        padding: 20px;
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    main {
        padding: 30px 15px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
    }

    .courses-table th,
    .courses-table td {
        padding: 12px;
    }
}

      /* ==== CATÁLOGO PÚBLICO DE CURSOS ======== */

.public-courses {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.courses-heading {
    max-width: 700px;
    margin-bottom: 40px;
}

.section-label {
    display: inline-block;
    margin-bottom: 12px;
    color: #2563eb;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.courses-heading h1 {
    color: #0f172a;
    font-size: 42px;
    margin-bottom: 15px;
}

.courses-heading p {
    color: #64748b;
    font-size: 18px;
    line-height: 1.7;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 30px;
}

.course-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.14);
}

.course-card-top {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #0f172a;
}

.course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-category {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;

    display: inline-block;
    padding: 7px 12px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    border-radius: 30px;
    font-size: 13px;
    font-weight: bold;
}

.course-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 25px;
}

.course-card h2 {
    margin-bottom: 14px;
    color: #0f172a;
    font-size: 22px;
}

.course-description {
    flex: 1;
    margin-bottom: 25px;
    color: #64748b;
    line-height: 1.6;
}

.course-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.course-price {
    color: #0f172a;
    font-size: 20px;
}

.course-link {
    display: inline-block;
    padding: 10px 16px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    border-radius: 7px;
    font-weight: bold;
    transition: background 0.25s ease;
}

.course-link:hover {
    background: #1d4ed8;
}

.courses-empty {
    padding: 50px 25px;
    background: #ffffff;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
}

.courses-empty h2 {
    margin-bottom: 10px;
    color: #0f172a;
}

.courses-empty p {
    color: #64748b;
}

@media (max-width: 950px) {
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .courses-heading h1 {
        font-size: 34px;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .course-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

    /* ===========================
   FORMULÁRIO DE CURSOS
=========================== */

.course-form-page {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.course-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.course-form-header h1 {
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 34px;
}

.course-form-header p {
    color: #64748b;
}

.course-form {
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.form-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 35px;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label,
.image-panel h2 {
    color: #0f172a;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    font-weight: bold;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
}

.image-panel {
    padding: 22px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.image-panel h2 {
    margin-bottom: 18px;
    font-size: 20px;
}

.course-preview,
.course-preview-placeholder {
    width: 100%;
    height: 240px;
    margin-bottom: 20px;
    border-radius: 10px;
}

.course-preview {
    display: block;
    object-fit: cover;
}

.course-preview-placeholder {
    display: grid;
    place-items: center;
    background: #e2e8f0;
    color: #64748b;
    font-weight: bold;
}

.form-group small {
    color: #64748b;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 20px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s ease;
}

.btn-secondary:hover {
    background: #f1f5f9;
}

.form-alert {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
}

@media (max-width: 800px) {
    .course-form-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .course-form {
        padding: 20px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

/* ===========================
   DETALHES DO CURSO
=========================== */

.course-details {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.course-details-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}

.course-details-image {
    overflow: hidden;
    border-radius: 16px;
}

.course-details-image img,
.course-details-placeholder {
    width: 100%;
    height: 360px;
    border-radius: 16px;
}

.course-details-image img {
    display: block;
    object-fit: cover;
}

.course-details-placeholder {
    display: grid;
    place-items: center;
    background: #e2e8f0;
    color: #64748b;
    font-weight: bold;
}

.course-details-content h1 {
    margin: 12px 0 20px;
    color: #0f172a;
    font-size: 46px;
}

.course-details-description {
    margin-bottom: 25px;
    color: #64748b;
    font-size: 18px;
    line-height: 1.8;
}

.course-details-price {
    margin-bottom: 25px;
     color:#2563eb;
    font-size: 36px;
    font-weight: bold;
}

.course-details-content .btn-primary,
.course-details-content .btn-secondary {
    padding:14px 22px;
}

.enrollment-success {
    margin: 20px 0;
    padding: 14px 16px;
    background: #ecfdf5;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
    font-weight: bold;
}

@media (max-width: 850px) {
    .course-details-grid {
        grid-template-columns: 1fr;
    }

    .course-details-content h1 {
        font-size: 36px;
    }

    .course-details-image img,
    .course-details-placeholder {
        height: 280px;
    }
   }

  /* ===========================
   PROGRESSO DO CURSO
=========================== */

.course-progress {
    margin-bottom: 35px;
    padding: 22px 25px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
}

.course-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
    color: #0f172a;
}

.course-progress-header strong {
    font-size: 18px;
}

.course-progress-header span {
    color: #2563eb;
    font-size: 18px;
    font-weight: bold;
}

.progress-bar {
    display: block;
    width: 100%;
    height: 12px;
    overflow: hidden;
    background: #e2e8f0;
    border-radius: 999px;
}

.progress-bar-fill {
    display: block;
    height: 12px;
    background: #2563eb;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.course-progress p {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 14px;
}

/* ===========================
   CERTIFICADO
=========================== */

.certificate-page {
    max-width: 1100px;
    margin: 50px auto;
    padding: 0 20px;
}

.certificate {
    position: relative;
    padding: 70px 60px;
    background: #ffffff;
    border: 10px solid #0f172a;
    outline: 3px solid #2563eb;
    outline-offset: -22px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.15);
}

.certificate-logo {
    margin-bottom: 25px;
    color: #0f172a;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
}

.certificate-label {
    color: #2563eb;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.certificate h1 {
    margin: 15px 0 30px;
    color: #0f172a;
    font-size: 48px;
}

.certificate-text {
    color: #64748b;
    font-size: 18px;
}

.certificate-student {
    margin: 20px 0;
    color: #2563eb;
    font-size: 42px;
}

.certificate-course {
    margin: 18px 0 30px;
    color: #0f172a;
    font-size: 30px;
}

.certificate-date {
    margin-top: 30px;
    color: #64748b;
}

.certificate-signature {
    width: 260px;
    margin: 55px auto 0;
    padding-top: 12px;
    border-top: 1px solid #0f172a;
}

.certificate-signature strong {
    display: block;
    color: #0f172a;
}

.certificate-signature span {
    color: #64748b;
    font-size: 14px;
}

.certificate-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn-print {
    padding: 12px 20px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

.btn-print:hover {
    background: #1d4ed8;
}

/* ===========================
   IMPRESSÃO / GUARDAR COMO PDF
=========================== */

@page {
    size: A4 landscape;
    margin: 12mm;
}

@media print {

    header,
    footer,
    .certificate-actions {
        display: none !important;
    }

    body {
        background: #ffffff !important;
    }

    main {
        padding: 0 !important;
    }

    .certificate-page {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .certificate {
        width: 100%;
        min-height: 180mm;
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* ===========================
   VERIFICAR CERTIFICADO
=========================== */

.verify-certificate-page {
    max-width: 850px;
    margin: 50px auto;
    padding: 0 20px;
}

.verify-certificate-container {
    padding: 35px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.verify-certificate-container h1 {
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 36px;
}

.verify-certificate-container > p {
    margin-bottom: 25px;
    color: #64748b;
}

.verify-certificate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.verify-certificate-form label {
    color: #0f172a;
    font-weight: bold;
}

.verify-certificate-form input {
    padding: 13px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
}

.verify-certificate-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.verify-certificate-form .btn-primary {
    margin-top: 5px;
    border: 0;
    cursor: pointer;
}

.certificate-valid,
.certificate-invalid {
    margin-top: 30px;
    padding: 25px;
    border-radius: 12px;
}

.certificate-valid {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #166534;
}

.certificate-invalid {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.certificate-valid h2,
.certificate-invalid h2 {
    margin-bottom: 15px;
}

.certificate-valid p {
    margin: 8px 0;
}

/* ===========================
   VERIFICAÇÃO DE CERTIFICADOS
=========================== */

.verify-certificate-page {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

.verify-certificate-container {
    padding: 40px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
}

.verify-header {
    margin-bottom: 30px;
}

.verify-header h1 {
    margin: 5px 0 12px;
    color: #0f172a;
    font-size: 40px;
}

.verify-header p {
    color: #64748b;
    font-size: 17px;
    line-height: 1.7;
}

.verify-certificate-form {
    padding: 25px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.verify-certificate-form label {
    display: block;
    margin-bottom: 10px;
    color: #0f172a;
    font-weight: bold;
}

.verify-form-row {
    display: flex;
    gap: 12px;
}

.verify-form-row input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    font: inherit;
    font-size: 16px;
}

.verify-form-row input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.verify-button {
    border: 0;
    cursor: pointer;
    white-space: nowrap;
}

.certificate-result {
    display: flex;
    gap: 25px;
    margin-top: 30px;
    padding: 30px;
    border-radius: 16px;
}

.certificate-valid {
    background: #ecfdf5;
    border: 1px solid #86efac;
}

.certificate-invalid {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.certificate-result-icon {
    display: grid;
    place-items: center;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 34px;
    font-weight: bold;
}

.certificate-valid .certificate-result-icon {
    background: #16a34a;
    color: #ffffff;
}

.certificate-invalid .certificate-result-icon {
    background: #dc2626;
    color: #ffffff;
}

.certificate-result-content {
    flex: 1;
}

.certificate-status {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.certificate-valid .certificate-status {
    color: #15803d;
}

.certificate-invalid .certificate-status {
    color: #b91c1c;
}

.certificate-result h2 {
    margin-bottom: 10px;
    color: #0f172a;
    font-size: 28px;
}

.certificate-result-intro,
.certificate-invalid p {
    color: #475569;
    line-height: 1.7;
}

.certificate-data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.certificate-data-item {
    padding: 18px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
}

.certificate-data-item span {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.certificate-data-item strong {
    color: #0f172a;
    font-size: 16px;
}

@media (max-width: 700px) {

    .verify-certificate-container {
        padding: 25px;
    }

    .verify-header h1 {
        font-size: 32px;
    }

    .verify-form-row {
        flex-direction: column;
    }

    .verify-button {
        width: 100%;
    }

    .certificate-result {
        flex-direction: column;
    }

    .certificate-data-grid {
        grid-template-columns: 1fr;
    }
}


