/* Responsive tweaks */
:root {
  --sidebar-width: 260px;
}

@media (max-width: 767.98px) {
  .hero-card { padding: 24px !important; }
  .feature-card { padding: 16px !important; }
  .display-4 { font-size: 2rem !important; }
}

/* Mobile top bar shown only on small screens */
.mobile-topbar { display: none; }
@media (max-width: 767.98px) {
  .mobile-topbar { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 10px 16px; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1030;
  }
  .mobile-topbar .btn-toggle-sidebar {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 0;
    padding: 8px 12px;
    border-radius: 8px;
  }
}

/* Sidebar offcanvas behavior on mobile */
@media (max-width: 767.98px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    height: 100vh;
    z-index: 1040;
    box-shadow: 0 0 20px rgba(0,0,0,0.25);
    transition: left 0.25s ease;
  }
  .sidebar.open { left: 0; }
  .main-content { position: relative; }
  .sidebar-backdrop {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1035;
    display: none;
  }
  .sidebar.open ~ .sidebar-backdrop { display: block; }
}

/* Cards and grids on small screens */
@media (max-width: 767.98px) {
  .stat-card { margin-bottom: 12px !important; }
  .card-body { padding: 14px !important; }
}

/* Page headers: stack title and actions on small screens */
@media (max-width: 575.98px) {
  .page-header { 
    flex-direction: column !important; 
    align-items: stretch !important; 
    gap: 12px; 
  }
  .page-header .d-flex { flex-wrap: wrap; }
  .page-header .btn, .page-header input, .page-header select { width: 100%; }
}

/* Table readability on mobile */
@media (max-width: 575.98px) {
  .table>:not(caption)>*>* { padding: .5rem .5rem; }
  .table th, .table td { white-space: normal; word-break: break-word; }
}

/* Licenses table: hide less important columns on very small screens */
@media (max-width: 575.98px) {
  .licenses-table th:nth-child(3), .licenses-table td:nth-child(3), /* Ürün */
  .licenses-table th:nth-child(5), .licenses-table td:nth-child(5), /* Başlangıç */
  .licenses-table th:nth-child(6), .licenses-table td:nth-child(6), /* Bitiş */
  .licenses-table th:nth-child(9), .licenses-table td:nth-child(9)  /* Ücret */
  { display: none; }
}


