/* CSS Estil */

body {
    background-color: #d6d6c2;
    background-image: url("https://www.transparenttextures.com/patterns/purty-wood.png");
    /* This is mostly intended for prototyping; please download the pattern and re-host for production environments. Thank you! */
    font-family: 'Ubuntu', sans-serif;
}


/* HR Formulari Afegir */

.hr-radios {
    margin-top: 0.2em;
    margin-bottom: 0.1em;
}

.div-afegir {
    background-color: rgb(153, 179, 255, 0.5);
}

.taula-alumnes {
    white-space: nowrap;
    font-size: 14px;
    vertical-align: middle;
}


/* CALENDARI */

.calendar-contain {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, "Helvetica Neue", sans-serif;
    position: relative;
    left: 0;
    right: 0;
    border-radius: 0;
    width: 100%;
    overflow: hidden;
    max-width: 100%;
    /*min-width: 400px;*/
    margin: 1rem auto;
    background-color: #f5f7f6;
    box-shadow: 5px 5px 72px rgba(30, 46, 50, 0.5);
    color: #040605;
}

@media screen and (min-width: 55em) {
    .calendar-contain {
        margin: auto;
        top: 5%;
    }
}

.title-bar {
    width: 100%;
    display: table;
    text-align: center;
    background: #f5f7f6;
    padding: 0.5rem;
    margin-bottom: 0;
}

@media screen and (min-width: 55em) {
    .title-bar {
        float: right;
        width: 70%;
        text-align: center;
        background: #f5f7f6;
        padding: 0.5rem;
        margin-bottom: 0;
    }
}

.title-bar:after {
    display: table;
    clear: both;
}

.title-bar__prev {
    position: relative;
    float: left;
    text-align: left;
    cursor: pointer;
    width: 25px;
    height: 30px;
    font-size: 30px;
}


/*
.title-bar__prev:after {
    content: "";
    display: inline;
    position: absolute;
    width: 14px;
    height: 14px;
    right: 0;
    left: 2px;
    top: 7px;
    margin: auto;
    border-top: 1.5px solid black;
    border-right: 1.5px solid black;
    -webkit-transform: rotate(224deg);
    transform: rotate(224deg);
}
*/

.title-bar__next {
    position: relative;
    float: right;
    text-align: right;
    cursor: pointer;
    width: 25px;
    height: 30px;
    font-size: 30px;
}


/*
.title-bar__next:after {
    content: "";
    display: inline;
    position: absolute;
    width: 14px;
    height: 14px;
    right: 2px;
    top: 7px;
    margin: auto;
    border-top: 1.5px solid black;
    border-right: 1.5px solid black;
    -webkit-transform: rotate(44deg);
    transform: rotate(44deg);
}
*/

.title-bar__year {
    /*
  position: relative;
  float: left;
*/
    font-size: 1rem;
    line-height: 30px;
    padding: 0 0.5rem;
    text-align: center;
}

.title-bar__year select {
    padding: 2px 6px;
    font-size: 16px;
}

.title-bar__month {
    /*
  position: relative;
  float: left;
*/
    font-size: 1rem;
    line-height: 30px;
    padding: 0 0.5rem;
    text-align: center;
}

.title-bar__month select {
    padding: 2px 6px;
    font-size: 16px;
}

