/***** Defaults *****/
html                 { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }

html, body, div, form, ul, li {
  padding: 0;
  margin: 0;
}

img {
  border: none;
}

ul, li {
  list-style-type: none;
}

a, area, button, label, .pointer, input[type=submit], input[type=reset], select {
  cursor: pointer;
}

a[href^="mailto:"]:before {
  content: "\2709";
  margin-right: 5px;
}

a[href^="tel:"]:before {
  content: "\260e";
  margin-right: 5px;
}

/**
  Fonts courtesy of Google
  https://fonts.google.com/specimen/Source+Sans+Pro
  https://fonts.google.com/specimen/Source+Code+Pro
*/
@font-face {
  font-family: "SourceSans";
  src: url("./fonts/SourceSansPro-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "SourceSans";
  src: url("./fonts/SourceSansPro-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "SourceSans";
  src: url("./fonts/SourceSansPro-Italic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "SourceCode";
  src: url("./fonts/SourceCodePro-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "SourceCode";
  src: url("./fonts/SourceCodePro-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "SourceCode";
  src: url("./fonts/SourceCodePro-Italic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}

/* Misc defaults */
.help              { cursor: help; }
.clear             { clear: both; }
.hidden            { display: none; }
.invisible         { visibility: hidden; }
.price             { text-align: right; }
.okay              { color: green; }
.not_okay          { color: #999; }
.unimportant       { color: #bbb; }
.bold              { font-weight: bold; }
.status_viewed     { color: green; }
.status_not_viewed { color: red; }
.breakable         { word-break: break-all; overflow-wrap: break-word; }

.code {
  padding: 1px 3px;
  border: 1px dotted #666;
  background-color: #ccc;
  font-family: "SourceCode";
  border-radius: 5px;
  line-height: 2em;
}

p { margin-block-start: 0; margin-top: 0; }

p.code, div.code {
  margin: 5px 0 5px 0;
}

.required {
  color: red;
  font-weight: bold;
}

.required select, select.required, .required textarea, textarea.required {
  border-color: red !important;
}

.required input, input.required  {
  border-color: red !important;
  outline: 2px solid #f00;
}

table, td, tr  { padding: 2px 3px 3px 2px; }
table.fullsize { width: 100%; }
th             { text-align: left; font-weight: normal; }
th, td         { vertical-align: middle; }
td.checkbox    { padding-right: 0.5em; background: url(../img/layout/td_checkbox.png) bottom left repeat-y; }
td.img         { width: 150px; text-align: center; }

hr {
  background-color: #d4d4d4;
  height: 1px;
  border: 0;
  clear: both;
}

hr.medium {
  background-color: #e5e5e5;
  box-shadow: 0 1px #f6f6f6;
}

h1, h2, h3, h4, p {
  margin: 0;
  padding: 3px 0 3px 0;
}

body     { font-size: 14pt; font-family: "SourceSans", "Lucida Sans Unicode", Helvetica, Arial, sans-serif; }
button   { font-size: inherit; font-family: inherit; }
/* select   { font-size: inherit; font-family: inherit; } */
textarea { font-size: inherit; font-family: inherit; color: inherit; }
h1       { font-size: 24pt; font-weight: normal; }
h2       { font-size: 22pt; font-weight: normal; }
h3       { font-size: 20pt; }
h4       { font-size: 18pt; }
p        { padding-bottom: 0.5em; }

/* Prevent Safari/Webkit default styling and inherit font properties */
input[type=submit], input[type=reset] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

input {
  font-size: inherit;
  font-family: inherit;
  background-color: inherit;
}

/* Make li's appear in a row next to each other */
ul.row li {
  float: left;
}

/* ULs with nicely separated list items */
ul.shiny {
  background: #fff;
  padding: 0.5em;
  border: 2px solid #878787;
  border-radius: 5px;
}

ul.shiny li:not(:last-child) {
  padding-bottom: 0.5em;
  margin-bottom: 0.5em;
  border-bottom: 1px solid #878787;
}

ul.grid li                 { padding: 0.2em; border-radius: 3px; }
ul.grid li:nth-child(odd)  { background-color: #efefef; }
ul.grid li:nth-child(even) { background-color: #fff; }

/* Link styling */
a         { color: #333; text-decoration: none; }
a:link    { color: #333; }
a:visited { color: #333; }
a:hover   { color: #d50c2f; }
a:focus   { color: #d50c2f; }
a:active  { color: #d50c2f; }
a.active  { color: #d50c2f; }

div.content a:not([class])         { color: #346dff; text-decoration: none; }
div.content a:not([class]):link    { color: #346dff; }
div.content a:not([class]):visited { color: #346dff; }
div.content a:not([class]):hover   { color: #d50c2f; }
div.content a:not([class]):focus   { color: #d50c2f; }
div.content a:not([class]):active  { color: #d50c2f; }
div.content a:not([class]).active  { color: #d50c2f; }

img.datepicker {
  position: relative;
  top: 3px;
  cursor: pointer;
}

abbr {
  text-decoration: none;
  cursor: help;
}

/* form element defaults */
input, select, button, textarea {
  outline: none;
}

textarea {
  width: 80%;
  height: 10em;
}

input[type=text] { width: 50%; min-width: 15em; }
input.short      { width: 10% !important; min-width:  5em; }
input.medium     { width: 50%; min-width: 30em; }
input.long       { width: 100%; }
input.date       { width: 10% !important; min-width: 6em; }
input.datetime   { width: 12em; }

textarea.medium  { height: 15em; }
textarea.long    { width: 100%; height: 20em; }

fieldset {
  border: 1px solid #c4c4c4;
  border-radius: 5px;
  margin: 0;
  margin-bottom: 1em;
}

legend {
  padding-left: 3px;
  padding-right: 5px;
  font-weight: bold;
  color: #878787;
}


/* Buttons and Input elements */
input, textarea {
  border: 2px solid #878787;
}

a.button, button, input[type=text], input[type=password], input[type=submit], input[type=reset], select, textarea {
  display: inline-block;
  margin-right: 0.5em;
  margin-bottom: 0.5em;
  padding: 0 0.5em;
  color: #1d1d1b;
  border-radius: 5px;
}

input[type=text], input[type=password], textarea {
  padding: 0 0.25em;
}

input[type=radio], input[type=checkbox] {
  -webkit-appearance: auto;
  -moz-appearance: none;
  appearance: auto;
}

input:focus,
input:hover,
input:active,
select:focus,
select:hover,
select:active,
textarea:focus,
textarea:hover,
textarea:active {
  border-color: #346dff;
}

input.w_legend {
  border: 2px solid transparent !important;
}

input[disabled], select[disabled], textarea[disabled] {
  cursor: not-allowed;
  border-color: #666;
}

a.button.disabled, button.disabled {
  cursor: not-allowed;
  border-color: #666;
  color: #878787;
}

a.button, button, input[type=submit], input[type=reset], select {
  border: 2px solid #d50c2f;
  text-align: center;
  color: #d50c2f;
  background-color: #fff;
  padding-top: 12px;
  padding-bottom: 12px;
}

select {
  border-width: 2px;
  border-color: #878787;
  padding-top: 15px;
  padding-bottom: 15px;
}

a.button.submit, button.submit, input.submit {
  background-color: #1fba81;
  color: #fff;
  border-color: transparent;
}

a.button.continue, button.continue, input.continue {
  border: 2px solid #346dff;
  color: #346dff;
  background-color: #fff;
}

a.button.inactive {
  color: #fff;
  background-color: #999999;
}

input[type=reset], button.reset {
  color: #333;
  background-color: #ccc;
  border-color: #333;
}

a.button:hover,
a.button:focus,
a.button:active,
a.button.active,
button:hover,
button:focus,
button:active,
button.active,
input[type=submit]:not([class]):hover,
input[type=submit]:not([class]):focus,
input[type=submit]:not([class]):active,
input[type=submit]:not([class]).active {
  color: #fff;
  background-color: #d5022f;
}

a.button.continue:hover,
a.button.continue:focus,
a.button.continue:active,
a.button.continue.active,
button.continue:hover,
button.continue:focus,
button.continue:active,
button.continue.active,
input.continue:hover,
input.continue:focus,
input.continue:active,
input.continue.active {
  color: #fff;
  background-color: #346dff;
}

a.button.submit:hover,
a.button.submit:focus,
a.button.submit:active,
a.button.submit.active,
button.submit:hover,
button.submit:focus,
button.submit:active,
button.submit.active,
input.submit:hover,
input.submit:focus,
input.submit:active,
input.submit.active {
  color: #fff;
  background-color: #16855c;
}

a.button.reset:hover,
a.button.reset:focus,
a.button.reset:active,
a.button.reset.active,
button.reset:hover,
button.reset:focus,
button.reset:active,
button.reset.active,
input.reset:hover,
input.reset:focus,
input.reset:active,
input.reset.active,
input[type=reset]:hover,
input[type=reset]:focus,
input[type=reset]:active,
input[type=reset].active,
a.button.disabled:focus,
a.button.disabled:active,
a.button.disabled:hover,
button.disabled:focus,
button.disabled:active,
button.disabled:hover {
  color: #fff;
  background-color: #333;
}

a.button.sort:not(.inactive) {
  padding-right: 29px;
  background-image: url(../img/layout/pfeil-unten.gif);
  background-position: right 4px center;
  background-repeat: no-repeat;
}

a.button.sort.asc:not(.inactive) {
  background-image: url(../img/layout/pfeil-oben.gif);
}

select {
  color: #1d1d1b;
  background-color: #e0e0e0;
  text-align: left;
}

option {
  background-color: #f0f0f0;
  text-align: left;
}

select.emphasis {
  color: #eee;
  background-color: #346dff;
}

select.emphasis option {
  background-color: #346dff;
}

input.show_hide_password { width: calc(100% - 50px) !important; }

a.show_hide_password {
  display: inline-block;
  width: 28px;
  height: 25px;
  background-image: url(../img/layout/show_hide.png);
  background-repeat: no-repeat;
  background-size: contain;
}

a.button.open_close {
  padding-right: 35px;
  background: url(../img/layout/icon_open_close.png) no-repeat top right #fff;
}

a.button.open_close:hover,
a.button.open_close:focus,
a.button.open_close:active {
  color: #1d1d1b;
}

a.button.open_close.opened {
  background-position: right -29px;
  color: #1d1d1b;
}

a.button.open_close_simple {
  padding-right: 22px;
  background: url(../img/layout/icon_open_close_simple.png) no-repeat right 5px transparent;
  transition: none;
  color: #dadada;
}

a.button.open_close_simple:hover,
a.button.open_close_simple:focus,
a.button.open_close_simple:active {
  color: #008ac2;
  background-position: right -20px;
}

a.button.open_close_simple.opened {
  background-position: right -20px;
  color: #008ac2;
}

/* Graphical buttons with an icon */
a.icon, button.icon, input.icon {
  position: relative;
  padding-left: 36px;
  padding-right: 5px;
  padding-top: 0;
  padding-bottom: 0;
  border: none;
  background-position: top left;
  background-repeat: no-repeat;
  min-height: 30px;
}

.icon.empty {
  padding-left: 30px; /* No room between icon and text, because there's no text */
  margin-right: 0px;
}

.icon:focus,
.icon:hover,
.icon:active,
.icon.active {
  background-position: 0 -60px;
  background-color: transparent !important;
}

.icon.add {
  background-color: #fff;
  color: #1fba81;
  background-image: url(../img/layout/icon_add.png);
}

.icon.add:focus,
.icon.add:hover,
.icon.add:active,
.icon.add.active {
  color: #16855c;
}

.icon.submit {
  background-color: #fff;
  color: #1fba81;
  background-image: url(../img/layout/icon_submit.png);
}

.icon.submit:focus,
.icon.submit:hover,
.icon.submit:active,
.icon.submit.active {
  color: #16855c;
}

.icon.save {
  background-image: url(../img/layout/icon_save.png);
}

.icon.save:focus,
.icon.save:hover,
.icon.save:active,
.icon.save.active {
  color: #1f4aa6;
}

.icon.select {
  background-color: #fff;
  color: #1fba81;
  background-image: url(../img/layout/icon_select.png);
}

.icon.select:focus,
.icon.select:hover,
.icon.select:active,
.icon.select.active {
  color: #16855c;
}

.icon.remove {
  background-image: url(../img/layout/icon_remove.png);
}

.icon.remove:focus,
.icon.remove:hover,
.icon.remove:active,
.icon.remove.active {
  color: #961524;
}


/* Help ? / Info ? buttons */
p.info, div.info, p.notice, div.notice {
  cursor: help;
}

p.notice, div.notice {
  border: 1px dotted #333;
  padding: 3px;
}

div#error, div.error {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 15px;
  border: 1px dotted #c00;
  color: #c00;
  border-radius: 5px;
  flex: 100%;
}

.error {
  color: #c00;
}

tr.error td, td.error { color: #c00; }

.error input, .error select, .error textarea,
input.error, select.error, textarea.error {
  border-color: red;
}

div.warning {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 15px;
  border: 1px dotted orange;
  color: orange;
  border-radius: 5px;
  flex: 100%;
}


/*** Overlay ***/
.overlay {
  color: #000;
}

.overlay .back {
  display: none;
  position: fixed;
  top: 0px;
  left: 0px;
  z-index: 200;
  width: 100%;
  height: 100%;
  background-color: #fff;
  opacity: 0;
}

.overlay .main {
  position: absolute;
  display: none;
  margin-bottom: 20px;
  padding: 1em;
  min-width: 400px;
  max-width: 950px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  z-index: 210;
}

.overlay .close_button {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 25px;
  height: 25px;
  background: url(../img/layout/icon_close_ol.png) no-repeat;
}

.overlay .close_button:focus, .overlay .close_button:hover {
  background-position: 0 -25px;
}


/* Grid-Tabellen */
table.grid {
  width: 100%;
}

table.grid tr:nth-child(even) td {
  background-color: #f6f6f6;
}

table.grid th {
  text-align: left;
  padding-left: 2px;
  background-color: #e6e6e6;
}

table.grid td {
  padding-left: 4px;
}

table.grid td.key {
  width: 25%;
}

table.history td.history_date {
  white-space: nowrap;
}

table.history td.history_value {
  word-break: break-all;
}

/* Rasterbeschreibung */
table.raster { width: 100%; }

.raster h3 {
  color: black;
  font-size: 8pt;
  margin-left: 5px;
}

.raster .ni {
  color: #bbb;
}

.raster li {
  list-style-type: circle;
  margin-left: 20px;
  padding-left: 10px;
  margin-bottom: 3px;
}

.raster li.head {
  list-style-type: none;
  margin-left: 0px;
}

.raster tr.bg td {
  padding-left: 5px;
  padding-right: 10px;
  background-color: #ccc;
}

.raster tr.disabled td {
  color: #999;
}

.raster td.money {
  text-align: right;
}

.raster .relevant {
  font-weight: bold;
}


/* Sortierbare Tabellen */
table.tablesorter th {
  cursor: pointer;
  background-image: url("../img/layout/tablesorter-black-unsorted.gif");
  background-position: right center;
  background-position-x: calc(100% - 5px);
  background-repeat: no-repeat;
  padding-right: 18px;
}

table.tablesorter th.tablesorter-headerAsc  { background-image: url("../img/layout/tablesorter-black-asc.gif"); }
table.tablesorter th.tablesorter-headerDesc { background-image: url("../img/layout/tablesorter-black-desc.gif"); }

/* Tabelle auf Home-Seite */
div.home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1em;
}

div.home span.code {
  margin-right: 1em;
}

table.home th:not(:first-child) {
  border-left: 1px solid #999;
  padding-left: 3px;
}

table.home .due td.critical {
  color: red;
}

div.search_header {
  display: grid;
  grid-template-columns: 3fr 1fr;
}

div.search_header div {
  display: flex;
  align-items: center;
}

div.search_header div.right {
  justify-content: flex-end;
}

div.search_header div.right .button:last-child {
  margin-right: 4px;
}

/***** Global Layout Definitions *****/
body {
  background-color: #f5f5f5;
  color: #605956;
}

body > * {
  margin-left: auto;
  margin-right: auto;
}

/***** Content Boxes *****/
.container {
  background-color: #fff;
  box-shadow: 0 1px 5px -2px #878787;
  padding: 1em;
  border-radius: 5px;
}

.container > *:first-child, .container form > div#error {
  margin-top: 0;
}

/***** Login page *****/
body#login > div {
  max-width: 650px;
  margin-top: 42px;
}

#login_header {
  margin-bottom: 20px;
}

div#logo img {
  width: 67%;
  margin-bottom: 42px;
}

body#login > div > * {
  padding-left: 75px;
  padding-right: 75px;
}

body#login input, body#login button {
  width: 100%;
}

/***** Default Page *****/

/* Head */
header {
  margin-top: 10px;
  background-color: #444;
}

header > div {
  max-width: 2000px;
  margin-left: auto;
  margin-right: auto;
}

header > div > div {
  display: flex;
  justify-content: space-between;
}

#portal_bar {
}

#personal_bar {
  position: relative;
}

header div.bar {
  display: flex;
  align-items: center;
}

header a:link, header a:visited {
  color: #c6c6c6;
}

header div.bar > a {
  padding-right: 10px;
  margin-right: 10px;
  border-right: 1px solid #c6c6c6;
}

header div.bar > a.logo {
  border-right: none;
  margin-right: 0px;
}

header div.bar > a:last-child,
header a#settings,
header a#user_settings {
  border-right: none;
}

header a:hover,
header a:focus,
header a:active {
  color: #fff;
}

header a.active {
  font-weight: bold;
  color: #fff;
}

a.logo {
  display: inline-block;
  height: 48px;
  margin-right: 10px;
  margin-left: -30px;
}

header a#settings {
  display: inline;
  position: relative;
  top: 0px;
  padding-left: 25px;
  padding-right: 0px;
  margin-right: 20px;
  height: 23px;
  background: url(../img/layout/icon_settings.png) no-repeat;
}

header a#user_settings {
  display: inline;
  position: relative;
  top: 0px;
  padding-left: 25px;
  padding-right: 0px;
  margin-right: 20px;
  height: 23px;
  background: url(../img/layout/icon_user_settings.png) no-repeat;
}

#user_settings_dropdown {
  z-index: 10;
  display: none;
  position: absolute;
  right: -10px;
  top: 48px;
  box-shadow: 0 1px 5px -2px #878787;
  border: 2px solid #878787;
  border-radius: 5px;
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  width: 350px;
  background-color: #fff;
  text-align: right;
  padding-right: 10px;
}

#user_settings_dropdown a {
  color: #000;
}

#user_settings_dropdown li {
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Mobile (hamburger) menu */
#mobile_menu {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

header div.menu {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

header div.menu li { list-style-type: none; }

header div.menu a.menu {
  display: inline-block;
  width: 50px;
  cursor: pointer;
}

header div.menu a.menu span {
  display: block;
  height: 6px;
  background-color: #fcfcfc;
  margin-bottom: 6px;
  border-radius: 5px;
}

header div.menu a.menu span:last-child {
  margin-bottom: 0;
}

header div.menu div.nav {
  display: none;
  z-index: 30;
  width: 100%;
  position: absolute;
  right: 0;
  top: 50px;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 15px;
  background-color: #444;
  border-bottom: 1px solid #d50c2f;
  text-align: right;
}

header div.menu div.nav a {
  display: block;
  padding-top: 5px;
  padding-bottom: 5px;
}

header div.nav hr {
  background-color: white;
}

/* Dashboard */
#dashboard {
  margin-top: 1em;
  margin-bottom: 1em;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
}

#dashboard span {
  font-size: 2em;
  margin-right: 0.5em;
}

#dashboard div.right {
  display: flex;
  justify-content: flex-end;
}

#dashbooard div.right > *:last-child, div#search > *:last-child {
  margin-right: 0px;
}

#searchform {
  display: inline-block;
}

#searchterm {
  width: 16em;
  min-width: 6em;
  padding-top: 12px;
  padding-bottom: 12px;
  padding-left: 0.5em;
  margin-right: -0.5em;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-color: #1fba81;
  background-color: #fff;
}

#searchbutton {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  font-weight: bold;
}

#searchform:focus #searchterm,
#searchform:hover #searchterm,
#searchform:active #searchterm {
  border-color: #16855c;
}

#searchform:focus #searchbutton,
#searchform:hover #searchbutton,
#searchform:active #searchbutton {
  background-color: #16855c;
}

#hidden_filter_submit {
  display: none;
}

/* Navigation and action elements inside the content */
#action_bar {
  flex: 100%;
  margin-bottom: 1em;
}

#action_bar ul li {
  float: left;
}

