body {
	max-width: 480px;
	min-width: 320px;
	padding: 0;

    background-size: 100%;
    background-position: 20% 2em;
}

input[type=text], input[type=email], input[type=password] {
	width: auto;
}

fieldset {
	width: 100%;
}

/* Solo gli input dentro ai form */
fieldset input[type=text], fieldset input[type=email], fieldset input[type=password], div.sub-content > div > input, fieldset textarea, fieldset select {
	width: 100%;
	/* Permette di impostare una width al 100% senza sforare il padding del container */
	box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

fieldset label {
	display: block;
	float: none;
	width: auto;
}

fieldset input[type=checkbox] + label {
	display: inline-block;
}

/* SUB CONTENT */

div.sub-content > div.list-header > input:not([type="checkbox"]) {
	float: none;
	width: 100%;
	margin-top: 0;
}

div.sub-content > div.sort-buttons {
	overflow-x: auto;
    margin-top: 1em;
	clear: both;
}

div.sub-content > div.sort-buttons > span {
	float: left;
	line-height: 1.95em;
	margin-right: 0.5em;
}

div.sub-content > div.sort-buttons > ul {
	display: block;
	white-space: nowrap;
}

/* RAPID LINKS */

div.content > div.rapid-links {
	display: none;
}

/* FOOTER */

.footer {
	margin-bottom: 6.5em;
    padding-bottom: 5em;
}

/* LANGUAGES */

ul#languages_list {
	bottom: 0.35em;
}

/* ACCOUNT */

div.account > div, div.account > div.profile-actions, div.account > div.domotic-services {
	width: 100%;
}

div.account div.company-online ul:first-of-type li {
	min-width: 35%;
}

div.account > p {
	text-align: center;
}

div.account fieldset:not(.lapis-logs) > p > span:nth-child(1), div.user fieldset:not(.lapis-logs) > p > span:nth-child(1) {
	min-width: 0;
	display: inline;
	margin-right: 0.2em;
}

/* FORM USER */

form.form_user div.avatars img {
	width: 42px;
}

form.form_user img#current_custom_icon {
	display: block;
	margin: 1em auto 0.2em auto;
}

/* USER SESSIONS */

div.user_session fieldset input {
	width: inherit;
}

/* RESET PASSWORDS */

div.reset_passwords fieldset > div {
	text-align: center;
}

div.reset_passwords input[type=submit] {
	margin-top: 1em;
}

form.form_reset_password fieldset label {
	float: none;
	width: auto;
}

form.form_reset_password fieldset input[type=email] {
	width: 100%;
}

/* ACCESS DENIED */

div.access_denied > div {
	min-height: 6em;
}

div.access_denied img {
    max-width: 70px;
    max-height: 70px;
    margin: 1.5em;
}

div.access_denied p {
	margin-top: 1.5em;
}

div.access_denied a {
	display: block;
	margin-bottom: 1em;
}

/* ERRORS */

div.errors > div {
	min-height: 6em;
}

div.errors img {
    max-width: 70px;
    max-height: 70px;
    margin: 1.5em;
}

div.errors p {
	margin-top: 1.5em;
}

div.errors a {
	display: block;
	margin-bottom: 1em;
}