.calendar__sidebar {
    width: 100%;
    margin: 0 auto;
    float: none;
    background: linear-gradient(120deg, #eff3f3, #e1e7e8);
    padding-bottom: 0.7rem;
}

@media screen and (min-width: 55em) {
    .calendar__sidebar {
        position: absolute;
        height: 100%;
        width: 30%;
        float: none;
        margin-bottom: 0;
    }
}

.calendar__sidebar .content {
    padding: 1.5rem 1.2rem 2rem 2rem;
    color: #040605;
}

.sidebar__list {
    list-style: none;
    margin: 0;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: -10px;
}

.sidebar__list-item {
    margin: 1 rem 0;
    color: #141f1a;
    font-weight: 300;
    font-size: 1rem;
}

.list-item__time {
    display: inline-block;
    /*width: 60px;*/
}

@media screen and (min-width: 55em) {
    .list-item__time {
        margin-right: 1rem;
    }
}

.sidebar__list-item--complete {
    color: #330000;
}

.sidebar__list-item--complete .list-item__time {
    color: rgba(4, 6, 5, 0.3);
}

.sidebar__heading {
    font-size: 1.5rem;
    font-weight: bold;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.sidebar__heading span {
    float: right;
    font-weight: 300;
}

.calendar__heading-highlight {
    color: #2d444a;
    font-weight: 900;
}

.calendar__days {
    display: -webkit-box;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    flex-flow: column wrap;
    -webkit-box-align: stretch;
    align-items: stretch;
    width: 100%;
    float: none;
    margin-right: 10px;
    min-height: 420px;
    height: 100%;
    font-size: 11px;
    padding: 0.8rem 0.5rem 1rem 0.5rem;
    background: #f5f7f6;
}

@media screen and (min-width: 55em) {
    .calendar__days {
        width: 69%;
        float: right;
        margin-right: 10px;
    }
}

.calendar__top-bar {
    display: -webkit-box;
    display: flex;
    -webkit-box-flex: 32px;
    flex: 32px 0 0;
}

.top-bar__days {
    width: 100%;
    padding: 0 5px;
    color: #2d4338;
    font-weight: 100;
    -webkit-font-smoothing: subpixel-antialiased;
    font-size: 18px;
}

.calendar__week {
    display: -webkit-box;
    display: flex;
    -webkit-box-flex: 1;
    flex: 1 1 0;
}

.calendar__day {
    display: -webkit-box;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    flex-flow: column wrap;
    -webkit-box-pack: justify;
    justify-content: space-between;
    width: 98%;
    padding: 0.5rem 0.2rem 0.2rem;
    cursor: pointer;
    background-color: #e0ebeb;
    border: 1px solid #d6d6c2;
}

.calendar__day.event .calendar__date,
.calendar__day.event .calendar__task {
    color: #4285f4;
}

.calendar__date {
    color: #040605;
    font-size: 14px;
    font-weight: 600;
    line-height: 0.7;
}

@media screen and (min-width: 55em) {
    .calendar__date {
        font-size: 14px;
    }
}

.calendar__week .inactive .calendar__date,
.calendar__week .inactive .task-count {
    color: #c6c6c6;
}

.calendar__week .today .calendar__date {
    color: #cc0000;
}

.calendar__task {
    color: #040605;
    display: -webkit-box;
    display: flex;
    font-size: 10px;
}

@media screen and (min-width: 55em) {
    .calendar__task {
        font-size: 11px;
    }
}

.calendar__task.calendar__task--today {
    color: #cc0000;
}

.calendar-select {
    padding: 8px 8px;
    border: none;
    border-radius: 4px;
    background-color: #b3b3b3;
}


/* CheckMark */

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #7ac142;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards
}

.checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 2% auto;
    box-shadow: inset 0px 0px 0px #7ac142;
    animation: fill_check .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards
}


/* Error Mark */

.errormark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #ff3333;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards
}

.errormark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 5% auto;
    box-shadow: inset 0px 0px 0px #ff3333;
    animation: fill_error .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both
}

.errormark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0
    }
}

@keyframes scale {

    0%,
    100% {
        transform: none
    }

    50% {
        transform: scale3d(1.1, 1.1, 1)
    }
}

@keyframes fill_check {
    100% {
        box-shadow: inset 0px 0px 0px 30px #7ac142
    }
}

@keyframes fill_error {
    100% {
        box-shadow: inset 0px 0px 0px 30px #ff3333
    }
}


/* LOGIN */

.login-dark {
    height: auto;
    background-size: cover;
    /*position: relative;*/
}

.login-dark form {
    max-width: 450px;
    width: 90%;
    background-color: #1e2833;
    padding: 50px;
    border-radius: 4px;
    transform: translate(-50%, -50%);
    position: absolute;
    top: 50%;
    left: 50%;
    color: #fff;
    box-shadow: 3px 3px 4px rgba(0, 0, 0, 0.2);
}

.login-dark .illustration {
    text-align: center;
    padding: 10px 0 5px;
    font-size: 50px;
    color: #fa6216;
}

.login-dark form .form-control {
    background: none;
    border: none;
    border-bottom: 1px solid #434a52;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    color: inherit;
}

.login-dark form .btn-primary {
    background: #fa6216;
    border: none;
    border-radius: 4px;
    padding: 11px;
    box-shadow: none;
    margin-top: 26px;
    text-shadow: none;
    outline: none;
}

.login-dark form .btn-primary:hover,
.login-dark form .btn-primary:active {
    background: #fa6216;
    outline: none;
}

.login-dark form .btn-primary:active {
    transform: translateY(1px);
}

.login-dark input[type=text] {
    width: 80%;
    margin: 0 auto;
}

.login-dark input[type=password] {
    width: 80%;
    margin: 0 auto;
}


/* SOMBRES */

.sombra4dp {
    box-shadow: 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12), 0 2px 4px -1px rgba(0, 0, 0, .2)
}

.credits {
    position: absolute;
    bottom: 15px;
    left: 0px;
    width: 100%;
    font-size: 14px;
}


/* Animated Icon 2*/

.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler-icon:focus {
    outline: none;
    box-shadow: none;
}

.animated-icon2 {
    width: 30px;
    height: 20px;
    position: relative;
    margin: 0px;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: .5s ease-in-out;
    -moz-transition: .5s ease-in-out;
    -o-transition: .5s ease-in-out;
    transition: .5s ease-in-out;
    cursor: pointer;
}

.animated-icon2 span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    border-radius: 9px;
    opacity: 1;
    left: 0;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: .25s ease-in-out;
    -moz-transition: .25s ease-in-out;
    -o-transition: .25s ease-in-out;
    transition: .25s ease-in-out;
}