#location_bar {
  flex: 100%;
  padding-bottom: 0.5em;
  margin-bottom: 0.5em;
}

#location_bar li:not(:first-child) {
  margin-left: 10px;
}

#location_bar li:not(:first-child)::before {
  content: ">";
  padding-right: 10px;
  color: #999;
}

/* Project State Bar */
#project_state_bar {
  position: relative;
  top: -1em;
}

/* Project Filters */
div#project_filters {
  width: 100%;
  display: grid;
  margin-bottom: 1em;
  grid-template-columns: 6fr 1fr 1fr;
}

div#project_filters div.active_filters > div {
  float: left;
}

div#project_filters input[type=radio] {
  border-color: red;
}

div#project_filters input[type=text] {
  padding-top: 12px;
  padding-bottom: 12px;
  width: 75% !important;
}

div#project_filters div.new_filter_list {
  position: absolute;
  background-color: #fff;
  border: 2px solid #878787;
  border-radius: 5px;
  padding: 1em;
  z-index: 10;
  display: none;
}

div#project_filters div.new_filter_list div.template {
  display: none;
}

div#project_filters div.removable {
  position: relative;
}

div#project_filters div.removable a.remove {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url(../img/layout/icon_remove_small.png) no-repeat;
}

div#project_filters div.active_filters, div#project_filters div.active_filters label {
  cursor: move;
}

