/**
 * ThikKoro - Responsive & Print Stylesheet
 */

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .content-body {
    padding: 1rem 0.85rem;
  }

  .app-topbar {
    height: 56px;
    padding: 0 0.85rem;
  }

  .topbar-title {
    font-size: 1rem;
    gap: 0.5rem;
    max-width: 55%;
  }

  .topbar-page-title {
    max-width: 140px;
  }

  .topbar-actions {
    gap: 0.4rem;
  }

  .topbar-btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
  }

  .workflow-status-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .card-header, .card-body, .card-footer {
    padding: 1rem 0.85rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .card-header .btn {
    align-self: flex-start;
  }

  .btn {
    padding: 0.5rem 0.85rem;
  }

  .btn-mobile-block {
    display: flex;
    width: 100%;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .kpi-card {
    padding: 0.85rem;
  }

  .kpi-value {
    font-size: 1.35rem;
  }

  /* DataTables Mobile Polish */
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    float: none !important;
    text-align: left !important;
    margin-bottom: 0.75rem;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 0.25rem;
  }

  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    float: none !important;
    text-align: center !important;
    margin-top: 0.75rem;
  }

  /* Mobile Tables */
  .table-responsive {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    margin-bottom: 0.5rem;
  }

  .table th, .table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .app-topbar {
    padding: 0 0.65rem;
  }

  .topbar-title {
    max-width: 50%;
  }

  .topbar-page-title {
    max-width: 110px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }
  
  .tech-job-actions {
    flex-direction: column;
  }

  .tech-job-actions .btn {
    width: 100%;
  }

  .card {
    border-radius: var(--radius-md);
  }
}

/* =====================================================================
   PRINT STYLES FOR INVOICE AND JOB REPORT
   ===================================================================== */
@media print {
  .app-sidebar,
  .app-topbar,
  .btn,
  .nav-tabs,
  .no-print {
    display: none !important;
  }

  .app-main {
    margin-left: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  .content-body {
    padding: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}