.animated-icon1 span {
    background: #e65100;
}

.animated-icon2 span {
    background: #e3f2fd;
}

.animated-icon3 span {
    background: #f3e5f5;
}

.animated-icon2 span:nth-child(1) {
    top: 0px;
}

.animated-icon2 span:nth-child(2),
.animated-icon2 span:nth-child(3) {
    top: 10px;
}

.animated-icon2 span:nth-child(4) {
    top: 20px;
}

.animated-icon2.open span:nth-child(1) {
    top: 11px;
    width: 0%;
    left: 50%;
}

.animated-icon2.open span:nth-child(2) {
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
}

.animated-icon2.open span:nth-child(3) {
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

.animated-icon2.open span:nth-child(4) {
    top: 11px;
    width: 0%;
    left: 50%;
}

.checkbox-wrapper-1 *,
.checkbox-wrapper-1 ::after,
.checkbox-wrapper-1 ::before {
    box-sizing: border-box;
}

.checkbox-wrapper-1 [type=checkbox].substituted {
    margin: 0;
    width: 0;
    height: 0;
    display: inline;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.checkbox-wrapper-1 [type=checkbox].substituted+label:before {
    content: "";
    display: inline-block;
    vertical-align: top;
    height: 1.15em;
    width: 1.15em;
    margin-right: 0.6em;
    color: rgba(0, 0, 0, 0.275);
    border: solid 0.06em;
    box-shadow: 0 0 0.04em, 0 0.06em 0.16em -0.03em inset, 0 0 0 0.07em transparent inset;
    border-radius: 0.2em;
    background: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xml:space="preserve" fill="white" viewBox="0 0 9 9"><rect x="0" y="4.3" transform="matrix(-0.707 -0.7072 0.7072 -0.707 0.5891 10.4702)" width="4.3" height="1.6" /><rect x="2.2" y="2.9" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 12.1877 2.9833)" width="6.1" height="1.7" /></svg>') no-repeat center, white;
    background-size: 0;
    will-change: color, border, background, background-size, box-shadow;
    transform: translate3d(0, 0, 0);
    transition: color 0.1s, border 0.1s, background 0.15s, box-shadow 0.1s;
}

.checkbox-wrapper-1 [type=checkbox].substituted:enabled:active+label:before,
.checkbox-wrapper-1 [type=checkbox].substituted:enabled+label:active:before {
    box-shadow: 0 0 0.04em, 0 0.06em 0.16em -0.03em transparent inset, 0 0 0 0.07em rgba(0, 0, 0, 0.1) inset;
    background-color: #f0f0f0;
}

.checkbox-wrapper-1 [type=checkbox].substituted:checked+label:before {
    background-color: #3B99FC;
    background-size: 0.75em;
    color: rgba(0, 0, 0, 0.075);
}

.checkbox-wrapper-1 [type=checkbox].substituted:checked:enabled:active+label:before,
.checkbox-wrapper-1 [type=checkbox].substituted:checked:enabled+label:active:before {
    background-color: #0a7ffb;
    color: rgba(0, 0, 0, 0.275);
}

.checkbox-wrapper-1 [type=checkbox].substituted:focus+label:before {
    box-shadow: 0 0 0.04em, 0 0.06em 0.16em -0.03em transparent inset, 0 0 0 0.07em rgba(0, 0, 0, 0.1) inset, 0 0 0 3.3px rgba(65, 159, 255, 0.55), 0 0 0 5px rgba(65, 159, 255, 0.3);
}

.checkbox-wrapper-1 [type=checkbox].substituted:focus:active+label:before,
.checkbox-wrapper-1 [type=checkbox].substituted:focus+label:active:before {
    box-shadow: 0 0 0.04em, 0 0.06em 0.16em -0.03em transparent inset, 0 0 0 0.07em rgba(0, 0, 0, 0.1) inset, 0 0 0 3.3px rgba(65, 159, 255, 0.55), 0 0 0 5px rgba(65, 159, 255, 0.3);
}

.checkbox-wrapper-1 [type=checkbox].substituted:disabled+label:before {
    opacity: 0.5;
}

.checkbox-wrapper-1 [type=checkbox].substituted.dark+label:before {
    color: rgba(255, 255, 255, 0.275);
    background-color: #222;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xml:space="preserve" fill="rgba(34, 34, 34, 0.999)" viewBox="0 0 9 9"><rect x="0" y="4.3" transform="matrix(-0.707 -0.7072 0.7072 -0.707 0.5891 10.4702)" width="4.3" height="1.6" /><rect x="2.2" y="2.9" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 12.1877 2.9833)" width="6.1" height="1.7" /></svg>');
}

.checkbox-wrapper-1 [type=checkbox].substituted.dark:enabled:active+label:before,
.checkbox-wrapper-1 [type=checkbox].substituted.dark:enabled+label:active:before {
    background-color: #444;
    box-shadow: 0 0 0.04em, 0 0.06em 0.16em -0.03em transparent inset, 0 0 0 0.07em rgba(255, 255, 255, 0.1) inset;
}

.checkbox-wrapper-1 [type=checkbox].substituted.dark:checked+label:before {
    background-color: #a97035;
    color: rgba(255, 255, 255, 0.075);
}

.checkbox-wrapper-1 [type=checkbox].substituted.dark:checked:enabled:active+label:before,
.checkbox-wrapper-1 [type=checkbox].substituted.dark:checked:enabled+label:active:before {
    background-color: #c68035;
    color: rgba(0, 0, 0, 0.275);
}
/* ===== Restyling modern lleuger ===== */

:root {
    --app-bg: #f4f7fb;
    --app-bg-accent: #fff3eb;
    --app-surface: #ffffff;
    --app-surface-soft: #f8fafc;
    --app-border: #e4e9f2;
    --app-text: #1f2937;
    --app-text-soft: #6b7280;
    --app-primary: #f26a21;
    --app-primary-dark: #d95510;
    --app-success: #1f9d66;
    --app-danger: #d64545;
    --app-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --app-radius: 18px;
}

body,
.app-body,
.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(242, 106, 33, 0.10), transparent 25%),
        linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    color: var(--app-text);
    font-family: 'Ubuntu', sans-serif;
}

