/* admin.css */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #0D0D0D;
  --bg-card: #1A1A1A;
  --bg-card-2: #222222;
  --red: #E31E24;
  --text: #ffffff;
  --text-muted: #888888;
  --border: #333333;
  --sidebar-width: 260px;
  --header-height: 60px;
  --transition: all 0.3s ease;
}

body.light-mode {
  --bg-dark: #f5f5f5;
  --bg-card: #ffffff;
  --bg-card-2: #f0f0f0;
  --text: #1a1a1a;
  --text-muted: #666666;
  --border: #dddddd;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; }

body {
  background-color: var(--bg-dark); color: var(--text); transition: var(--transition); display: flex;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width); background-color: #111; color: #fff; height: 100vh;
  position: fixed; left: 0; top: 0; display: flex; flex-direction: column; transition: var(--transition); z-index: 1000;
}
.sidebar .logo-container { padding: 20px; text-align: center; border-bottom: 1px solid #333; }
.sidebar .logo-container img { max-width: 150px; }
.sidebar-nav { flex: 1; padding: 20px 0; overflow-y: auto; }
.sidebar-nav a { display: flex; align-items: center; padding: 12px 20px; color: #aaa; text-decoration: none; transition: var(--transition); gap: 15px; }
.sidebar-nav a:hover, .sidebar-nav a.active { color: #fff; background-color: var(--bg-card-2); border-left: 4px solid var(--red); }
.sidebar-nav a i { width: 20px; text-align: center; }
.user-info { padding: 15px 20px; border-top: 1px solid #333; display: flex; align-items: center; gap: 15px; }
.user-info .avatar { width: 40px; height: 40px; border-radius: 50%; background-color: var(--red); display: flex; align-items: center; justify-content: center; font-weight: bold; }
.logout-btn { color: var(--red); cursor: pointer; }

/* Main Wrapper */
.main-wrapper { margin-left: var(--sidebar-width); flex: 1; min-height: 100vh; display: flex; flex-direction: column; transition: var(--transition); width: calc(100% - var(--sidebar-width)); }

/* Header */
.header { height: var(--header-height); background-color: var(--bg-card); padding: 0 30px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 999; }
.header-right { display: flex; align-items: center; gap: 20px; }
.icon-btn { background: none; border: none; color: var(--text); font-size: 1.2rem; cursor: pointer; position: relative; }
.badge { position: absolute; top: -5px; right: -8px; background-color: var(--red); color: white; font-size: 0.7rem; padding: 2px 5px; border-radius: 10px; }

/* Content */
.content { padding: 30px; flex: 1; }
.page-title { margin-bottom: 20px; font-size: 1.8rem; }

/* Cards & Components */
.card { background-color: var(--bg-card); border-radius: 8px; padding: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); border: 1px solid var(--border); }
.btn { padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; transition: var(--transition); }
.btn-primary { background-color: var(--red); color: white; }
.btn-primary:hover { filter: brightness(1.2); }
.btn-secondary { background-color: var(--bg-card-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background-color: var(--border); }
.btn-danger { background-color: #dc3545; color: white; }
.form-control { width: 100%; padding: 10px; background-color: var(--bg-card-2); border: 1px solid var(--border); color: var(--text); border-radius: 5px; margin-bottom: 15px; }
.form-label { display: block; margin-bottom: 5px; font-size: 0.9rem; color: var(--text-muted); }

/* Tables */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-muted); font-weight: 600; }
.table tbody tr:hover { background-color: var(--bg-card-2); }

/* Modals */
.modal-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 2000; }
.modal-backdrop.show { display: flex; }
.modal { background-color: var(--bg-card); width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; border-radius: 8px; border: 1px solid var(--border); }
.modal-header { padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; }
.modal-footer { padding: 15px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.close-modal { cursor: pointer; color: var(--text-muted); font-size: 1.2rem; }

/* Badges */
.status-badge { padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.badge-recibido { background-color: rgba(52, 152, 219, 0.2); color: #3498db; }
.badge-diagnostico { background-color: rgba(230, 126, 34, 0.2); color: #e67e22; }
.badge-reparacion { background-color: rgba(241, 196, 15, 0.2); color: #f1c40f; }
.badge-listo { background-color: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.badge-entregado { background-color: rgba(149, 165, 166, 0.2); color: #95a5a6; }

/* Notifications Panel */
.notifications-panel { position: absolute; top: 50px; right: 0; width: 300px; background-color: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.5); display: none; flex-direction: column; }
.notifications-panel.show { display: flex; }
.notif-header { padding: 10px 15px; border-bottom: 1px solid var(--border); font-weight: bold; }
.notif-body { max-height: 300px; overflow-y: auto; padding: 10px; }
.notif-item { padding: 10px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }

/* Responsive */
.mobile-toggle { display: none; }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; width: 100%; }
  .mobile-toggle { display: block; }
}

@media print {
  .sidebar, .header, .btn, .modal, .no-print { display: none !important; }
  .main-wrapper { margin: 0; padding: 0; width: 100%; }
  body { background: white; color: black; }
  .content { padding: 0; }
  .card { box-shadow: none; border: none; }
}
