/* assets/css/itil-theme.css - High Contrast Crisp Dark-Text White Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

:root {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.98);
  
  --text-main: #0f172a;
  --text-muted: #0f172a;
  --text-dim: #1e293b;
  
  --accent-primary: #15803d;
  --accent-secondary: #047857;
  --accent-gradient: linear-gradient(135deg, #15803d 0%, #047857 100%);

  --color-critica: #dc2626;
  --color-alta: #ea580c;
  --color-media: #ca8a04;
  --color-baja: #16a34a;
  
  --border-subtle: #cbd5e1;
  --border-active: #15803d;

  --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.06);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Layout Core */
.app-wrapper {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* Sidebar Styling - White Theme */
.app-sidebar {
  width: 280px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: fixed;
  height: 100vh;
  z-index: 100;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.04);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 1.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.brand-logo {
  width: 42px;
  height: 42px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.brand-title span {
  display: block;
  font-size: 0.68rem;
  color: #475569;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  overflow-y: auto;
}

.nav-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.5px;
  padding: 0.75rem 0.75rem 0.25rem 0.75rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.nav-link i {
  font-size: 1.15rem;
  color: #475569;
}

.nav-link:hover {
  background: var(--bg-surface-elevated);
  color: var(--accent-primary);
}

.nav-link:hover i {
  color: var(--accent-primary);
}

.nav-link.active {
  background: #dcfce7;
  color: var(--accent-primary);
  border-left: 4px solid var(--accent-primary);
  font-weight: 800;
}

.nav-link.active i {
  color: var(--accent-primary);
}

.sidebar-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.user-details h4 {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.1rem;
}

.user-details p {
  font-size: 0.72rem;
  color: #475569;
  font-weight: 700;
}

.btn-logout {
  color: #64748b;
  font-size: 1.1rem;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-logout:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* Main Content Area */
.app-content {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
  max-width: calc(100vw - 280px);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.page-title h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.page-title p {
  font-size: 0.88rem;
  color: #0f172a;
  font-weight: 700;
  margin-top: 0.2rem;
}

/* Cards Design System */
.itil-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.kpi-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-data h3 {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f172a;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.kpi-sub {
  font-size: 0.78rem;
  color: #0f172a;
  font-weight: 700;
  margin-top: 0.4rem;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.icon-blue { background: #dcfce7; color: var(--accent-primary); }
.icon-purple { background: #e0e7ff; color: #4f46e5; }
.icon-orange { background: #ffedd5; color: #ea580c; }
.icon-green { background: #dcfce7; color: #16a34a; }
.icon-red { background: #fee2e2; color: #dc2626; }

/* Tables Design System */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.itil-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.itil-table th {
  background: var(--bg-surface-elevated);
  padding: 1rem 1.25rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f172a;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}

.itil-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: #0f172a;
  font-weight: 700;
}

.itil-table tr:last-child td {
  border-bottom: none;
}

.itil-table tr:hover td {
  background: #f8fafc;
}

/* Badges ITIL */
.badge-itil {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-critica { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.badge-alta { background: #ffedd5; color: #ea580c; border: 1px solid #fdba74; }
.badge-media { background: #fef9c3; color: #ca8a04; border: 1px solid #fde047; }
.badge-baja { background: #dcfce7; color: #16a34a; border: 1px solid #86efac; }

.badge-estado {
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
}

.st-nuevo { background: #dcfce7; color: var(--accent-primary); }
.st-asignado { background: #e0e7ff; color: #4f46e5; }
.st-enproceso { background: #fef3c7; color: #d97706; }
.st-enespera { background: #f1f5f9; color: #475569; }
.st-resuelto { background: #dcfce7; color: #15803d; }
.st-cerrado { background: #e2e8f0; color: #334155; }

/* Buttons System */
.btn-itil {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: #f1f5f9;
}

/* Forms System */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.form-control, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control::placeholder {
  color: #0f172a;
  font-weight: 500;
  opacity: 0.7;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
  color: #0f172a;
}

/* Alerts */
.alert-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  font-weight: 800;
}

.alert-success { background: #f0fdf4; color: #15803d; border: 1.5px solid #86efac; }
.alert-danger { background: #fef2f2; color: #b91c1c; border: 1.5px solid #fca5a5; }

/* Login Container Split Screen */
.login-body {
  display: flex;
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: var(--bg-surface);
}

.login-left {
  flex: 1;
  background-image: url('../img/login_bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: none;
  position: relative;
}

.login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(21, 128, 61, 0.75); /* Opaque green */
  backdrop-filter: blur(4px); /* Blur effect */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 3rem;
}

.login-overlay h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.login-overlay p {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 85%;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Tabs styles */
.itil-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}
.itil-tab {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}
.itil-tab:hover {
  color: var(--accent-primary);
}
.itil-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}
.itil-tab-content {
  display: none;
}
.itil-tab-content.active {
  display: block;
}

@media (min-width: 992px) {
  .login-left {
    display: block;
  }
}

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-surface);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  color: var(--text-main);
}

/* Mobile Navigation & Responsive Media Queries */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .app-sidebar {
    display: none !important; /* Ocultar sidebar en dispositivos móviles */
  }

  .app-wrapper {
    flex-direction: column;
    min-height: 100vh;
  }

  .app-content {
    margin-left: 0 !important;
    padding: 1rem 0.85rem 85px 0.85rem !important; /* Espacio inferior amplio para no tapar contenido */
    max-width: 100% !important;
    width: 100% !important;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .page-title h1 {
    font-size: 1.35rem;
  }

  /* Grid layouts responsive en teléfono */
  .grid-cards, div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Fixed Bottom Navbar estilo App Nativa */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: #ffffff;
    border-top: 1.5px solid #cbd5e1;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    z-index: 10000;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.5rem;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #475569;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 800;
    gap: 0.25rem;
    flex: 1;
    height: 52px;
    border-radius: 12px;
    transition: all 0.2s ease;
  }

  .mobile-nav-item i {
    font-size: 1.35rem;
    transition: transform 0.2s ease;
  }

  .mobile-nav-item.active {
    color: var(--accent-primary);
    background: #dcfce7; /* green-100 */
  }

  .mobile-nav-item.active i {
    transform: scale(1.15);
    color: var(--accent-primary);
  }
}

/* ==========================================================================
   MAGIC NOTES - ESTILOS PREMIUM FLOTANTE & MODAL EXPANDIBLE
   ========================================================================== */

/* Botón Flotante Magic Note */
.btn-magic-note-floating {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #06b6d4 100%);
  color: #ffffff;
  border: none;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.btn-magic-note-floating:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-magic-note-floating i {
  font-size: 1.05rem;
  animation: magicSparkle 2s infinite ease-in-out;
}

@keyframes magicSparkle {
  0%, 100% { transform: rotate(0deg) scale(1); filter: brightness(1); }
  50% { transform: rotate(15deg) scale(1.2); filter: brightness(1.3); }
}

.magic-note-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  margin-left: 0.2rem;
}

/* Backdrop del Modal */
.magic-note-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.magic-note-backdrop.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

/* Modal Expandible con Pop desde el punto del botón */
.magic-note-modal {
  width: 92vw;
  max-width: 950px;
  max-height: 88vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.2) translate(100px, -200px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  transform-origin: top right;
}

.magic-note-backdrop.active .magic-note-modal {
  transform: scale(1) translate(0, 0);
  opacity: 1;
}

/* Header Modal */
.magic-modal-header {
  padding: 1.1rem 1.4rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.magic-icon-badge {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.btn-close-magic {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #64748b;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-close-magic:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Barra de Filtros y Categorías */
.magic-filter-bar {
  padding: 0.75rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow-x: auto;
}

.magic-categories-scroll {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.magic-cat-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.magic-cat-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.magic-cat-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.btn-toggle-new-note {
  padding: 0.4rem 0.85rem;
  background: #16a34a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
  transition: all 0.2s ease;
}

.btn-toggle-new-note:hover {
  background: #15803d;
  transform: translateY(-1px);
}

/* Formulario desplegable */
.magic-form-container {
  padding: 1rem 1.4rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  animation: slideDownMagic 0.25s ease-out;
}

@keyframes slideDownMagic {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.magic-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.magic-input, .magic-select, .magic-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.2s ease;
}

.magic-input:focus, .magic-select:focus, .magic-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.magic-color-picker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid transparent;
}

.color-dot.selected {
  transform: scale(1.2);
  border-color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.btn-cancel-note {
  background: #e2e8f0;
  color: #475569;
  border: none;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-save-note {
  background: #3b82f6;
  color: #ffffff;
  border: none;
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-save-note:hover {
  background: #2563eb;
}

.btn-save-note:hover {
  background: #2563eb;
}

/* Grid de Memos / Sticky Notes */
.magic-notes-grid-wrapper {
  padding: 1.25rem;
  overflow-y: auto;
  max-height: calc(88vh - 140px);
  background: #f8fafc;
  flex: 1;
}

.magic-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
}

@media (max-width: 640px) {
  .magic-notes-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Estilo Memo / Nota Adhesiva */
.magic-memo-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  border-top: 5px solid #3b82f6;
  border-left: 1.5px solid #e2e8f0;
  border-right: 1.5px solid #e2e8f0;
  border-bottom: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.magic-memo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.magic-memo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.card-target-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 6px;
}

.card-cat-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.magic-memo-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.magic-memo-body {
  font-size: 0.82rem;
  color: #475569;
  white-space: pre-line;
  line-height: 1.45;
  margin-bottom: 1rem;
  flex: 1;
  word-break: break-word;
}

.magic-memo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.6rem;
  margin-top: 0.4rem;
}

.magic-memo-date {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
}

.magic-memo-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-card-action {
  background: #f1f5f9;
  border: none;
  color: #475569;
  font-size: 0.85rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-card-action:hover {
  background: #0f172a;
  color: #ffffff;
}

.btn-card-action.delete:hover {
  background: #ef4444;
  color: #ffffff;
}


