@import url('variables.css');

/* Reset y base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--rp-font);
  background: var(--rp-bg);
  color: var(--rp-gray-dark);
  font-size: 14px;
  line-height: 1.6;
}

/* Layout principal */
.rp-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.rp-sidebar {
  width: 240px;
  background: var(--rp-purple-dark);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.rp-sidebar-logo {
  padding: 16px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.rp-sidebar-logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

.rp-sidebar-logo-name {
  color: white;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.rp-sidebar-logo-sub {
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  margin-top: 2px;
}

.rp-sidebar-menu {
  padding: 12px 0;
  flex: 1;
}

.rp-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.rp-menu-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
  border-left-color: var(--rp-teal-light);
}

.rp-menu-item.active {
  background: var(--rp-teal);
  color: white;
  border-left-color: var(--rp-teal-light);
}

.rp-menu-item i {
  font-size: 17px;
  flex-shrink: 0;
}

/* Contenido principal */
.rp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.rp-topbar {
  background: var(--rp-white);
  border-bottom: var(--rp-border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.rp-topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--rp-purple-dark);
}

.rp-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rp-topbar-bell {
  color: var(--rp-purple);
  font-size: 20px;
  cursor: pointer;
  position: relative;
}

.rp-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: var(--rp-danger);
  color: white;
  font-size: 9px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.rp-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--rp-purple);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.rp-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--rp-purple-dark);
}

/* Área de contenido */
.rp-content {
  padding: 24px;
  flex: 1;
}

/* Tarjetas */
.rp-card {
  background: var(--rp-white);
  border: var(--rp-border);
  border-radius: var(--rp-radius);
  padding: 20px;
  box-shadow: var(--rp-shadow);
}

/* Tarjetas de estadísticas */
.rp-stat-card {
  background: var(--rp-white);
  border: var(--rp-border);
  border-radius: var(--rp-radius);
  padding: 16px 20px;
  box-shadow: var(--rp-shadow);
}

.rp-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--rp-purple-dark);
}

.rp-stat-label {
  font-size: 12px;
  color: var(--rp-gray);
  margin-top: 2px;
}

/* Botones */
.rp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--rp-radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
}

.rp-btn-primary {
  background: var(--rp-purple);
  color: white;
}

.rp-btn-primary:hover {
  background: var(--rp-purple-dark);
}

.rp-btn-secondary {
  background: var(--rp-teal-pale);
  color: var(--rp-teal-dark);
  border: 1px solid var(--rp-teal-light);
}

.rp-btn-secondary:hover {
  background: var(--rp-teal-light);
}

/* Badges de estado */
.rp-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.rp-badge-success {
  background: var(--rp-success-pale);
  color: var(--rp-success);
}

.rp-badge-warning {
  background: var(--rp-warning-pale);
  color: var(--rp-warning);
}

.rp-badge-danger {
  background: var(--rp-danger-pale);
  color: var(--rp-danger);
}

.rp-badge-purple {
  background: var(--rp-purple-pale);
  color: var(--rp-purple-dark);
}

.rp-badge-teal {
  background: var(--rp-teal-pale);
  color: var(--rp-teal-dark);
}

/* Formularios */
.rp-form-group {
  margin-bottom: 16px;
}

.rp-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--rp-purple-dark);
  margin-bottom: 6px;
}

.rp-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--rp-gray-light);
  border-radius: var(--rp-radius-sm);
  font-size: 13px;
  font-family: var(--rp-font);
  color: var(--rp-gray-dark);
  background: var(--rp-white);
  transition: border-color 0.15s;
}

.rp-input:focus {
  outline: none;
  border-color: var(--rp-purple);
  box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.1);
}

/* Tablas */
.rp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rp-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--rp-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--rp-gray-light);
}

.rp-table td {
  padding: 12px 14px;
  border-bottom: 0.5px solid var(--rp-gray-light);
  color: var(--rp-gray-dark);
}

.rp-table tr:hover td {
  background: var(--rp-purple-pale);
}

/* Barra de progreso */
.rp-progress {
  height: 6px;
  background: var(--rp-gray-light);
  border-radius: 3px;
  overflow: hidden;
}

.rp-progress-fill {
  height: 100%;
  background: var(--rp-teal);
  border-radius: 3px;
  transition: width 0.3s;
}

/* Títulos de sección */
.rp-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--rp-purple-dark);
  margin-bottom: 16px;
}

/* Grids responsivos */
.rp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rp-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.rp-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }