html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
/* ============================================================
   CRM4you - Compact CRM layout
   ============================================================ */

html {
    font-size: 14px;
}

body {
    font-size: 0.9rem;
    line-height: 1.35;
}

/* ------------------------------------------------------------
   Rubriker
   ------------------------------------------------------------ */

h1 {
    font-size: 1.55rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ------------------------------------------------------------
   Huvudinnehåll
   ------------------------------------------------------------ */

.container {
    max-width: 1500px;
}

main {
    padding-top: 0.5rem;
    padding-bottom: 1rem;
}

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */

.card {
    margin-bottom: 0.75rem;
    border-radius: 0.25rem;
}

.card-header {
    padding: 0.4rem 0.65rem;
    min-height: 34px;
}

.card-body {
    padding: 0.65rem;
}

/* ------------------------------------------------------------
   Tabeller
   ------------------------------------------------------------ */

.table {
    margin-bottom: 0;
    font-size: 0.86rem;
}

.table > :not(caption) > * > * {
    padding: 0.3rem 0.45rem;
}

.table th {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* ------------------------------------------------------------
   Formulär
   ------------------------------------------------------------ */

.form-label {
    margin-bottom: 0.15rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.form-control,
.form-select {
    min-height: 30px;
    padding: 0.25rem 0.45rem;
    font-size: 0.86rem;
    border-radius: 0.2rem;
}

textarea.form-control {
    min-height: auto;
}

.form-check {
    min-height: 1.25rem;
}

.form-check-input {
    margin-top: 0.15rem;
}

/* ------------------------------------------------------------
   Knappar
   ------------------------------------------------------------ */

.btn {
    padding: 0.25rem 0.55rem;
    font-size: 0.82rem;
    border-radius: 0.2rem;
}

.btn-sm {
    padding: 0.15rem 0.4rem;
    font-size: 0.78rem;
}

/* ------------------------------------------------------------
   Badges
   ------------------------------------------------------------ */

.badge {
    font-size: 0.72rem;
    font-weight: 500;
}

/* ------------------------------------------------------------
   Bootstrap spacing - kompaktare CRM
   ------------------------------------------------------------ */

.mb-5 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 0.75rem !important;
}

.mb-3 {
    margin-bottom: 0.5rem !important;
}

.mb-2 {
    margin-bottom: 0.35rem !important;
}

.mt-5 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 0.75rem !important;
}

.mt-3 {
    margin-top: 0.5rem !important;
}

.py-5 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.py-4 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* ------------------------------------------------------------
   HR
   ------------------------------------------------------------ */

hr {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ------------------------------------------------------------
   Navbar
   ------------------------------------------------------------ */

.navbar {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

.navbar-brand {
    font-size: 1.1rem;
    font-weight: 600;
}

.navbar .nav-link {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    font-size: 0.88rem;
}

/* ------------------------------------------------------------
   CRM-specifika hjälpklasser
   ------------------------------------------------------------ */

.crm-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.crm-page-header h1 {
    margin: 0;
}

.crm-toolbar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.crm-section-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.crm-info-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6c757d;
}

.crm-info-value {
    font-size: 0.88rem;
}

.crm-table-nowrap td,
.crm-table-nowrap th {
    white-space: nowrap;
}

/* Långa anteckningar får brytas */
.crm-notes {
    white-space: pre-wrap;
    min-width: 220px;
}

/* ------------------------------------------------------------
   Mobil
   ------------------------------------------------------------ */

@media (max-width: 768px) {

    html {
        font-size: 14px;
    }

    .container {
        max-width: 100%;
    }

    .crm-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .crm-toolbar {
        flex-wrap: wrap;
    }
}
/* ============================================================
   CRM4you - Dark mode
   ============================================================ */

[data-bs-theme="dark"] body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .navbar {
    background-color: var(--bs-body-bg);
}

[data-bs-theme="dark"] .card {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .card-header {
    background-color: var(--bs-tertiary-bg);
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--bs-body-color);
}

[data-bs-theme="dark"] .text-muted {
    color: var(--bs-secondary-color) !important;
}