/* ==========================================================================
   Centroalum Academy - Formulari d'inscripció
   Matches screenshot design: white bg, teal accents, clean layout
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background: #fff;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: #1ab4b0;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   LANDING PAGE
   ========================================================================== */

.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 48px 30px;
}

/* --- Page Header (badge + logo) --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 36px;
}

.header-badge {
    display: inline-block;
    background: #1ab4b0;
    color: #fff;
    padding: 8px 22px;
    font-size: 1.05rem;
    font-weight: 500;
    border-radius: 4px;
    letter-spacing: 0.2px;
}

/* --- Logo --- */
.logo {
    text-align: right;
    line-height: 1.1;
}

.logo-centro {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4a4a4a;
    letter-spacing: -0.5px;
}

.logo-alum {
    font-size: 1.8rem;
    font-weight: 700;
    color: #d4a843;
    letter-spacing: -0.5px;
}

.logo-r {
    font-size: 0.75rem;
    color: #d4a843;
    vertical-align: super;
    margin-left: 1px;
}

.logo-academy {
    font-size: 0.72rem;
    color: #d4a843;
    letter-spacing: 3.5px;
    font-weight: 400;
    margin-top: 2px;
    text-align: right;
}

/* --- Course Title --- */
.course-title {
    margin-bottom: 40px;
}

.course-title h1 {
    font-size: 1.65rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 2px;
}

.course-title h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #333;
}

/* --- Page Main --- */
.page-main {
    flex: 1;
}

/* --- Form Elements --- */
.form-row {
    display: flex;
    gap: 28px;
    margin-bottom: 28px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    padding: 12px 14px;
    border: none;
    border-radius: 0;
    font-size: 0.95rem;
    color: #333;
    background: #eeeeee;
    transition: background 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    background: #e4e4e4;
}

.form-group input::placeholder {
    color: #bbb;
}

/* --- Buttons --- */
.form-actions {
    margin-top: 40px;
    text-align: center;
}

.btn-submit {
    background: #1ab4b0;
    color: #fff;
    border: none;
    padding: 12px 42px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
    font-family: inherit;
}

.btn-submit:hover {
    background: #159e9b;
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-full {
    width: 100%;
}

/* --- Alerts --- */
.alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 0.92rem;
    font-weight: 500;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 30px 0 10px;
    color: #bbb;
    font-size: 0.8rem;
}

/* ==========================================================================
   LOGIN PAGE
   ========================================================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f7f7f7;
}

.login-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h2 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.login-header p {
    color: #999;
    font-size: 0.85rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.88rem;
}

.login-footer a {
    color: #888;
}

/* ==========================================================================
   ADMIN DASHBOARD
   ========================================================================== */

.admin-body {
    background: #f5f5f5;
}

.admin-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Admin Header --- */
.admin-header {
    background: #fff;
    color: #333;
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 3px solid #1ab4b0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.admin-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.admin-header p {
    font-size: 0.82rem;
    color: #999;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-user {
    font-size: 0.88rem;
    color: #666;
}

.btn-logout {
    background: #1ab4b0;
    color: #fff;
    padding: 7px 16px;
    border-radius: 5px;
    font-size: 0.82rem;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #159e9b;
    text-decoration: none;
}

/* --- Stats --- */
.admin-main {
    flex: 1;
    padding: 28px 32px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-top: 3px solid #1ab4b0;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1ab4b0;
}

.stat-label {
    font-size: 0.85rem;
    color: #999;
    margin-top: 4px;
}

/* --- Table --- */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.table-header h2 {
    font-size: 1.15rem;
    color: #333;
}

.btn-export {
    background: #1ab4b0;
    color: #fff;
    padding: 8px 18px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-export:hover {
    background: #159e9b;
    text-decoration: none;
}

.table-responsive {
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table thead {
    background: #f9f9f9;
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f3f3;
    color: #444;
}

.data-table tbody tr:hover {
    background: #fafafa;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

.empty-table {
    text-align: center;
    padding: 40px 16px !important;
    color: #bbb;
    font-style: italic;
}

.btn-delete {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-delete:hover {
    background: #fef2f2;
    text-decoration: none;
}

/* --- Admin Footer --- */
.admin-footer {
    text-align: center;
    padding: 18px 20px;
    color: #bbb;
    font-size: 0.8rem;
    border-top: 1px solid #eee;
}

.admin-footer a {
    color: #999;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 640px) {
    .landing-container {
        padding: 24px 20px 20px;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
    }

    .logo {
        text-align: left;
    }

    .course-title h1,
    .course-title h2 {
        font-size: 1.3rem;
    }

    .form-row {
        flex-direction: column;
        gap: 20px;
    }

    .admin-header {
        padding: 16px 20px;
    }

    .admin-main {
        padding: 20px 16px;
    }

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

    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
