:root {
    --color-corporatiu: #C2736D;
    --color-corporatiu-fosc: #8F4F4A;
    --color-corporatiu-clar: #F8EFEE;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f3f5f7;
    color: #1f2937;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.topbar {
    background-color: #C2736D;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 20px;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
}

.menu {
    display: flex;
    gap: 20px;
    flex: 1;
    margin-left: 30px;
}

.menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.menu a:hover {
    text-decoration: underline;
}

.user-zone {
    display: flex;
    align-items: center;
    gap: 12px;
}

.welcome {
    color: white;
    font-size: 0.95rem;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-light {
    background-color: white;
    color: #C2736D;
    font-weight: bold;
}

.btn-light:hover {
    opacity: 0.9;
}

main.container {
    padding: 40px 0;
}

.card {
    background-color: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

h1, h2, h3 {
    margin-top: 0;
    color: #111827;
}

p {
    line-height: 1.6;
    color: #374151;
}

.franges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 14px;
    margin: 20px 0 30px;
}

.franja-card {
    display: block;
    border: 2px solid #DFC1BE;
    border-radius: 14px;
    padding: 18px 20px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    color: #C2736D;
    background-color: white;
    transition: 0.2s ease;
}

.franja-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.franja-card span {
    display: block;
    font-size: 1.1rem;
}

.franja-card:hover {
    border-color: #C2736D;
    background-color: #F8EFEE;
}

.franja-card:has(input:checked) {
    background-color: #C2736D;
    border-color: #C2736D;
    color: white;
}

.reserva-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #1f2937;
    font-weight: bold;
}

.btn-danger {
    background-color: #b91c1c;
    color: white;
    font-weight: bold;
}

.reserva-historial {
    opacity: 0.75;
}


.reserves-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 30px;
}

.reserva-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);

    display: flex;
    flex-direction: column;
    gap: 12px;

    transition: 0.2s ease;
}

.reserva-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.reserva-card h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #111827;
}

.reserva-card p {
    margin: 0;
    color: #374151;
}

.reserva-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

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

.qr-image {
    margin-top: 25px;
    width: 280px;
    max-width: 100%;
    border-radius: 20px;
    padding: 20px;
    background-color: white;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}


.home-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
}

.news-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

.news-date {
    display: inline-block;
    background-color: #F4E3E1;
    color: #8F4F4A;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.home-side {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    height: fit-content;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

.quick-link {
    display: block;
    background-color: #F8EFEE;
    color: #C2736D;
    text-decoration: none;
    font-weight: bold;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.quick-link:hover {
    background-color: #C2736D;
    color: white;
}


.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
}

.dashboard-sidebar {
    background-color: #C2736D;
    color: white;
    border-radius: 22px;
    padding: 28px;
    min-height: 420px;
}

.dashboard-sidebar h2 {
    color: white;
    margin-bottom: 6px;
}

.dashboard-sidebar p {
    color: #F3DEDC;
    margin-bottom: 28px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-menu a {
    background-color: rgba(255, 255, 255, 0.12);
    color: white;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: bold;
}

.sidebar-menu a:hover {
    background-color: white;
    color: #C2736D;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.welcome-card {
    background: linear-gradient(135deg, #F8EFEE, #ffffff);
    border: 1px solid #dbeafe;
    border-radius: 22px;
    padding: 34px;
}

.welcome-card h1 {
    margin-bottom: 10px;
}

.notice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}

.notice-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.notice-tag {
    display: inline-block;
    background-color: #F4E3E1;
    color: #8F4F4A;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 12px;
}

@media (max-width: 800px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

.incidencia-img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 14px;
    margin-top: 12px;
}

.hardware-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.login-help {
    margin-top: 18px;
    text-align: center;
}

.login-help a {
    color: #C2736D;
    font-weight: 600;
    text-decoration: none;
}

.login-help a:hover {
    text-decoration: underline;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-form {
    width: 100%;
    width: 400px;
    text-align: center;
}

.login-form button {
    width: 100%;
    background-color: #C2736D;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: bold;
    cursor: pointer;
}

.header-logo {
    display: flex;
    align-items: center;
    margin-right: 25px;
}

.header-logo img {
    height: 55px;
    width: auto;
    display: block;
}

.footer {
    margin-top: 40px;
    padding: 24px;
    text-align: center;
    background: #C2736D;
    color: white;
}

.footer-links {
    margin-bottom: 10px;
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

.footer p {
    margin: 0;
}

html, body {
    height: 100%;
}

main {
    flex: 1;
}

.normes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.norma-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    padding: 16px;
    background: #F8EFEE;
    border: 1px solid #DFC1BE;
    border-radius: 12px;
}

.norma-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #C2736D;
    color: white;
    border-radius: 10px;

    font-size: 18px;
}

.norma-item h4 {
    margin: 0 0 5px 0;
    color: #222;
    font-size: 15px;
}

.norma-item p {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.4;
}

@media (max-width: 700px) {
    .normes-grid {
        grid-template-columns: 1fr;
    }
}

.modal-reglament {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-contingut {
    background: white;
    width: 90%;
    max-width: 560px;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.modal-contingut h3 {
    margin-bottom: 16px;
}

.acceptacio-reglament {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 20px 0;
    line-height: 1.5;
}

.acceptacio-reglament input {
    margin-top: 4px;
}

.modal-accions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.error-reglament {
    color: #b91c1c;
    margin-top: 12px;
    font-weight: 600;
}

.cancelacio-bloquejada {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 8px;
    font-size: 14px;
}


.avis-tancament {
    background: #fff4f3;
    border: 1px solid #C2736D;
    border-left: 5px solid #C2736D;
    border-radius: 14px;
    padding: 18px 20px;
    margin: 20px 0;
}

.avis-tancament h3 {
    color: #8F4F4A;
    margin-bottom: 10px;
}

.avis-tancament p {
    margin: 6px 0;
}


.propers-tancaments {
    margin: 24px 0;
}

.tancament-item {
    background: #F8EFEE;
    border: 1px solid #DFC1BE;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.tancament-item strong {
    display: block;
    color: #8F4F4A;
    margin-bottom: 4px;
}

.tancament-item span {
    font-size: 14px;
    color: #6b7280;
}

.tancament-item p {
    margin: 8px 0 0;
}