:root {
    --color-light-cyan: #b3e6e6;
    --color-blue: #aade33;
    --color-dark-cyan: #363830;
    --color-very-dark-cyan: #25424d;
    --color-gray-lime: #d0d3d0;
    --color-text-primary: #555555;
    --color-text-secondary: #989898;
    --color-very-light-cyan: #f2f5f6;
    --color-bg-light-gray: #dfdfdf;
    --color-success: #6b9d38;
    --color-danger: #de7f7f;
    --color-primary: #84BD00;
    --color-secondary: #c1d979;
    --color-text-1: #333;
    --color-text-3: #d0d0d0;
    --color-focus: #4d90fe;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    box-sizing: border-box;
    font-family: Segoe UI, Open Sans, Arial, sans-serif;
    /*margin-top: 2rem;*/
}

.background-cyan {
    background: linear-gradient(to right, var(--color-light-cyan), var(--color-blue));
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

.dashboard {
    display: grid;
    grid-gap: .375rem;
    box-shadow: 0 10px 30px 0 rgba(0,0,0,.3);
    border-radius: .5rem;
    background: linear-gradient(to right, rgba(0,0,0,.15) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,.15) 100%);
}

.dashboard-header {
    background-color: var(--color-dark-cyan);
    color: #fff;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    border-top-left-radius: .5rem;
    border-top-right-radius: .5rem;
    grid-row: 1;
    grid-column: 1/4;
}

.dashboard-header__title {
    font-size: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-right: auto;
}

.dashboard-card {
    background-color: var(--color-very-light-cyan);
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.dashboard-card:last-child {
    border-bottom-left-radius: .5rem;
    border-bottom-right-radius: .5rem;
}

.dashboard-card__title {
    text-transform: uppercase;
    color: var(--color-text-secondary);
    font-size: .75rem;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
}

.dashboad-card__content {
    flex: 1;
    display: flex;
    flex-direction: row;

}

.dashboard-card__card-piece {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    flex-direction: column;
}

.dashboard-card__action {
    flex: 0 0 100%;
}

.dashboard-card__link {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: .825rem;
    /*text-align: right;*/
    align-self: flex-end;
    /*margin-left: auto;*/
    padding: .75rem 1rem;
    transition: background-color .25s;
    user-select: none;
}

.dashboard-card__link:hover {
    background-color: var(--color-bg-light-gray);
}

.dashboard-card__link .fa {
    margin-left: .625rem;
    font-weight: 600;
    font-size: 112.5%;
}

.dashboard-card__title .wi,
.dashboard-card__title .fa {
    font-size: 250%;
    margin-right: .75rem;
}

.status {
    flex: 1;
    text-align: center;
}

.status__icon {
    font-size: 250%;
}

.status__text {
    text-transform: uppercase;
}

.status_success {
    color: var(--color-success);
}

.status_danger {
    color: var(--color-danger);
}

.weather-days {
    flex: 1;
    display: flex;
    margin: 0 1rem;
}

.weather-days__item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
}

.weather-days__item:first-child .weather-days__title {
    font-size: 1.625rem;
    line-height: 1;
}

.weather-days__item:first-child .weather-days__icon {
    font-size: 450%;
}

.weather-days__item:first-child .weather-days__humidity {
    font-size: 1rem;
}

.weather-days__item:first-child .weather-days__humidity:before {
    content: 'Hum: ';
}


.weather-days__humidity {
    color: var(--color-gray-lime);
    font-size: .75rem;
    /*padding: .5rem;*/
}

.weather-days__humidity:after {
    content: 'mm';
}

.weather-days__title {
    color: var(--color-text-primary);
    font-size: 1.25rem;
    /*line-height: 1.5rem;*/
    text-transform: uppercase;
    line-height: 1.875rem;
    flex: 0 0 2rem;
    /*padding: .5rem;*/
}

.weather-days__icon {
    font-size: 350%;
    color: var(--color-secondary);
    /*padding: .5rem;*/
}

.temperature-stats {
    flex: 1;
    display: flex;
}

.stats__item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
}

.stats__title {
    color: var(--color-text-primary);
    font-size: 1.5rem;
    line-height: 1;
    /*line-height: 1.5rem;*/
    text-transform: uppercase;
    flex: 0 0 2rem;
    /*padding: .5rem;*/
}

.stats__icon {
    font-size: 200%;
    color: var(--color-secondary);
}