div#project_filters div.removable a.remove:hover,
div#project_filters div.removable a.remove:focus,
div#project_filters div.removable a.remove:active {
  background-position: 0 -28px;
}

div#project_filters div#user_filter {
  position: relative;
}

div#project_filters div#user_filter div.filter_list {
  z-index: 10;
  position: absolute;
  top: 4.2em;
  right: 3em;
  width: 200%;
}

div#project_filters div.filter_actions {
  position: relative;
}

div#project_filters #save_filters {
  position: absolute;
  left: 0;
  top: -1.2em;
}

div#project_filters #filter_show_all {
  position: absolute;
  left: 0;
  top: 3.5em;
  color: #878787;
}

div#project_filters #filter_show_legend {
  /*
  position: absolute;
  left: 0;
  top: 5.5em;
  */
  color: #878787;
}


div#project_filters #filter_show_all:focus,
div#project_filters #filter_show_all:hover,
div#project_filters #filter_show_all:active,
div#project_filters #filter_show_all.active {
  color: #d50c2f;
}


/***** Main Layout *****/
div.wrapper {
  max-width: 2000px;
  margin-top: 20px;
}

main {
  display: flex;
  flex-wrap: wrap;
}

nav {
  flex: 30%;
  padding-bottom: 0.5em;
  margin-bottom: 0.5em;
}

