/* ============================================================
   Groupster custom стилове върху AdminLTE 3
   ============================================================ */

/* User avatar bubble */
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  background: #007bff;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* Малко по-приятни small-info-cards */
.small-box .icon {
  opacity: 0.25;
  transition: all .3s linear;
}
.small-box:hover .icon {
  opacity: 0.4;
}

/* Code-style chip — за IP адреси, токени, и т.н. */
.chip {
  display: inline-block;
  padding: 2px 8px;
  background: #f4f6f9;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-family: 'Source Code Pro', Consolas, monospace;
  font-size: 0.85em;
  color: #495057;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #adb5bd;
}
.empty-state i {
  font-size: 48px;
  opacity: 0.3;
  display: block;
  margin-bottom: 16px;
}
.empty-state .empty-title {
  font-size: 16px;
  color: #495057;
  font-weight: 600;
  margin-bottom: 4px;
}
.empty-state .empty-desc {
  font-size: 13px;
  color: #adb5bd;
}

/* Login & register card по-широко */
.login-page .login-box,
.register-page .register-box {
  width: 460px;
}
.register-page .register-box.register-box-wide {
  width: 640px;
}

/* Brand */
.brand-link .brand-image {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

/* Audit log — timeline-style records */
.audit-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #f4f6f9;
}
.audit-row:last-child { border-bottom: none; }
.audit-row:hover { background: #fafbfc; }

.audit-icon {
  width: 36px; height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

/* Bigger badges */
.badge {
  font-size: 0.78em;
  padding: 0.35em 0.6em;
  font-weight: 500;
}
.badge i { font-size: 0.95em; }

/* Stat box variants за по-приятен look */
.stat-card {
  background: #fff;
  border-radius: 6px;
  padding: 18px 20px;
  border-left: 4px solid #007bff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  margin-bottom: 20px;
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.stat-card.stat-warning  { border-left-color: #ffc107; }
.stat-card.stat-success  { border-left-color: #28a745; }
.stat-card.stat-danger   { border-left-color: #dc3545; }
.stat-card.stat-info     { border-left-color: #17a2b8; }

.stat-card .stat-value { font-size: 28px; font-weight: 700; color: #495057; line-height: 1.1; }
.stat-card .stat-label { font-size: 12px; color: #6c757d; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 4px; }
.stat-card .stat-icon  { float: right; font-size: 32px; opacity: 0.15; margin-top: -4px; }

/* API key reveal box */
.api-key-reveal {
  background: #1a1d21;
  color: #69db7c;
  padding: 14px 16px;
  border-radius: 6px;
  font-family: 'Source Code Pro', Consolas, monospace;
  word-break: break-all;
  font-size: 14px;
  position: relative;
}
.api-key-reveal .copy-btn {
  position: absolute;
  top: 8px; right: 8px;
}

/* Password strength meter */
.pw-meter {
  height: 4px;
  background: #e9ecef;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.pw-meter-bar {
  height: 100%;
  width: 0;
  transition: width .3s, background .3s;
}

/* Помощни */
.text-bolder { font-weight: 600; }
.cursor-pointer { cursor: pointer; }

/* ============================================================
   Responsive подобрения (v5)
   ============================================================ */

/* На мобилни — sidebar collapse-нат по подразбиране */
@media (max-width: 991.98px) {
  body.sidebar-mini.layout-fixed .main-sidebar {
    left: -250px;
  }
  body.sidebar-mini.layout-fixed.sidebar-open .main-sidebar {
    left: 0;
  }

  /* Малко по-малки cards */
  .card-header {
    padding: 0.5rem 1rem;
  }
  .card-header .card-title {
    font-size: 1rem;
  }

  /* Stat boxes — по-плътно подреждане */
  .small-box .inner h3 { font-size: 28px; }
  .small-box .icon { font-size: 60px; top: 10px; }

  /* Login/register — pad-ваме отстрани */
  .login-page .login-box,
  .register-page .register-box {
    width: 92%;
    max-width: 460px;
    margin: 7% auto;
  }
  .register-page .register-box.register-box-wide {
    width: 92%;
    max-width: 640px;
  }

  /* Long form sections — по-малки заглавия */
  h6.text-uppercase {
    font-size: 0.78rem;
  }

  /* Topbar — billing widget да не се видо при много малки екрани */
  .navbar-nav .nav-link strong {
    font-size: 0.85em;
  }
}

@media (max-width: 575.98px) {
  /* Page header */
  .content-header h1.m-0 {
    font-size: 1.25rem;
  }
  .breadcrumb {
    font-size: 0.8em;
  }

  /* Tables — по-плътен padding */
  .table td, .table th {
    padding: 0.5rem 0.5rem;
    font-size: 0.85em;
  }

  /* Avatar по-малък в таблици */
  .user-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }

  /* Buttons по-плътни */
  .btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
  }

  /* Empty state — по-малки иконки */
  .empty-state i {
    font-size: 36px;
  }

  /* Card-header tools wrap-ване */
  .card-header {
    flex-wrap: wrap;
  }
  .card-header form.form-inline {
    flex: 1 1 100%;
    margin-bottom: 0.5rem;
  }
  .card-header .card-tools {
    flex: 1 1 100%;
    text-align: right;
  }

  /* Form-row stack-ване */
  .form-inline .form-control {
    width: 100% !important;
    margin-bottom: 0.25rem;
  }

  /* Dropdown menu — full width */
  .dropdown-menu-lg {
    width: 280px !important;
  }
}

/* Profile avatar в admin user_detail — по-малък на mobile */
@media (max-width: 767.98px) {
  .user-avatar[style*="width:80px"] {
    width: 60px !important;
    height: 60px !important;
    font-size: 28px !important;
  }
  .user-avatar[style*="width:100px"] {
    width: 70px !important;
    height: 70px !important;
    font-size: 32px !important;
  }
}

/* Inline edit на Билинг — на мобилни input-ите един под друг */
@media (max-width: 767.98px) {
  table .input-group-sm input,
  table input[type="date"] {
    font-size: 0.8rem;
  }
}