.stats__measure {
    color: var(--color-very-dark-cyan);
    font-weight: 100;
    display: flex;
}

.stats__value {
    font-size: 4rem;
}

.stats__unit {
    /*display: */
    font-size: 1.75rem;
    position: relative;
}

.stats__unit_celsius {
    margin-top: 1rem;
    margin-left: .5rem;
}

.stats__unit_meter {
    margin-left: .25rem;
    margin-top: .75rem;
}

.stats__unit_power {
    margin-left: .5rem;
    margin-top: .75rem;
}

.stats__unit_celsius:before {
    content: 'o';
    font-size: .75rem;
    position: absolute;
    top: .125rem;
    left: -.375rem;
}

.stats__unit_meter:after {
    content: '3';
    font-size: .75rem;
    position: absolute;
    top: .375rem;
    right: -.375rem;
}

.light-switches {
    display: flex;
    flex-wrap: wrap;
    height: 100%;
    margin-bottom: 2rem;
}

.switch {
    display: flex;
    width: 200px;
    justify-content: space-between;
    align-items: center;
    flex: 1 0 50%;
    padding: .5rem 9%;
}

.switch__name {
    color: var(--color-very-dark-cyan);
    font-weight: 500;
    font-size: 1.125rem;
}

.switch__input {
    opacity: 0;
}

.switch__label {
    background-color: #8A8D8F;
    height: 1rem;
    width: 4rem;
    border-radius: 1rem;
    transition: background-color .3s;
    position: relative;
    cursor: pointer;
}

.switch__label:before {
    content: '';
    background-color: #fff;
    border: 1px solid #e1e3e3;
    border-radius: 50%;
    width: 1.75rem;
    height: 1.75rem;
    top: -0.375rem;
    left: 0;
    position: absolute;
    transition: left .3s;
    box-shadow: 0 0 2px 0 rgba(220,220,220,.75);
}

.switch__input:focus~.switch__label {
    outline: var(--color-focus) auto 10px;
}
.switch__input:checked~.switch__label {
    background-color: #84BD00;
}
.switch__input:checked~.switch__label:before {
    left: 2.25rem;
}

.dashboard {
    grid-template-columns: repeat(3, 1fr);
}
.weather {
    grid-row: 2;
    grid-column: 1/3;
}
.temperature {
    grid-row: 2;
    grid-column: 3;
}
.wifi {
    grid-row: 3;
    grid-column: 1;
}
.alarm {
    grid-row: 4;
    grid-column: 1;
}
.light {
    grid-row: 3/5;
    grid-column: 2/4;
}
.power {
    grid-row: 5;
    grid-column: 1/4;
}

@media (max-width: 992px) {
    .dashboard {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    .dashboard-header {
        grid-column: 1/3;
    }
    .weather {
        grid-row: 2;
        grid-column: 1/3;
    }
    .temperature {
        grid-row: 3/5;
        grid-column: 1;
    }
    .wifi {
        grid-row: 3;
        grid-column: 2;
    }
    .alarm {
        grid-row: 4;
        grid-column: 2;
    }
    .light {
        grid-row: 5;
        grid-column: 1/3;
    }
    .power {
        grid-row: 6;
        grid-column: 1/3;
    }
    .light-switches:last-child {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .wi {
        font-size: 70%;
    }
    .dashboard {
        grid-template-columns: 1fr;
    }
    .dashboard-header {
        grid-column: 1;
    }
    .weather {
        grid-row: 2;
        grid-column: 1;
    }
    .temperature {
        grid-row: 3;
        grid-column: 1;
    }
    .wifi {
        grid-row: 4;
        grid-column: 1;
    }
    .alarm {
        grid-row: 5;
        grid-column: 1;
    }
    .light {
        grid-row: 6;
        grid-column: 1;
    }
    .power {
        grid-row: 7;
        grid-column: 1;
    }
    .power .dashboard-card__card-piece {
        flex-basis: 100%;
    }
    .power .dashboard-card__card-piece:not(:last-child) {
        margin-bottom: 1rem;
        border-bottom: 2px solid var(--color-text-3);
    }
    .power .dashboad-card__content {
        flex-wrap: wrap;
    }
    .switch_order-1 {
        order: 1;
    }
    .switch_order-2 {
        order: 2;
    }
    .switch {
        flex: 1 0 100%;
    }
    .switch__label {
        margin-right: 0;
    }    
}