/** Layout Details **/
nav {
  margin-right: 20px;
}

div.content {
  flex: 60%;
}

div.content > *:first-child {
  margin-top: 0;
  padding-top: 0;
}

nav li         { padding: 3px; }
nav > ul > li  { padding-left: 0; }
nav li.folder  { padding-left: 10px; }

nav li a.active {
  color: #d50c2f;
  font-weight: bold;
}

/* Sektionen */
section {
  margin-bottom: 10px;
}

section:last-child {
  margin-bottom: 5px;
}


/* Erweiterte Projektdaten/Tabs */
#epd {
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 20px;
}

div.tabs {
  margin-top: -20px;
  margin-left: -20px;
  margin-bottom: 20px;
}

div.tabs a {
  display: inline-block;
  padding: 10px;
  margin-right: 10px;
  background-color: #eee;
  border: 1px solid #ddd;
  border-top: none;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

div.tabs a:first-child {
  border-bottom-left-radius: 0;
  border-left: none;
}

div.tabs a:hover,
div.tabs a:focus,
div.tabs a:active,
div.tabs a.active {
  background-color: transparent;
  border-color: transparent;
  color: #d50c2f;
}

div.tabs a span {
  display: none;
}

div.tabs a.changed span {
  display: inline;
}

div.tabs a.error {
  background-color: #c00;
  color: #fff;
}

a.with_selected {
  float: left;
  display: block;
  margin: 0 25px 0 5px;
  width: 22px;
  height: 29px;
  background: url(../img/layout/with_selected.png) no-repeat;
}

/*** Uploader ***/
div.file_list, div.upload_area {
  border: 1px solid #ccc;
  border-radius: 5px;
  margin: 0.5em 0;
  padding: 0.5em;
  background-color: #efefef;
}

div.upload_area {
  padding: 1em;
  border: 2px dashed #ccc;
  text-align: center;
}

div.upload_area:hover, div.upload_area.highlight {
  border-color: #33f;
  color: #da121a;
}

div.upload_area button {
  margin-top: 0.5em;
  padding: 0.5em;
  border: 1px dashed #33f;
}

div.upload_area div.upload_progress {
  margin: 0.5em 0;
  text-align: left;
}

div.upload_area div.upload_progress progress {
  width: 100%;
  height: 2em;
  vertical-align: middle;
}

div.upload_area div.upload_progress div.result {
  padding: 0 1em;
  margin: 1em 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

div.upload_area div.upload_progress div.result.success {
  border-color: #3c3;
}

div.upload_area div.upload_progress div.result.error {
  border-color: #c33;
}

div.upload_area div.upload_progress div.success span,
div.upload_area div.upload_progress li.success span {
  color: #33f;
}

div.upload_area div.upload_progress .error span {
  text-decoration: line-through;
}

/* FIXME */
#upload_action {
  visibility: hidden;
}

#upload_action img {
  border: 0px;
  padding: 0px;
  margin: 0px;
}