body {
    background-image: none;
}

h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    color: #162033;
}

p,
label,
span,
small,
div,
li,
td,
th {
    color: inherit;
}

.app-navbar,
.navbar.bg-dark {
    background: rgba(18, 24, 38, 0.92) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.navbar-nav {
    gap: 0.35rem;
}

.navbar .nav-link,
.navbar .dropdown-item {
    border-radius: 12px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.dropdown-menu {
    border: 1px solid var(--app-border);
    border-radius: 16px;
    box-shadow: var(--app-shadow);
    padding: 0.6rem;
}

.app-content {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

.page-header {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
    padding: 1.1rem 1rem 0.7rem;
    margin-bottom: 1.25rem;
}

.page-header hr,
.home-hero hr {
    border-top: 2px solid #edf1f7;
    opacity: 1;
}

.home-hero {
    max-width: 760px;
    margin: 1.5rem auto 1rem;
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
    border: 1px solid var(--app-border);
    border-radius: 28px;
    box-shadow: var(--app-shadow);
}

.home-hero--maintenance {
    max-width: 860px;
}

.home-hero__logo {
    width: 108px;
    max-width: 100%;
    border-radius: 24px;
    box-shadow: 0 8px 18px rgba(242, 106, 33, 0.16);
    margin-bottom: 1rem;
}

.home-hero__icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff0e7, #ffe1cf);
    color: var(--app-primary);
    font-size: 1.8rem;
}

.home-hero__eyebrow {
    color: var(--app-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.home-hero__title {
    font-size: clamp(1.8rem, 2.6vw, 2.6rem);
    margin-bottom: 0.35rem;
}

.home-hero__date {
    color: var(--app-text-soft);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.home-hero__actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.div-afegir,
.login-dark form,
.accordion-item,
.calendar-contain,
.alert,
.table-responsive,
#calendar_div {
    border-radius: var(--app-radius);
}

.div-afegir,
.table-responsive,
#calendar_div > .calendar-contain,
.accordion-item,
.alert.alert-danger,
.alert.alert-success,
.alert.alert-primary {
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
}

.div-afegir {
    background: var(--app-surface);
    padding: 1.25rem !important;
}

.form-control,
.form-select,
.input-group-text,
textarea {
    border-radius: 14px !important;
    border: 1px solid #dbe3ef !important;
    min-height: 48px;
    box-shadow: none !important;
}

textarea.form-control {
    min-height: 110px;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: rgba(242, 106, 33, 0.45) !important;
    box-shadow: 0 0 0 0.2rem rgba(242, 106, 33, 0.12) !important;
}

.input-group-text {
    background: #f8fafc;
    color: var(--app-primary-dark);
    font-weight: 700;
}

.form-check {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    padding: 0.65rem 0.8rem 0.65rem 2rem;
    margin-bottom: 0.55rem;
}

.form-check-input {
    margin-top: 0.35rem;
}

.btn {
    border-radius: 14px;
    font-weight: 700;
    padding: 0.7rem 1rem;
    border-width: 1px !important;
    box-shadow: none !important;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-success,
.app-btn-primary {
    background: linear-gradient(135deg, var(--app-primary), #ff8b4d) !important;
    border-color: var(--app-primary) !important;
    color: #fff !important;
}

.btn-primary {
    background: #233252 !important;
    border-color: #233252 !important;
}

.btn-info {
    background: #eef4ff !important;
    border-color: #cddaf3 !important;
    color: #28456e !important;
}

.btn-danger {
    background: #fff1f1 !important;
    border-color: #f1caca !important;
    color: #a33232 !important;
}

.btn-warning {
    background: #fff7e8 !important;
    border-color: #f0deb0 !important;
    color: #8a6614 !important;
}

.taula-alumnes,
.table {
    white-space: nowrap;
    font-size: 14px;
    vertical-align: middle;
    margin-bottom: 0;
}

.table thead.table-dark th {
    background: #1f2937 !important;
    border-color: #1f2937 !important;
    color: #fff;
}

.table.table-secondary,
.table.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #f8fafc;
}

.table > :not(caption) > * > * {
    padding: 0.85rem 0.7rem;
    border-bottom-color: #edf1f6;
}

.accordion-item {
    background: var(--app-surface);
    overflow: hidden;
    margin-bottom: 1rem;
}

.accordion-button {
    box-shadow: none !important;
    font-weight: 700;
}

.accordion-button:not(.collapsed) {
    color: #162033;
    background: #f8fafc;
}

.accordion-button:focus {
    border-color: transparent;
    box-shadow: none;
}

.login-page {
    min-height: calc(100vh - 90px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0.85rem 5.2rem;
}

.login-dark {
    width: 100%;
}

.login-dark form {
    max-width: 460px;
    width: 100%;
    background: rgba(20, 28, 45, 0.94);
    padding: 2rem 1.5rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
    transform: none;
    position: relative;
    top: auto;
    left: auto;
    color: #fff;
    margin: 0 auto;
}

.login-logo {
    width: 92px;
    border-radius: 22px;
    margin-bottom: 0.5rem;
    box-shadow: 0 10px 24px rgba(242, 106, 33, 0.22);
}

.login-title {
    font-size: 1.55rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.login-dark .illustration {
    padding: 0.5rem 0;
    font-size: 2.5rem;
    color: #ff9b61;
}

.login-dark form .form-control {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10) !important;
    color: #fff;
    width: 100%;
    margin: 0 auto 0.85rem;
}

.login-dark form .form-control::placeholder {
    color: rgba(255,255,255,0.65);
}

.login-dark form .btn-success {
    width: 100%;
    margin-top: 0.4rem;
}

.calendar-contain {
    background: rgba(250, 251, 253, 0.97);
    border: 1px solid #d8e0ea;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    border-radius: 20px;
    overflow: hidden;
}

.title-bar,
.calendar__days,
.calendar__sidebar {
    background: transparent;
}

.calendar__sidebar {
    background: linear-gradient(180deg, #f5f7fb, #edf2f7);
    border-right: 1px solid #d8e0ea;
}

.title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: nowrap;
    padding: 0.75rem 0.75rem 0.2rem;
}

.title-bar__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
}

.title-bar__prev,
.title-bar__next {
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: 10px;
    background: #edf2f7;
    border: 1px solid #d6deea;
    color: #22324f;
    font-size: 1.3rem;
    flex: 0 0 auto;
}

.title-bar__prev i,
.title-bar__next i {
    margin: 0;
    line-height: 1;
}

.calendar-select {
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    padding: 0.35rem 0.6rem;
    background: #fff;
    color: #22324f;
    font-weight: 700;
    min-height: 36px;
    height: 36px;
    font-size: 0.92rem;
}

.title-bar__controls .btn {
    min-height: 36px;
    height: 36px;
    padding: 0.35rem 0.8rem;
    font-size: 0.92rem;
    margin: 0;
}

.calendar__day {
    background-color: #f8fafd;
    border: 1px solid #e6edf5;
    border-radius: 10px;
    margin: 2px;
    min-height: 68px;
}

.calendar__day:hover {
    background: #f1f6fb;
}

.calendar__day.event .calendar__date,
.calendar__day.event .calendar__task {
    color: #1f6fd6;
}

.calendar__day.today {
    background: linear-gradient(180deg, #fff1e6, #ffe4d0);
    border-color: #f6c8a8;
}

.calendar__task {
    margin-top: 0.45rem;
    color: #5f6b7a;
    font-size: 0.78rem;
    line-height: 1.25;
}

.sidebar__heading {
    color: #162033;
    font-size: 1.35rem;
}

.sidebar__list-item {
    font-size: 0.95rem;
}

#divAlerta,
#alerta_existent,
#alerta_dia {
    border-radius: 14px;
}

.credits {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    width: 100%;
    font-size: 0.82rem;
    color: #637084;
    margin: 0;
    padding: 0.45rem 0.75rem calc(0.45rem + env(safe-area-inset-bottom));
    background: rgba(231, 236, 243, 0.92);
    border-top: 1px solid #cfd8e3;
    backdrop-filter: blur(6px);
}

/* ===== Ajust compacte i sobri ===== */
body,
.app-body,
.login-body {
    background:
        radial-gradient(circle at top left, rgba(242, 106, 33, 0.04), transparent 18%),
        linear-gradient(180deg, #eceff4 0%, #e3e8ef 100%) !important;
}

.app-content {
    padding-top: 0.9rem;
    padding-bottom: 3.8rem;
}

.app-navbar,
.navbar.bg-dark {
    padding-top: 0.7rem !important;
    padding-bottom: 0.7rem !important;
}

.app-navbar .container,
.navbar.bg-dark .container {
    align-items: center;
}

.app-navbar .navbar-collapse,
.navbar.bg-dark .navbar-collapse {
    margin-top: 0.4rem;
    padding-top: 0.35rem;
}

.navbar-nav {
    width: 100%;
}

.navbar-nav .nav-item,
.navbar .dropdown {
    width: 100%;
}

.navbar-nav .nav-link,
.navbar .dropdown-item {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    padding: 0.72rem 1rem !important;
    text-align: left !important;
}

.page-header {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0.1rem 0 0.35rem !important;
    margin-bottom: 0.6rem !important;
}

.page-header h2,
.page-header h3 {
    font-size: 1.35rem !important;
    margin-bottom: 0 !important;
}

.page-header hr,
.page-header .mt-1,
.page-header .mb-3 {
    display: none !important;
}

.home-hero,
.home-hero--maintenance {
    background: rgba(250, 251, 253, 0.94) !important;
    border-color: #d7dee8 !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06) !important;
}

.div-afegir {
    background: rgba(250, 251, 253, 0.97) !important;
    border: 1px solid #d8e0ea !important;
    border-radius: 16px !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05) !important;
}

.table-responsive {
    border-radius: 14px !important;
    box-shadow: none !important;
    border: 1px solid #dde3ec !important;
    background: #f9fbfd !important;
}

.taula-alumnes,
.table {
    font-size: 12px !important;
}

.table > :not(caption) > * > * {
    padding: 0.45rem 0.55rem !important;
    vertical-align: middle !important;
}

.table thead.table-dark th {
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
}

.taula-alumnes td.text-center,
.taula-alumnes th.text-center {
    text-align: center !important;
}

.taula-alumnes .btn,
.table .btn.btn-sm {
    width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

.taula-alumnes .btn i,
.table .btn.btn-sm i {
    margin: 0 !important;
    line-height: 1 !important;
    font-size: 0.9rem;
}

.accordion-item {
    margin-bottom: 0.75rem !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
}

.accordion-button {
    padding: 0.75rem 0.9rem !important;
}

@media (max-width: 768px) {
    .navbar-nav .nav-link,
    .navbar .dropdown-item {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .page-header {
        padding-bottom: 0.2rem !important;
    }

    .page-header h2,
    .page-header h3 {
        font-size: 1.25rem !important;
    }

    .login-page {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .login-dark form {
        max-width: 420px;
        padding: 1.75rem 1.1rem;
        border-radius: 24px;
    }

    .title-bar {
        align-items: flex-start;
        gap: 0.4rem;
        padding: 0.7rem 0.7rem 0.15rem;
    }

    .title-bar__controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .title-bar__controls .calendar-select {
        flex: 1 1 110px;
    }

    .title-bar__controls .btn {
        flex: 0 0 auto;
    }

    .title-bar__prev,
    .title-bar__next {
        width: 34px;
        height: 34px;
        min-height: 34px;
        font-size: 1.2rem;
    }
}

/* ===== Ajust de contrast global ===== */
:root {
    --app-text: #182231;
    --app-text-soft: #556273;
    --app-border: #c7d1de;
    --app-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

body,
.app-body,
.login-body {
    background:
        radial-gradient(circle at top left, rgba(242, 106, 33, 0.05), transparent 18%),
        linear-gradient(180deg, #e6ebf2 0%, #dce3ec 100%) !important;
}

.home-hero,
.home-hero--maintenance,
.div-afegir,
.table-responsive,
.accordion-item,
.calendar-contain,
.page-header {
    border-color: #c9d3df !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.09) !important;
}

.home-hero,
.home-hero--maintenance,
.div-afegir,
.table-responsive,
.accordion-item,
.calendar-contain {
    background: rgba(248, 250, 252, 0.98) !important;
}

.table-responsive {
    background: #f3f6fa !important;
}

.accordion-button {
    background: #eef3f8 !important;
    color: #1f2c40 !important;
}

.accordion-button.collapsed {
    background: #f4f7fb !important;
}

.table thead.table-dark th {
    background: #253144 !important;
    border-color: #253144 !important;
}

.table > :not(caption) > * > * {
    border-bottom-color: #d7e0ea !important;
}

.calendar-contain {
    background: #f8fafc !important;
}

.calendar__sidebar {
    background: linear-gradient(180deg, #e8eef5, #dfe7f0) !important;
    border-right: 1px solid #c7d1de !important;
}

.calendar__days {
    background: #f8fafc !important;
}

.title-bar {
    background: #f3f6fa !important;
    border-bottom: 1px solid #d8e0ea;
}

.title-bar__prev,
.title-bar__next {
    background: #e5ebf3 !important;
    border-color: #c4cfdd !important;
    color: #1f2f46 !important;
}

.calendar-select {
    background: #ffffff !important;
    border-color: #c7d3e0 !important;
    color: #21324c !important;
}

.calendar__day {
    background-color: #eef3f8 !important;
    border: 1px solid #d6dee8 !important;
}

.calendar__day.no-event {
    background-color: #f4f7fb !important;
}

.calendar__day.event {
    background: #e8f1ff !important;
    border-color: #bcd2f7 !important;
}

.calendar__day.today {
    background: linear-gradient(180deg, #ffe7d6, #ffd8bd) !important;
    border-color: #f0b78d !important;
}

.calendar__date {
    color: #1d2a3d !important;
}

.calendar__task {
    color: #4d5b6d !important;
}

.sidebar__heading {
    color: #152033 !important;
}

/* ===== Unificació de paleta ===== */
body,
.app-body,
.login-body {
    background:
        linear-gradient(180deg, #e7ecf3 0%, #e1e7f0 100%) !important;
}

.page-header {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}

.home-hero,
.home-hero--maintenance,
.div-afegir,
.table-responsive,
.accordion-item,
.calendar-contain {
    background: #f7f9fc !important;
    border-color: #cfd8e3 !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07) !important;
}

.table-responsive,
.accordion-button,
.title-bar,
.calendar__days {
    background: #f7f9fc !important;
}

.calendar__sidebar {
    background: #eef3f8 !important;
    border-right: 1px solid #d5dde8 !important;
}

.title-bar {
    border-bottom: 1px solid #dde4ed !important;
}

.title-bar__prev,
.title-bar__next {
    background: #ebf0f6 !important;
    border-color: #ccd6e2 !important;
}

.calendar-select {
    background: #ffffff !important;
    border-color: #cfd8e3 !important;
}

.calendar__day,
.calendar__day.no-event {
    background: #f5f8fb !important;
    border: 1px solid #dbe3ec !important;
}

.calendar__day.inactive {
    background: #eef3f8 !important;
    opacity: 0.9;
}

.calendar__day.event {
    background: #edf4ff !important;
    border-color: #bfd2ef !important;
}

.calendar__day.today {
    background: #ffe7d6 !important;
    border-color: #f1c19e !important;
}

.calendar__task {
    color: #5c6978 !important;
}

/* ===== Calendari més integrat ===== */
.calendar-contain,
.calendar__days,
.title-bar,
.calendar__sidebar {
    background: #f6f8fb !important;
}

.calendar__sidebar {
    border-right: 0 !important;
    padding-top: 0.2rem;
}

.sidebar__heading {
    margin: 0 !important;
    padding: 0.95rem 1rem 0.8rem !important;
    background: #f6f8fb !important;
    border-bottom: 1px solid #dde4ed;
}

.calendar__sidebar .accordion {
    padding-top: 0.5rem;
}

.title-bar {
    border-top: 1px solid #dde4ed;
}

.calendar__day {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.45rem;
}

.calendar__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0 0.42rem;
    border-radius: 999px;
    background: #d9e9ff;
    color: #1d5fbf;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.calendar__count--today {
    background: #ffd7bf;
    color: #b55312;
}

.calendar__task {
    display: none !important;
}

/* ===== Ajust específic nou registre ===== */
.registre-card {
    max-width: 520px;
}

.registre-form {
    display: block;
}

.registre-form .input-group {
    margin-bottom: 0.55rem !important;
    align-items: center;
}

.registre-form .input-group-text {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 10px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.35rem;
    background: #eef3f8 !important;
    border: 1px solid #d5deea !important;
}

.registre-form .form-control,
.registre-form .form-select {
    min-height: 38px !important;
    height: 38px;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.registre-form textarea.form-control {
    min-height: 72px !important;
    height: 72px;
}

.registre-form .alert {
    margin-bottom: 0.55rem !important;
    font-size: 0.78rem;
}

.registre-menjar-row {
    margin-top: 0.2rem;
}

.registre-col-title {
    font-size: 0.92rem;
    margin-bottom: 0.2rem;
}

.registre-col-title hr {
    display: none;
}

.registre-col .form-check {
    padding: 0.45rem 0.35rem 0.45rem 1.45rem;
    margin-bottom: 0.35rem;
    min-height: 0;
}

.registre-col .form-check-input {
    margin-top: 0.22rem;
    margin-left: -1rem;
}

.registre-col .form-check-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-size: 0.78rem;
    text-align: center;
    line-height: 1.15;
}

.registre-col .form-check-label img {
    width: 12px !important;
}

.registre-extra {
    margin-top: 0.15rem;
}

.registre-migdiada {
    background: #f6f8fb;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
}

.registre-migdiada .form-check-input {
    margin-top: 0.25rem;
}

.registre-migdiada .form-label {
    margin-bottom: 0;
    font-size: 0.92rem;
    line-height: 1.2;
}

.registre-migdiada small {
    display: block;
    margin-top: 0.2rem;
    color: #667487;
}

.registre-nota {
    margin-top: 0.45rem;
}

.registre-submit-wrap {
    margin-top: 0.2rem;
}

.registre-alerta {
    width: 100% !important;
    margin: 0 0 0.55rem 0 !important;
}

.registre-submit {
    width: 100%;
    min-height: 42px !important;
    height: 42px;
}

.page-header + .registre-card {
    margin-top: 0.15rem !important;
}

@media (max-width: 768px) {
    .registre-card {
        padding: 0.8rem !important;
    }

    .registre-form .input-group-text {
        width: 32px;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
        margin-right: 0.3rem;
    }

    .registre-col-title {
        font-size: 0.84rem;
    }

    .registre-col .form-check {
        padding: 0.38rem 0.22rem 0.38rem 1.2rem;
        border-radius: 10px;
    }

    .registre-col .form-check-label {
        font-size: 0.74rem;
        gap: 0.15rem;
    }

    .registre-col .form-check-label img {
        width: 11px !important;
    }

    .registre-migdiada {
        padding: 0.5rem 0.6rem;
    }

    .registre-form textarea.form-control {
        min-height: 64px !important;
        height: 64px;
    }
}

/* ===== Millora radios nou registre ===== */
.registre-alerta-classes {
    border: 1px solid #f1d08b !important;
    background: #fff6de !important;
    color: #7a5a11 !important;
}

.registre-col .form-check {
    position: relative;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    margin-bottom: 0.38rem;
}

.registre-col .form-check-input {
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 !important;
    accent-color: #f26a21;
    z-index: 2;
}

.registre-col .form-check-label {
    width: 100%;
    min-height: 40px;
    padding: 0.55rem 0.5rem 0.55rem 1.7rem;
    border: 1px solid #d8e0ea;
    border-radius: 12px;
    background: #f9fbfd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.registre-col .form-check-input:checked + .form-check-label {
    background: #fff0e7;
    border-color: #f0ba95;
    color: #8f4c1b;
    font-weight: 700;
}

.registre-col .form-check-label:hover {
    background: #f3f7fb;
}

@media (max-width: 768px) {
    .registre-col .form-check-input {
        left: 0.5rem;
    }

    .registre-col .form-check-label {
        min-height: 38px;
        padding: 0.45rem 0.35rem 0.45rem 1.45rem;
    }
}

/* ===== Modal de confirmació unificat ===== */
.app-confirm-modal {
    border: 1px solid #d7dee8;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.app-confirm-modal .modal-header {
    background: #f7f9fc;
    border-bottom: 1px solid #e1e7ef;
    padding: 1rem 1rem 0.9rem;
}

.app-confirm-modal .modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1c2738;
}

.app-confirm-modal .modal-body {
    padding: 1rem;
    color: #334155;
}

.app-confirm-modal .modal-footer {
    border-top: 1px solid #e1e7ef;
    background: #fafbfd;
    padding: 0.85rem 1rem 1rem;
}

/* ===== Taula de registres dins calendari ===== */
.registres-calendari-table {
    font-size: 0.85rem;
}

.registres-calendari-table thead th {
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.5rem;
    vertical-align: middle;
}

.registres-calendari-table tbody td {
    vertical-align: middle;
    padding: 0.5rem;
    font-size: 0.85rem;
}

.registres-calendari-table .registre-nom {
    font-weight: 500;
    color: #334155;
}

.registres-calendari-table .registre-icons img {
    width: 18px;
    margin: 0 2px;
}

.registres-calendari-table .registre-icons .fa-bed {
    font-size: 14px;
    margin-left: 4px;
}

.registres-calendari-table .registre-edit {
    white-space: nowrap;
    width: 1%;
}

.registres-calendari-table .btn-outline-primary {
    padding: 0.2rem 0.5rem;
    font-size: 0.85rem;
    line-height: 1.2;
    border-color: #6b9edb;
    color: #3a72b5;
}

.registres-calendari-table .btn-outline-primary:hover {
    background-color: #5a8ad1;
    border-color: #5a8ad1;
    color: white;
}

@media (max-width: 768px) {
    .registres-calendari-table {
        font-size: 0.8rem;
    }

    .registres-calendari-table td {
        padding: 0.35rem 0.4rem;
    }

    .registres-calendari-table .registre-icons img {
        width: 16px;
    }

    .registres-calendari-table .btn-outline-primary {
        padding: 0.15rem 0.4rem;
        font-size: 0.8rem;
    }
}

/* ===== Botó toggle calendari ===== */
#toggleCalendarBtn {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    border-color: #94a3b8;
    color: #475569;
    background: white;
    transition: all 0.2s ease;
}

#toggleCalendarBtn:hover {
    background-color: #f1f5f9;
    border-color: #64748b;
    color: #334155;
}

#toggleCalendarBtn i {
    font-size: 1rem;
}

.sidebar__heading {
    color: #1e293b;
    font-weight: 600;
}
