/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  padding: 0;
  font: var(--font-stack);
  color: var(--front-color1);
  background-color: var(--bg-color1);
}

h1 {
  margin: 0;
  padding: 0;
  font-size: var(--h1-size);
}

h2,
h3 {
  margin: 0;
  padding: 0;
}

a {
  color: var(--btn-primary-bg);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* App layout */
#app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  overflow: hidden;
}

/* CONTENT */
.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* ACTIONBAR */
.actionbar {
  display: flex;
  background-color: var(--actionbar-bg-color);
  color: var(--actionbar-font-color);
  padding: 0 8px;
  align-items: center;
  height: var(--actionbar-height);
  flex-shrink: 0;
  z-index: 10;
}

.actionbar h1 {
  flex: 1;
  min-width: 0;
  font-size: 20px;
  padding-left: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#actionbar-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
}

.actionbar button {
  width: 40px;
  min-width: 40px;
  height: 36px;
  padding: 0;
  margin: 0;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--actionbar-font-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.actionbar button:hover {
  background-color: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.5);
}

/* NAVBAR */
.navbar {
  margin: 0;
  padding: 0;
  width: var(--navbar-width);
  flex-shrink: 0;
  background-color: var(--navbar-bg-color);
  overflow-y: auto;
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.navbar-brand {
  text-align: center;
  padding: 12px 8px;
  font-size: var(--h1-size);
  font-weight: bold;
  color: var(--navbar-front-color);
}

.navbar a {
  display: flex;
  color: var(--navbar-front-color);
  padding: 10px 12px;
  text-decoration: none;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.navbar a i {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.navbar a.router-link-active {
  background-color: var(--bg-color1);
  color: var(--front-color1);
}

.navbar a:hover:not(.router-link-active) {
  background-color: var(--navbar-hover-bg-color);
  color: var(--navbar-hover-front-color);
}

.navbar a:focus-visible {
  outline: 2px solid var(--btn-primary-bg);
  outline-offset: -2px;
  background-color: var(--navbar-hover-bg-color);
  color: var(--navbar-hover-front-color);
}

.navbar-spacer {
  flex: 1;
}

/* RESPONSIVE — Tablet / Mobile */
@media screen and (max-width: 700px) {
  #app {
    flex-direction: column;
  }

  .navbar {
    order: 2;
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: space-around;
    padding: 4px 0;
  }

  .navbar-brand {
    display: none;
  }

  .navbar-spacer {
    display: none;
  }

  .navbar a {
    flex-direction: column;
    padding: 6px 8px;
    font-size: 11px;
    gap: 2px;
  }

  .navbar a i {
    font-size: 22px;
  }

  .content {
    order: 1;
  }
}

@media screen and (max-width: 600px) {
  .navbar a span {
    display: none;
  }
}

/* Utility classes */
.text-muted {
  color: var(--front-color2);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.85;
}

.btn-primary {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-color);
}

.btn-danger {
  background-color: var(--btn-danger-bg);
  color: var(--btn-danger-color);
}

.card {
  background-color: var(--bg-color2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

input,
select,
textarea {
  background-color: var(--input-bg);
  color: var(--front-color1);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--btn-primary-bg);
  outline-offset: -1px;
}