/***** Footer *****/
footer {
  margin-top: 20px;
}


/***** Clearfixes ******/
.container::after, div#action_bar::after, ul#project_state_bar::after, div#project_filters::after, div#location_bar::after, footer::after {
  content: "";
  clear: both;
  display: table;
}

/***** Breakpoints *****/
.phone_only                  { display: none; }
.tablet_only                 { display: none; }
#mobile_menu                 { display: none; }

/* Large/Desktop */
@media (max-width: 2040px) {
  a.logo                     { margin-left: 0; }
  #user_settings_dropdown    { right: 5px; }
  main.container             { margin-left: 1em; margin-right: 1em; }
  #dashboard                 { margin: 1em; }
  footer                     { margin-left: 1em; margin-right: 1em; }
}

/* Medium */
@media (max-width: 1559px) {
  .nodesktop                 { display: none; }
}

/* Small/Tablet */
@media (max-width: 1170px) {
  .notablet                  { display: none; }
  .tablet_only               { display: block; }
  body#login div.container   { margin-left: 1em; margin-right: 1em; }
  header                     { margin-top: 0; }
  main.container             { margin: 0; border-radius: 0; }
  #dashboard                 { margin-top: 0.5em; margin-bottom: 0.5em; grid-template-columns: 1fr 3fr; }
  div.home                   { display: block; }
  footer                     { margin-left: 0.5em; margin-right: 0.5em; }
  ul.row li                  { float: none; }
  #portal_bar, #personal_bar { display: none; }
  #mobile_menu               { display: flex; }
  div.tabs a                 { padding: 5px; margin-right: 5px; }
  textarea, textarea.medium  { width: 100%; }
  input[type=text]           { width: 80%; }
  #searchterm                { width: 6em; }
  #location_bar, nav         { border-bottom: 1px solid #d4d4d4; }
}

/* X-Small/Phone */
@media (max-width: 600px) {
  .nophone                   { display: none; }
  .phone_only                { display: block; }
  body#login div.container   { margin-left: 0.5em; margin-right: 0.5em; }
  body#login > div > *       { padding-left: 0.75em; padding-right: 0.75em; }
  div#project_filters        { grid-template-columns: auto; }

  div#project_filters div.active_filters {
    grid-template-columns: auto;
    grid-template-rows: repeat(6, 1fr);
  }

  div#project_filters div.active_filters > div {
    margin-bottom: 1em;
  }
}
