/* Estilos Generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}
h1,
h2,
h3 {
  color: #333;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
  color: white;
  min-height: 100vh;
  padding: 20px 0;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar h3 {
  color: white;
  padding: 0 20px;
  margin-bottom: 30px;
  font-size: 24px;
  font-weight: 600;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar ul li {
  margin: 5px 0;
}

.sidebar ul li a {
  display: block;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar ul li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: #3498db;
}

.sidebar ul li a.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border-left-color: #3498db;
}

.sidebar button.btn-danger {
  width: calc(100% - 40px);
  margin: 20px;
  padding: 12px;
  background-color: #e74c3c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.sidebar button.btn-danger:hover {
  background-color: #c0392b;
}

/* Panel Layout */
.panel-layout {
  display: flex;
  min-height: 100vh;
}

.panel-content {
  flex: 1;
  padding: 20px;
  background-color: #f5f5f5;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 20px;
  width: 90%;
  max-width: 800px;
  border-radius: 8px;
  max-height: 90vh;
  overflow-y: auto;
}

.error-msg {
  color: red;
  font-size: 0.8em;
  display: block;
  margin-top: 5px;
}

/* Tabs */
.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.tab-btn.active {
  border-bottom: 3px solid #007bff;
  color: #007bff;
}

.tab-btn:hover {
  background-color: #f8f9fa;
}

/* Form Inputs */
input,
textarea,
select {
  margin-bottom: 5px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Buttons */
button {
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-add {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 500;
}

.btn-add:hover {
  background-color: #218838;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

table thead {
  background-color: #f8f9fa;
}

table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #555;
  border-bottom: 2px solid #dee2e6;
}

table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
}

table tbody tr:hover {
  background-color: #f8f9fa;
}

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

/* LOGIN */

.login-wrapper {
  position: fixed;
  inset: 0;
  background-color: #0d0b08;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow: hidden;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  text-align: center;
  margin-bottom: 48px;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(180, 140, 90, 0.4);
  border-radius: 50%;
  margin-bottom: 16px;
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  stroke: #b48c5a;
  fill: none;
  stroke-width: 1.5;
}

.brand h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 36px;
  font-weight: 300;
  color: #f0e8d8;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand p {
  font-size: 11px;
  font-weight: 300;
  color: rgba(180, 140, 90, 0.85); 
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 6px;
}

.login-card {
  background: rgba(255, 255, 255, 0.03);
  width: 500px;
  border: 1px solid rgba(180, 140, 90, 0.2);
  border-radius: 2px;
  padding: 44px 40px 40px;
  backdrop-filter: blur(12px);
  margin: 0 auto;
}

.login-card::before,
.login-card::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: rgba(180, 140, 90, 0.5);
  border-style: solid;
}
.login-card::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}
.login-card::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}

.card-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
  font-weight: 400;
  color: rgba(200, 160, 100, 0.9); 
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 32px;
  text-align: center;
}

.field-group {
  margin-bottom: 28px;
  position: relative;
}

.field-group label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(200, 160, 100, 0.9); 
  margin-bottom: 10px;
}

.field-group input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(180, 140, 90, 0.25);
  border-radius: 0;
  padding: 10px 0;
  font-family: "Jost", sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: #f0e8d8;
  outline: none;
  margin-bottom: 0;
  box-shadow: none;
}

.field-group input::placeholder {
  color: rgba(240, 232, 216, 0.45);
}
.field-group input:focus {
  border-bottom-color: transparent;
  box-shadow: none;
}
.field-group input:-webkit-autofill,
.field-group input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0d0b08 inset;
  -webkit-text-fill-color: #f0e8d8;
}

.field-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #b48c5a;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.field-group:has(input:focus) .field-line {
  width: 100%;
}

.btn-login {
  width: 100%;
  margin-top: 36px;
  padding: 14px 24px;
  background: transparent;
  border: 1px solid rgba(180, 140, 90, 0.5);
  color: #b48c5a;
  font-family: "Jost", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}
.btn-login span {
  position: relative;
  z-index: 1;
}
.btn-login::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(180, 140, 90, 0.12);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-login:hover::before {
  transform: scaleX(1);
}
.btn-login:hover {
  color: #f0e8d8;
  border-color: rgba(180, 140, 90, 0.8);
  transform: none;
  opacity: 1;
}
.btn-login:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-login:disabled:hover::before {
  transform: scaleX(0);
}

#msg {
  margin-top: 20px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.05em;
  text-align: center;
  min-height: 18px;
  transition: all 0.3s ease;
  color: transparent;
}
#msg.loading {
  color: rgba(180, 140, 90, 0.7);
}
#msg.error {
  color: #e07070;
}
#msg.success {
  color: #7ab87a;
}

.login-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: rgba(180, 140, 90, 0.3);
  text-transform: uppercase;
}
/* Header de la página */
.design-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.design-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.design-header p {
    font-size: 0.9rem;
    color: #9ca3af;
    margin: 0;
}

/* Card contenedora del form */
.design-card {
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
    padding: 32px;
}

/* Bloques de sección */
.section-block {
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid #f3f4f6;
}

.section-block:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}

.section-hint {
    font-size: 0.82rem;
    color: #ffffff;
    margin: 0 0 18px 0;
}

.section-hint code {
    background: #f3f4f6;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Grid de colores — 3 columnas */
.color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.color-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-field label {
    font-size: 0.83rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.color-field label span {
    font-weight: 400;
    color: #9ca3af;
}

/* Grupo picker + hex + dot */
.color-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker {
    width: 44px;
    height: 44px;
    padding: 3px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.color-picker:hover {
    border-color: #9ca3af;
}

.hex-input {
    font-family: 'Courier New', monospace;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    width: 105px;
    padding: 8px 10px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 0;
}

.hex-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: #fff;
}

.color-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    display: inline-block;
}

.color-dot:hover {
    transform: scale(1.1);
}

/* Layout tipografía: select a la izq, preview a la der */
.font-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 20px;
    align-items: start;
}

.field-label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    /* color: #374151; */
    color: #ffffff;
    margin-bottom: 8px;
}

.field-label span {
    font-weight: 400;
    color: #9ca3af;
}

.font-select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: auto;
    margin-bottom: 0;
}

.font-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: #fff;
}

/* Preview de fuente */
.font-preview-box {
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 22px;
    min-height: 90px;
}

.font-preview-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #fa00ed;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.font-preview-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.35;
    transition: font-family 0.2s ease;
}

.font-preview-sub {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 5px;
    transition: font-family 0.2s ease;
}

/* Upload field */
.upload-field {
    margin-top: 20px;
}

.file-input {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 1.5px dashed #d1d5db;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #6b7280;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-bottom: 0;
}

.file-input:hover {
    border-color: #6366f1;
    background: #f5f3ff;
}

.current-image-note {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #9ca3af;
}

.current-image-note a {
    color: #6366f1;
    text-decoration: none;
}

.current-image-note a:hover {
    text-decoration: underline;
}

/* Footer del form con botón */
.form-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
    margin-top: 8px;
}

.btn-save {
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 28px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(44,62,80,0.2);
}

.btn-save:hover {
    background: #1a252f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44,62,80,0.3);
}

.btn-save:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    .color-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .color-grid {
        grid-template-columns: 1fr;
    }
    .font-layout {
        grid-template-columns: 1fr;
    }
    .design-card {
        padding: 20px;
    }
}







/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    min-height: auto;
  }

  .panel-layout {
    flex-direction: column;
  }

  .modal-content {
    width: 95%;
    margin: 10px;
    padding: 15px;
  }
}
