/*
 * Meemsign - Digital Signage - http://www.meemsign.org.uk
 * Copyright (C) 2006-2013 Daniel Garner
 *
 * This file is part of Meemsign.
 *
 * Meemsign is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * Meemsign is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Meemsign.  If not, see <http://www.gnu.org/licenses/>.
 */

:root {
  --brand-900: #0f172a;
  --brand-700: #1e3a5f;
  --brand-600: #24507f;
  --brand-500: #2f6fad;
  --accent-500: #14b8a6;
  --accent-300: #5eead4;
  --surface-0: #f5f7fb;
  --surface-1: #ffffff;
  --surface-2: #e9eef7;
  --surface-3: #d8e2f0;
  --text-900: #1f2937;
  --text-600: #475569;
  --text-500: #64748b;
}

html,
body {
  overflow-x: hidden;
}

body {
  background: var(--surface-0);
  color: var(--text-900) !important;
}

/* Disable legacy left sidebar layout */
#sidebar-wrapper,
ul.sidebar,
.sidebar-footer {
  display: none !important;
}

#page-wrapper,
#page-wrapper.active {
  padding-left: 0 !important;
}

#content-wrapper {
  padding-left: 0;
}

/* Modern top navigation */
.modern-top-menu-row {
  margin-bottom: 14px;
}

.modern-top-nav {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
  min-height: 62px;
  margin-bottom: 0;
  position: relative;
  z-index: 1040;
  overflow: visible;
}

.modern-top-nav .navbar-brand {
  color: #fff !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 62px;
  padding: 12px 14px;
  max-width: 170px;
  overflow: hidden;
}

.modern-brand-logo {
  height: 36px;
  width: auto;
  max-width: 115px;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  background: rgba(255,255,255,0.95);
  padding: 2px 4px;
}

.modern-brand-name {
  letter-spacing: 0.25px;
  white-space: nowrap;
}

.modern-top-nav .navbar-nav > li > a {
  color: rgba(255,255,255,0.92) !important;
  font-weight: 600;
  padding: 21px 12px;
  font-size: 13px;
}

.modern-top-nav .navbar-nav > li > a:hover,
.modern-top-nav .navbar-nav > li > a:focus,
.modern-top-nav .navbar-nav > li.active > a,
.modern-top-nav .navbar-nav > li.active > a:hover,
.modern-top-nav .navbar-nav > li.active > a:focus {
  background: rgba(255,255,255,0.16) !important;
  color: #fff !important;
}

.modern-top-nav .dropdown-menu {
  border-radius: 10px;
  border: 1px solid var(--surface-2);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  padding: 6px;
  z-index: 2000;
  max-height: 72vh;
  overflow-y: auto;
}

.modern-top-nav .dropdown-menu > li > a {
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-900);
}

.modern-top-nav .dropdown-menu > li > a:hover,
.modern-top-nav .dropdown-menu > li.active > a {
  background: #eef4ff;
  color: var(--brand-700);
}

.modern-user-nav {
  margin-right: 0;
}

.modern-user-nav > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

.modern-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.55);
}

.modern-user-nav .dropdown-menu {
  min-width: 220px;
}

.modern-user-nav .dropdown-header {
  white-space: normal;
  color: var(--text-600);
}

.modern-user-nav #MeemsignClock {
  display: inline-block;
  margin-top: 4px;
  color: var(--brand-600);
}

.modern-notification-entry {
  padding: 8px 12px;
}

.modern-notification-text {
  white-space: normal;
  color: var(--text-900);
  font-size: 13px;
  line-height: 1.35;
}

.modern-notification-text a {
  color: var(--brand-600);
  text-decoration: underline;
}

@media (min-width: 992px) {
  .modern-top-nav .container-fluid {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
  }

  .modern-top-nav .navbar-header {
    float: none;
    flex: 0 0 auto;
  }

  .modern-top-nav .navbar-collapse {
    flex: 1 1 auto;
    padding-left: 8px;
  }

  .modern-main-menu {
    float: none !important;
    display: flex;
    flex-wrap: wrap;
  }
}

@media (max-width: 1200px) {
  .modern-brand-name {
    display: none;
  }

  .modern-top-nav .navbar-brand {
    max-width: 130px;
  }
}

@media (max-width: 991px) {
  .modern-top-menu-row {
    margin-bottom: 10px;
  }

  .modern-top-nav {
    border-radius: 10px;
  }

  .modern-top-nav .navbar-brand {
    max-width: none;
    padding: 10px 12px;
    height: 58px;
  }

  .modern-top-nav .navbar-toggle {
    margin-top: 12px;
    margin-right: 10px;
    border-color: rgba(255,255,255,0.65);
  }

  .modern-top-nav .navbar-toggle .icon-bar {
    background: #fff;
  }

  .modern-top-nav .navbar-collapse {
    border-top: 1px solid rgba(255,255,255,0.24);
    background: rgba(15, 23, 42, 0.18);
    margin-left: -15px;
    margin-right: -15px;
  }

  .modern-top-nav .navbar-nav {
    margin: 0;
  }

  .modern-top-nav .navbar-nav > li > a {
    padding: 12px 16px;
    font-size: 14px;
  }

  .modern-user-nav {
    float: none !important;
    border-top: 1px solid rgba(255,255,255,0.24);
  }

  .modern-user-nav > li > a {
    justify-content: flex-start;
  }

  .modern-top-nav .dropdown-menu {
    background: rgba(255,255,255,0.96);
    margin: 0 10px 10px;
  }

  .row.header {
    min-height: 56px;
    padding: 4px 8px;
  }

  .modern-page-title {
    font-size: 16px;
    margin-top: 6px;
  }
}

