/* Basic responsive styles for the Ticketing System */
:root{ --primary:#1f7ae0; --bg:#f6f8fb; --card:#fff; --text:#1f2937; --muted:#6b7280; --success:#16a34a; --warning:#f59e0b; --danger:#dc2626; }
body{ margin:0; font-family:'Aptos', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif; color:var(--text); background:var(--bg); }
*{ box-sizing:border-box; }
.container{ max-width:1100px; margin:0 auto; padding:24px; }
.header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.brand{ font-weight:700; color:var(--primary); }
.card{ background:var(--card); border-radius:12px; padding:20px; box-shadow:0 10px 25px rgba(0,0,0,.05); }
.grid{ display:grid; gap:16px; }
.grid-3{ grid-template-columns:repeat(3,1fr); }
@media(max-width:1200px){ .grid-3{ grid-template-columns:1fr 1fr; } }
@media(max-width:768px){ .grid-3{ grid-template-columns:1fr; } }
label{ display:block; font-size:14px; color:var(--muted); margin-bottom:6px; }
input, select, textarea{ width:100%; padding:10px 12px; border:1px solid #e5e7eb; border-radius:8px; font-size:14px; }
textarea{ min-height:120px; resize:vertical; }
button{ background:var(--primary); border:none; color:#fff; padding:10px 14px; border-radius:8px; cursor:pointer; font-weight:600; }
button.secondary{ background:#eef2ff; color:#3730a3; }
.table{ width:100%; border-collapse:separate; border-spacing:0; }
.table th,.table td{ padding:12px; text-align:left; border-bottom:1px solid #f1f5f9; font-size:14px; vertical-align:top; }
.table th { background-color: #f8fafc; font-weight: 600; }
.table tr:hover { background-color: #f8fafc; }
.sub-header {
  font-size: 12px;
  color: var(--muted);
  font-weight: normal;
  margin-top: 4px;
}
.small { font-size: 12px; line-height: 1.4; }
.muted { color: var(--muted); }
.badge{ display:inline-block; padding:4px 8px; border-radius:999px; font-size:12px; }
.badge.open{ background:#dbeafe; color:#1e40af; }
.badge.in_progress{ background:#fef3c7; color:#92400e; }
.badge.resolved{ background:#dcfce7; color:#14532d; }
.toolbar{ display:flex; gap:8px; flex-wrap:wrap; }
input[type="search"]{ max-width:260px; }
small.muted{ color:var(--muted); }

/* Utilities */
.overflow-auto{ overflow:auto; }
.span-full{ grid-column:1 / -1; }
.mt-12{ margin-top:12px; }
.header-actions{ display:flex; gap:8px; align-items:center; }
.card-narrow{ max-width:520px; }
.mx-auto{ margin-left:auto; margin-right:auto; }

/* Modal */
.modal-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.45); display:none; align-items:center; justify-content:center; padding:16px; z-index:1000; }
.modal-backdrop.show{ display:flex; }
.modal, .modal-card{ background:#fff; width:100%; max-width:640px; border-radius:12px; box-shadow:0 20px 40px rgba(0,0,0,.2); border:1px solid #e5e7eb; animation:modalIn .18s ease-out; }
.modal header, .modal-card .modal-header, .modal-card header{ padding:16px 20px; border-bottom:1px solid #e5e7eb; display:flex; align-items:center; justify-content:space-between; }
.modal main, .modal-card .modal-body, .modal-card main{ padding:20px; }
.modal footer, .modal-card .modal-footer, .modal-card footer{ padding:16px 20px; border-top:1px solid #e5e7eb; display:flex; gap:10px; justify-content:flex-end; }
.modal-title{ font-size:18px; font-weight:700; }
.modal-close{ background:none; border:none; font-size:20px; cursor:pointer; color:#6b7280; }
@keyframes modalIn{ from{ transform:translateY(10px); opacity:0;} to{ transform:translateY(0); opacity:1;} }
.btn-danger{ background:var(--danger); color:#fff; }
.btn-ghost{ background:transparent; color:var(--text); border:1px solid #e5e7eb; }

/* Form grid helpers used inside modals */
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.form-grid .full{ grid-column:1 / -1; }
.form-field{ display:flex; flex-direction:column; gap:6px; }
.form-field label{ font-size:12px; color:#374151; font-weight:600; }

/* Data Management Styles */
.danger-zone {
  border: 1px solid #fecaca;
  background-color: #fef2f2;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}
.danger-zone h3 {
  color: #dc2626;
  margin-top: 0;
}
.btn-delete {
  background-color: #dc2626;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 10px;
}
.btn-delete:hover {
  background-color: #b91c1c;
}
.confirmation {
  margin-top: 15px;
  padding: 10px;
  border-radius: 6px;
  display: none;
}
.confirmation.show {
  display: block;
}
.confirmation.success {
  background-color: #dcfce7;
  border: 1px solid #86efac;
}
.confirmation.error {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
}
/* Enhanced Dashboard Styles */
.card:hover{ transform:translateY(-2px); box-shadow:0 15px 35px rgba(0,0,0,.1); transition:all .3s ease; }
.card-header{ display:flex; align-items:center; margin-bottom:20px; }
.card-icon{ width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; margin-right:16px; font-size:20px; }
.card.tickets .card-icon{ background:linear-gradient(135deg, #3b82f6, #1d4ed8); color:#fff; }
.card.assets .card-icon{ background:linear-gradient(135deg, #10b981, #059669); color:#fff; }
.card.inventory .card-icon{ background:linear-gradient(135deg, #f59e0b, #d97706); color:#fff; }
.card.knowledge .card-icon{ background:linear-gradient(135deg, #8b5cf6, #7c3aed); color:#fff; }
.card.reports .card-icon{ background:linear-gradient(135deg, #ef4444, #dc2626); color:#fff; }
.card.actions .card-icon{ background:linear-gradient(135deg, #06b6d4, #0891b2); color:#fff; }
.dashboard-stats{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px; margin-bottom:20px; }
.stat-item{ text-align:center; padding:16px; background:#f8fafc; border-radius:8px; border:1px solid #e5e7eb; transition:all .2s ease; }
.stat-item:hover{ background:#f1f5f9; transform:scale(1.02); }
.stat-number{ font-size:28px; font-weight:700; margin-bottom:4px; color:var(--text); }
.stat-label{ font-size:12px; color:var(--muted); font-weight:500; text-transform:uppercase; letter-spacing:0.5px; }
.card-actions{ text-align:center; }
.btn-primary{ background:var(--primary); color:#fff; padding:12px 24px; border-radius:8px; text-decoration:none; font-weight:600; display:inline-block; transition:all .2s ease; border:none; cursor:pointer; }
.btn-primary:hover{ background:#1e40af; transform:translateY(-1px); box-shadow:0 4px 12px rgba(31,122,224,.3); }
.quick-actions-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:16px; }
.quick-action-btn{ display:flex; flex-direction:column; align-items:center; padding:20px 16px; background:#f8fafc; border:2px solid #e5e7eb; border-radius:12px; text-decoration:none; color:var(--text); font-weight:500; transition:all .3s ease; }
.quick-action-btn:hover{ background:var(--primary); color:#fff; border-color:var(--primary); transform:translateY(-2px); box-shadow:0 8px 25px rgba(31,122,224,.2); }
.quick-action-btn i{ font-size:24px; margin-bottom:8px; }
.progress-ring{ position:relative; width:60px; height:60px; margin:0 auto 12px; }
.progress-ring-circle{ transform:rotate(-90deg); transform-origin:50% 50%; stroke-dasharray:164; stroke-dashoffset:164; transition:stroke-dashoffset .3s ease; }
.stat-progress{ display:flex; align-items:center; justify-content:center; flex-direction:column; }
.progress-text{ font-size:10px; color:var(--muted); margin-top:4px; }

/* Status indicators */
.status-indicator{ display:inline-flex; align-items:center; gap:6px; }
.status-dot{ width:8px; height:8px; border-radius:50%; }
.status-open .status-dot{ background:#3b82f6; }
.status-in_progress .status-dot{ background:#f59e0b; }
.status-resolved .status-dot{ background:#10b981; }
.status-hardware .status-dot{ background:#8b5cf6; }
.status-software .status-dot{ background:#06b6d4; }
.status-network .status-dot{ background:#10b981; }

/* Responsive adjustments */
@media(max-width:768px){ 
  .dashboard-stats{ grid-template-columns:1fr; }
  .quick-actions-grid{ grid-template-columns:repeat(2,1fr); }
}
.modal-compact{ max-width:500px; }
.asset-tag{ background:#fff; border:2px solid #1f7ae0; border-radius:8px; padding:20px; text-align:center; box-shadow:0 4px 12px rgba(0,0,0,.1); }
.asset-tag-header{ background:#1f7ae0; color:#fff; padding:12px; margin:-20px -20px 20px -20px; border-radius:8px 8px 0 0; }
.asset-tag-title{ font-size:18px; font-weight:700; margin:0; }
.asset-tag-subtitle{ font-size:14px; opacity:0.9; margin:4px 0 0 0; }
.asset-tag-body{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:20px 0; }
.asset-tag-section{ background:#f8fafc; padding:12px; border-radius:6px; border-left:4px solid #1f7ae0; }
.asset-tag-label{ font-size:11px; text-transform:uppercase; color:#6b7280; font-weight:600; margin-bottom:4px; }
.asset-tag-value{ font-size:14px; color:#1f2937; font-weight:500; }
.asset-tag-footer{ background:#f1f5f9; padding:12px; margin:-20px -20px 0 -20px; border-radius:0 0 8px 8px; border-top:1px solid #e5e7eb; }
.asset-tag-id{ font-family:monospace; font-size:12px; color:#6b7280; }
.print-button{ background:#16a34a; color:#fff; border:none; padding:8px 16px; border-radius:6px; cursor:pointer; font-weight:600; margin-right:8px; }
.print-button:hover{ background:#15803d; }

/* Ticket action buttons */
.btn-edit, .btn-view{ padding:8px 14px; border-radius:6px; font-size:13px; font-weight:600; cursor:pointer; border:none; margin:2px; transition:all .2s ease; min-width:120px; height:36px; display:inline-flex; align-items:center; justify-content:center; box-shadow:0 1px 2px rgba(0,0,0,.06); }
.btn-edit{ background:#fff7ed; color:#9a3412; border:1px solid #fed7aa; }
.btn-edit:hover{ background:#fed7aa; color:#7c2d12; transform:translateY(-1px); }
.btn-view{ background:#eff6ff; color:#1e40af; border:1px solid #bfdbfe; }
.btn-view:hover{ background:#bfdbfe; color:#1e3a8a; transform:translateY(-1px); }
.btn-edit:focus, .btn-view:focus{ outline:2px solid #93c5fd; outline-offset:2px; }

/* Asset Sticker/Tagging Styles - Simplified */
.asset-sticker-container {
  background: #fff;
  border: 2px solid #1f7ae0;
  border-radius: 12px;
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sticker-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.sticker-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.sticker-subtitle {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.asset-type-badge, .asset-tag-badge {
  background: #1f7ae0;
  color: white;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}

.sticker-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.sticker-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-group {
  background: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid #1f7ae0;
}

.info-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.asset-id {
  font-family: monospace;
  font-size: 16px;
  color: #1f7ae0;
}

.serial-number {
  font-family: monospace;
  font-size: 13px;
  color: #4b5563;
}

.assigned-user {
  font-weight: 700;
  color: #059669;
}

.sticker-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.date-info {
  display: flex;
  gap: 24px;
}

.date-item {
  text-align: center;
}

.date-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 4px;
}

.date-value {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.warranty-active {
  color: #059669;
}

.warranty-expired {
  color: #dc2626;
}

.sticker-qr-placeholder {
  text-align: center;
  background: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  border: 1px dashed #d1d5db;
}

.qr-code {
  width: 60px;
  height: 60px;
  margin: 0 auto 8px;
  background: #e5e7eb;
  border: 2px solid #1f7ae0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-pattern {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 40px;
  height: 40px;
}

.qr-square {
  background: #1f7ae0;
  border-radius: 1px;
}

.qr-square:nth-child(1),
.qr-square:nth-child(3),
.qr-square:nth-child(7),
.qr-square:nth-child(9) {
  background: transparent;
}

.qr-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
}

.sticker-details-section {
  margin-bottom: 16px;
}

.details-toggle {
  width: 100%;
  background: #1f7ae0;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.details-toggle:hover {
  background: #1e40af;
}

.details-content {
  background: #f8fafc;
  border-radius: 0 0 8px 8px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-top: none;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #e5e7eb;
}

.detail-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
}

.detail-value {
  font-size: 13px;
  color: #1f2937;
}

/* Password toggle button inside inputs */
.toggle-eye{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  background:transparent;
  border:none;
  width:28px; height:28px;
  color:#6b7280;
  cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
}
.toggle-eye:hover{ color:#374151; }

.sticker-notes {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.notes-label {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 6px;
}

.notes-content {
  font-size: 13px;
  color: #78350f;
  line-height: 1.4;
}

.sticker-footer-info {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 11px;
}

/* Client Form Styles */
.ticket-type-selection {
  margin-bottom: 24px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
}

.ticket-type-selection label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 16px;
  display: block;
}

.type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.type-option {
  cursor: pointer;
}

.type-option input[type="radio"] {
  display: none;
}

.type-card {
  padding: 20px;
  border: 3px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  transition: all 0.2s ease;
  text-align: center;
}

.type-option input[type="radio"]:checked + .type-card {
  border-color: #1f7ae0;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(31, 122, 224, 0.1);
}

.type-card h3 {
  margin: 0 0 8px 0;
  color: #1f2937;
  font-size: 18px;
}

.type-card p {
  margin: 0 0 8px 0;
  color: #6b7280;
  font-size: 14px;
}

.type-card small {
  color: #9ca3af;
  font-size: 12px;
  display: block;
}

.form-section {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-bottom: 16px;
}

.form-section h4 {
  margin: 0 0 16px 0;
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 2px solid #1f7ae0;
  padding-bottom: 8px;
}

.submit-section {
  text-align: center;
  padding-top: 20px;
  border-top: 2px solid #e5e7eb;
  margin-top: 20px;
}

.submit-section .btn {
  margin: 0 8px;
  min-width: 120px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .type-options {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 16px;
  }

  .submit-section .btn {
    display: block;
    margin: 8px auto;
    width: 100%;
    max-width: 200px;
  }
}