@media (max-width: 768px) {
  .row.header {
    position: static !important;
    width: auto !important;
  }

  #page-wrapper.active {
    padding-top: 0 !important;
  }

  .row.header .meta.pull-left,
  .row.header .user.pull-right {
    float: none !important;
  }

  .row.header .user {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
  }

  .row.header .user > .item {
    width: auto;
    height: 52px;
  }

  .row.header .user > .item i,
  .row.header .user > .item a {
    line-height: 50px;
  }
}

@media (max-width: 480px) {
  .modern-top-nav .navbar-brand {
    padding: 10px;
  }

  .modern-brand-logo {
    max-width: 96px;
    height: 32px;
  }

  .modern-page-title {
    font-size: 14px;
  }
}

/* Header row refresh */
.row.header {
  height: auto;
  min-height: 64px;
  background: var(--surface-1);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
  margin-bottom: 16px;
}

.row.header .meta .page {
  padding-top: 10px;
}

.modern-page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-700);
  letter-spacing: 0.2px;
}

.row.header .user > .item {
  height: 64px;
}

.row.header .user > .item i,
.row.header .user > .item a {
  line-height: 60px;
}

/* Modernize core page elements */
.widget {
  border: 1px solid var(--surface-2);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  overflow: visible;
}

.widget .widget-title {
  background: linear-gradient(180deg, #f9fbff, #f3f7fe);
  color: var(--brand-700);
  border-bottom: 1px solid var(--surface-2);
  font-weight: 700;
  letter-spacing: 0.15px;
}

.widget .widget-body {
  background: #fff;
}

.table {
  border-color: var(--surface-2);
}

.table > thead > tr > th {
  background: #f4f8ff;
  color: var(--brand-700);
  border-bottom: 1px solid var(--surface-3);
}

.table > tbody > tr > td {
  border-top: 1px solid #edf2fa;
}

.table-hover > tbody > tr:hover > td {
  background: #f7faff;
}

.meemsign-table-responsive {
  max-width: 100%;
  overflow: visible !important;
  border: 1px solid #edf2fa;
  border-radius: 10px;
  position: relative;
}

.meemsign-table-responsive .dropdown,
.meemsign-table-responsive .btn-group {
  position: relative;
}

.meemsign-table-responsive .dropdown.open,
.meemsign-table-responsive .btn-group.open {
  z-index: 5000;
}

.meemsign-table-responsive .dropdown-menu {
  z-index: 6000;
}

.meemsign-floating-dropdown {
  z-index: 8000 !important;
}

.meemsign-table-responsive > .table {
  margin-bottom: 0;
}

@media (max-width: 991px) {
  .meemsign-table-responsive {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
  }

  .meemsign-table-responsive > .table {
    min-width: 860px;
  }
}

@media (max-width: 767px) {
  .meemsign-table-responsive {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }
}

.form-control,
.bootstrap-select > .btn {
  border-radius: 10px !important;
  border-color: #dbe4f0;
  box-shadow: none;
}

.form-control:focus,
.bootstrap-select > .btn:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(47, 111, 173, 0.14) !important;
}

.btn {
  border-radius: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  border-color: transparent;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
  border-color: transparent;
}

.nav-pills > li > a {
  border-radius: 10px;
  color: var(--brand-700);
  border: 1px solid transparent;
}

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
  background: #eaf2ff;
  color: var(--brand-700);
  border-color: #d5e3fb;
}

.alert {
  border-radius: 10px;
}

/* Modern default table/list pages */
.MeemsignGrid .MeemsignFilter {
  margin-bottom: 12px;
}

.MeemsignGrid .MeemsignFilter .FilterDiv {
  display: block !important;
  background: linear-gradient(180deg, #f8fbff, #f2f7ff);
  border: 1px solid #d9e5f7;
  border-radius: 10px;
  padding: 12px 12px 4px;
}

.MeemsignGrid .MeemsignFilter .form-inline .form-group {
  margin-right: 10px;
  margin-bottom: 10px;
  vertical-align: top;
}

.MeemsignGrid .MeemsignFilter .form-inline .control-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-700);
  margin-bottom: 4px;
}

.MeemsignGrid .MeemsignFilter .form-inline .form-control,
.MeemsignGrid .MeemsignFilter .form-inline .bootstrap-select > .btn {
  min-width: 170px;
}

.MeemsignGrid .MeemsignData .btn-group > .btn.dropdown-toggle {
  background: #eef4ff;
  border: 1px solid #d7e4fb;
  color: var(--brand-700);
}

.MeemsignGrid .MeemsignData .btn-group > .btn.dropdown-toggle:hover {
  background: #e4efff;
}

#content-wrapper .nav-pills {
  margin-bottom: 10px;
}

@media (max-width: 991px) {
  .MeemsignGrid .MeemsignFilter .form-inline .form-group {
    display: block;
    margin-right: 0;
  }

  .MeemsignGrid .MeemsignFilter .form-inline .form-control,
  .MeemsignGrid .MeemsignFilter .form-inline .bootstrap-select > .btn {
    min-width: 0;
    width: 100%;
  }
}
