/* =========================================================
   KEYAK STORE ADMIN CSS
   Clean consolidated version
   Replace app/public/css/admin.css completely with this file.
   ========================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
    --black: #111111;
    --dark: #1a1a1a;
    --pink: #d92f83;
    --pink-dark: #814092;
    --gold: #b99048;
    --gold-light: #f4d779;
    --white: #ffffff;
    --soft: #fbf8f9;
    --border: #eee7eb;
    --text: #202020;
    --muted: #777777;
    --danger: #b42335;
    --success: #1f7d52;
    --warning: #8a641b;
    --shadow: 0 16px 42px rgba(20, 20, 20, 0.055);
    --gold-gradient: linear-gradient(135deg, #fff3b0 0%, #f4d779 16%, #d7a53b 42%, #9a681d 72%, #f8e6a0 100%);
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--soft);
    color: var(--text);
    font-family: "Manrope", "Montserrat", Arial, sans-serif;
    font-weight: 400;
    overflow-x: hidden;
}

a { color: inherit; }

h1,h2,h3,h4,h5,h6,p { margin-top: 0; }

h1,h2,h3,h4,h5,h6,p,a,span,label,input,textarea,select,button,small,td,th {
    font-family: "Manrope", "Montserrat", Arial, sans-serif;
}

/* Layout */
.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
}

.admin-sidebar {
    background:
        radial-gradient(circle at top left, rgba(217, 47, 131, 0.12), transparent 38%),
        linear-gradient(180deg, #111111, #050505);
    color: var(--white);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-main {
    min-width: 0;
    width: 100%;
}

.admin-content {
    padding: 48px 36px 36px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* Sidebar brand */
.admin-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 24px;
}

.admin-brand-mark,
.admin-brand-text,
.admin-brand-text h1,
.admin-brand-text p {
    display: none !important;
}

.admin-brand.admin-brand-centered {
    display: grid;
    justify-items: start;
    align-items: start;
    text-align: left;
    gap: 14px;
    padding: 30px 0 28px 30px;
    margin: 0 0 24px;
}

.admin-brand-logo-link {
    width: auto;
    height: auto;
    min-width: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    overflow: visible;
}

.admin-sidebar-logo {
    width: 165px;
    max-width: 165px;
    height: auto;
    display: block;
    object-fit: contain;
}

.admin-brand-subtitle {
    margin: 0;
    padding-left: 2px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
    line-height: 1.3;
    font-weight: 600;
}

/* Sidebar menu */
.admin-menu { display: grid; gap: 9px; }

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.admin-menu a span {
    color: rgba(217, 47, 131, 0.95);
    font-size: 12px;
    font-weight: 700;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    transform: translateX(3px);
}

.admin-sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 10px;
    padding-top: 24px;
}

.admin-sidebar-footer a {
    text-align: center;
    text-decoration: none;
    border-radius: 999px;
    padding: 12px 14px;
    font-weight: 500;
    font-size: 13px;
}

.admin-sidebar-footer a:first-child {
    background: rgba(255, 255, 255, 0.10);
    color: var(--white);
}

.admin-sidebar-footer a:last-child {
    background: #ffffff;
    color: #111111;
}

/* Topbar */
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    min-height: 112px;
    padding: 28px 42px;
    background: #ffffff;
    border-bottom: 1px solid #ece7eb;
    position: relative;
    z-index: 500;
    overflow: visible;
}

.admin-topbar > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-eyebrow {
    margin: 0 0 8px;
    color: var(--pink);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.admin-topbar h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.admin-user-menu {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
    align-self: center;
    z-index: 99999;
}

.admin-user-trigger {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    min-width: 300px;
    max-width: 340px;
    border: 1px solid #ece7eb;
    background: #ffffff;
    border-radius: 999px;
    padding: 10px 12px 10px 24px;
    cursor: pointer;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
}

.admin-user-info { display: grid; gap: 4px; text-align: right; min-width: 0; }

.admin-user-info strong {
    display: block;
    color: #111111;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.admin-user-info span {
    display: block;
    color: #77747a;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.admin-avatar {
    width: 54px;
    height: 54px;
    min-width: 54px;
    min-height: 54px;
    border-radius: 50%;
    background: #111111;
    color: #ffffff;
    display: grid;
    place-items: center;
    overflow: hidden;
    font-size: 18px;
    font-weight: 800;
}

.admin-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.admin-user-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 280px;
    background: #ffffff;
    border: 1px solid #ece7eb;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.16);
    padding: 14px;
    z-index: 999999;
    display: none;
}

.admin-user-dropdown-menu.open,
.admin-user-menu:hover .admin-user-dropdown-menu { display: grid; }

.admin-user-dropdown-menu a {
    min-height: 50px;
    border-radius: 16px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    color: #222222;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.admin-user-dropdown-menu a:hover { background: #faf8f9; }
.admin-user-dropdown-menu .logout-link { color: #d72845; }

/* Page headers */
.admin-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
    position: relative;
    z-index: 1;
}

.admin-page-header h1 { margin: 0; font-size: 34px; font-weight: 500; }
.admin-page-header p { margin: 9px 0 0; color: var(--muted); line-height: 1.6; font-weight: 400; }

/* Cards */
.admin-card,
.dashboard-card,
.stat-card,
.payment-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.admin-card {
    padding: 28px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.admin-card.form-card,
.form-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 28px;
    border-radius: 24px;
}

.admin-grid,
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.dashboard-card {
    padding: 26px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dashboard-card:hover { transform: translateY(-5px); border-color: rgba(217, 47, 131, 0.28); }
.dashboard-card span { color: var(--pink); font-size: 13px; font-weight: 600; }
.dashboard-card h3 { margin: 14px 0 9px; font-size: 20px; font-weight: 600; }
.dashboard-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.stat-card { padding: 22px; }
.stat-card span { color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 32px; font-weight: 600; }

/* Buttons */
.btn-admin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 13px 20px;
    background: #111111;
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
}

.btn-admin:hover { background: var(--gold-gradient); color: #111111; }
.btn-admin.secondary { background: #f3eff2; color: #111111; }
.btn-admin.secondary:hover { background: #111111; color: #ffffff; }
.btn-admin.danger { background: var(--danger); color: #ffffff; }

/* Alerts */
.admin-alert {
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 22px;
    font-size: 14px;
    line-height: 1.6;
}

.admin-alert.success { background: #effaf2; border: 1px solid #bde8c8; color: #256b36; }
.admin-alert.error { background: #fff1f3; border: 1px solid #f0b9c2; color: #9d4051; }

/* Forms */
.admin-form { width: 100%; max-width: 100%; display: grid; gap: 22px; }

.form-card h2,
.card-title,
.payment-card-header h2 { margin: 0 0 22px; font-size: 24px; font-weight: 600; }

.form-intro { margin: 0 0 24px; color: var(--muted); line-height: 1.6; }

.form-row,
.form-grid.two-columns {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-group { width: 100%; max-width: 100%; margin-bottom: 22px; }
.form-group:last-child { margin-bottom: 0; }

.form-group label {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    font-size: 13px;
    color: #303030;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    max-width: 100%;
    display: block;
    background: #f4f4f6;
    border: 1px solid #e2e2e7;
    color: #222222;
    border-radius: 18px;
    padding: 15px 16px;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    background: #f8f8fa;
    border-color: var(--pink);
    box-shadow: 0 0 0 4px rgba(217, 47, 131, 0.08);
}

.form-group textarea { resize: vertical; min-height: 150px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* File upload */
.custom-file-upload { position: relative; width: 100%; max-width: 100%; }
.custom-file-input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }

.custom-file-label {
    width: 100%;
    max-width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: #f4f4f6;
    border: 1px solid #e2e2e7;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-file-label:hover { background: #f8f8fa; border-color: #d4d4dc; }

.custom-file-upload:focus-within .custom-file-label {
    background: #f8f8fa;
    border-color: var(--pink);
    box-shadow: 0 0 0 4px rgba(217, 47, 131, 0.08);
}

.custom-file-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #d8d8df;
    color: #222222;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.custom-file-name { color: #666666; font-size: 13px; line-height: 1.4; word-break: break-word; }

.current-product-image,
.current-image-preview {
    margin-bottom: 24px;
    padding: 18px;
    background: #f4f4f6;
    border: 1px solid #e2e2e7;
    border-radius: 20px;
}

.current-product-image img,
.current-image-preview img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    display: block;
    border-radius: 18px;
    border: 1px solid #dedee5;
    background: #ffffff;
}

/* Tables */
.admin-table-wrapper { width: 100%; max-width: 100%; overflow-x: hidden; }

.admin-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 14px 12px;
    font-size: 11px;
    color: #898989;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.admin-table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
    color: #343434;
    font-weight: 400;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
}

.admin-table tr:last-child td { border-bottom: 0; }
.admin-table strong { font-weight: 600; }

/* Products table */
.products-admin-table th:nth-child(1),
.products-admin-table td:nth-child(1) { width: 29%; }

.products-admin-table th:nth-child(2),
.products-admin-table td:nth-child(2) { width: 13%; }

.products-admin-table th:nth-child(3),
.products-admin-table td:nth-child(3) { width: 9%; }

.products-admin-table th:nth-child(4),
.products-admin-table td:nth-child(4) { width: 7%; }

.products-admin-table th:nth-child(5),
.products-admin-table td:nth-child(5) { width: 12%; }

.products-admin-table th:nth-child(6),
.products-admin-table td:nth-child(6) { width: 9%; }

.products-admin-table th:nth-child(7),
.products-admin-table td:nth-child(7) { width: 11%; }

.products-admin-table th:nth-child(8),
.products-admin-table td:nth-child(8) { width: 10%; }

.admin-product-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    width: 100%;
}

.admin-product-thumb {
    width: 68px;
    height: 68px;
    min-width: 68px;
    min-height: 68px;
    border-radius: 16px;
    background: #faf8f9;
    border: 1px solid #ece7eb;
    overflow: hidden;
    display: grid;
    place-items: center;
    position: relative;
}

.admin-product-thumb img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    display: block;
    border: 0;
    position: relative;
    z-index: 2;
}

.admin-product-fallback {
    display: none;
    width: 100%;
    height: 100%;
    place-items: center;
    background: linear-gradient(135deg, #e5308a, #d7a53b);
    color: #ffffff;
    font-weight: 800;
    font-size: 24px;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.admin-product-fallback.visible,
.admin-product-thumb.image-error .admin-product-fallback { display: grid; }

.admin-product-text { display: grid; gap: 6px; min-width: 0; max-width: 100%; }

.admin-product-text strong,
.admin-product-text small { display: block; max-width: 100%; overflow-wrap: break-word; }

.admin-product-text strong { color: #222222; font-size: 15px; line-height: 1.35; font-weight: 600; }
.admin-product-text small { color: #8a858c; font-size: 13px; line-height: 1.25; }

/* Badges and actions */
.status-badge,
.status-published,
.status-active,
.status-draft,
.status-inactive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-badge.published,
.status-published,
.status-active { background: rgba(46, 168, 110, 0.12); color: var(--success); }

.status-badge.draft,
.status-draft { background: rgba(185, 144, 72, 0.14); color: var(--warning); }

.status-inactive { background: rgba(120, 120, 120, 0.14); color: #555555; }

.table-actions { display: grid; gap: 8px; justify-items: start; }

.table-actions a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--border);
    color: #333333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.table-actions a:hover { background: #f5f1f4; color: #111111; }

.table-actions a.delete {
    background: #fffafa;
    color: #9d4051;
    border-color: #f0d8df;
}

.table-actions a.delete:hover { background: #fdeff2; }

/* Empty states and secondary layouts */
.empty-state,
.empty-admin-state { text-align: center; padding: 46px 20px; }

.empty-state h2,
.empty-admin-state h2 { margin: 0 0 10px; font-size: 26px; font-weight: 600; }

.empty-state p,
.empty-admin-state p { margin: 0 0 22px; color: var(--muted); }

.admin-two-columns {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.payment-card { position: relative; padding: 28px; margin-bottom: 22px; }

.payment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}

/* Profile */
.admin-profile-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.admin-profile-card {
    background: #ffffff;
    border: 1px solid #ece7eb;
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.045);
}

.profile-preview-card { position: sticky; top: 24px; text-align: center; }

.profile-avatar-preview {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #e5308a, #d7a53b);
    color: #ffffff;
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(217, 47, 131, 0.18);
}

.profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-preview span { font-size: 54px; font-weight: 800; }
.profile-preview-card h2 { margin: 0 0 6px; font-size: 24px; color: #111111; }
.profile-preview-card > p { margin: 0; color: #77747a; font-size: 14px; }

.profile-note-preview {
    margin-top: 22px;
    padding: 18px;
    border-radius: 18px;
    background: #faf8f9;
    border: 1px solid #ece7eb;
    color: #5f5b63;
    font-size: 14px;
    line-height: 1.7;
    text-align: left;
}

.admin-card-subtitle,
.admin-help-text { color: #77747a; font-size: 14px; }

.password-card { grid-column: 2 / 3; }

/* Login */
.admin-login-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(217, 47, 131, 0.25), transparent 32%),
        radial-gradient(circle at bottom right, rgba(215, 165, 59, 0.18), transparent 34%),
        linear-gradient(145deg, #1b1118 0%, #080809 72%);
    color: #ffffff;
}

.admin-login-wrapper { min-height: 100vh; display: grid; place-items: center; padding: 32px; }

.admin-login-card {
    width: min(640px, 100%);
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 34px;
    padding: 56px 54px;
    box-shadow: 0 34px 90px rgba(0,0,0,0.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.admin-login-logo-wrap { display: flex; justify-content: center; margin-bottom: 26px; }
.admin-login-logo { width: 210px; max-width: 72%; height: auto; display: block; object-fit: contain; }
.admin-login-heading { text-align: center; margin-bottom: 34px; }

.admin-login-heading h1 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 32px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.admin-login-heading p { margin: 0; color: rgba(255,255,255,0.66); font-size: 15px; line-height: 1.7; }
.admin-login-form { display: grid; gap: 22px; }
.admin-login-field { display: grid; gap: 10px; }
.admin-login-field label { color: #ffffff; font-size: 15px; font-weight: 700; }

.admin-login-field input {
    width: 100%;
    min-height: 62px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    padding: 0 22px;
    font-size: 16px;
    outline: none;
}

.admin-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-check-option { display: inline-flex; align-items: center; gap: 9px; color: rgba(255,255,255,0.72); font-size: 14px; cursor: pointer; }

.admin-login-button {
    min-height: 62px;
    border: 0;
    border-radius: 999px;
    background: var(--gold-gradient);
    color: #111111;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(215,165,59,0.24);
    transition: all 0.25s ease;
}

.admin-login-button:hover { transform: translateY(-2px); box-shadow: 0 24px 54px rgba(215,165,59,0.32); }
.admin-login-links { text-align: center; margin-top: 4px; }
.admin-login-links a { color: #f4d779; text-decoration: none; font-size: 14px; font-weight: 600; }

/* Responsive */
@media (max-width: 1180px) {
    .admin-card { padding: 22px; }
    .admin-table th,
    .admin-table td { padding-left: 12px; padding-right: 12px; font-size: 14px; }
    .admin-product-thumb { width: 58px; height: 58px; min-width: 58px; min-height: 58px; border-radius: 14px; }
    .admin-product-info { gap: 10px; }
}

@media (max-width: 1100px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: relative; height: auto; }
    .admin-grid,
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-two-columns { grid-template-columns: 1fr; }
    .admin-brand.admin-brand-centered { padding-left: 24px; }
    .admin-brand.admin-brand-centered .admin-sidebar-logo { width: 145px; max-width: 145px; }
    .admin-brand-subtitle { font-size: 15px; }
}

@media (max-width: 980px) {
    .admin-profile-layout { grid-template-columns: 1fr; }
    .profile-preview-card { position: static; }
    .password-card { grid-column: auto; }
    .form-row,
    .form-grid.two-columns { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .admin-topbar { min-height: 96px; padding: 20px 22px; }
    .admin-user-trigger { min-width: auto; max-width: none; padding: 8px; }
    .admin-user-info { display: none; }
    .admin-avatar { width: 48px; height: 48px; min-width: 48px; min-height: 48px; }
    .admin-user-dropdown-menu { width: 240px; right: 0; }

    .admin-table-wrapper { overflow-x: hidden; }

    .products-admin-table,
    .products-admin-table thead,
    .products-admin-table tbody,
    .products-admin-table th,
    .products-admin-table td,
    .products-admin-table tr {
        display: block;
        width: 100%;
    }

    .products-admin-table thead { display: none; }

    .products-admin-table tr {
        background: #ffffff;
        border: 1px solid #ece7eb;
        border-radius: 22px;
        padding: 18px;
        margin-bottom: 18px;
        box-shadow: 0 12px 34px rgba(0,0,0,0.045);
    }

    .products-admin-table td {
        border-bottom: 0;
        padding: 10px 0;
    }

    .products-admin-table td::before {
        content: attr(data-label);
        display: block;
        color: #999999;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 1.4px;
        font-weight: 700;
        margin-bottom: 5px;
    }

    .products-admin-table td:first-child::before { display: none; }
    .admin-product-info { align-items: center; }
    .admin-product-thumb { width: 78px; height: 78px; min-width: 78px; min-height: 78px; }
    .table-actions { display: flex; gap: 10px; flex-wrap: wrap; }
}

@media (max-width: 760px) {
    .admin-brand.admin-brand-centered { padding: 24px 0 22px 22px; }
    .admin-brand.admin-brand-centered .admin-sidebar-logo { width: 130px; max-width: 130px; }
    .admin-brand-subtitle { font-size: 14px; }
}

@media (max-width: 640px) {
    .admin-topbar {
        height: auto;
        align-items: flex-start;
        gap: 18px;
        flex-direction: row;
    }

    .admin-content { padding: 22px; }
    .admin-page-header { display: block; }
    .admin-page-header .btn-admin { margin-top: 18px; }
    .admin-grid,
    .admin-stats { grid-template-columns: 1fr; }

    .admin-login-wrapper { padding: 18px; }
    .admin-login-card { padding: 38px 26px; border-radius: 28px; }
    .admin-login-logo { width: 170px; }
    .admin-login-heading h1 { font-size: 26px; }
    .admin-login-options { display: grid; justify-content: start; }
}
/* =========================================================
   FINAL SAFE ADMIN SIDEBAR RESPONSIVE FIX
   Black sidebar full height without breaking layout
   ========================================================= */

/* Fondo general */
body {
    background: #fbf8f9 !important;
    overflow-x: hidden !important;
}

/* Layout base desktop */
.admin-layout {
    display: grid !important;
    grid-template-columns: 290px minmax(0, 1fr) !important;
    min-height: 100vh !important;
    width: 100% !important;
    background:
        linear-gradient(
            90deg,
            #050505 0,
            #050505 290px,
            #fbf8f9 290px,
            #fbf8f9 100%
        ) !important;
}

/* Sidebar negro hacia abajo infinito */
.admin-sidebar {
    position: sticky !important;
    top: 0 !important;
    align-self: start !important;
    width: 290px !important;
    min-height: 100vh !important;
    height: 100vh !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    background:
        radial-gradient(circle at top left, rgba(217, 47, 131, 0.16), transparent 36%),
        linear-gradient(180deg, #111111 0%, #050505 100%) !important;

    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

/* Oculta scrollbar visual del sidebar */
.admin-sidebar::-webkit-scrollbar {
    width: 0 !important;
    display: none !important;
}

/* Main normal, sin margin manual */
.admin-main {
    width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    background: #fbf8f9 !important;
}

/* Topbar y contenido no se montan */
.admin-topbar {
    width: 100% !important;
    min-width: 0 !important;
}

.admin-content {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Ajuste visual del logo */
.admin-brand.admin-brand-centered {
    padding-top: 24px !important;
    padding-bottom: 22px !important;
    margin-bottom: 20px !important;
}

.admin-brand.admin-brand-centered .admin-sidebar-logo {
    width: 150px !important;
    max-width: 150px !important;
}

.admin-brand-subtitle {
    font-size: 15px !important;
}

/* Menú más compacto para que no obligue scroll feo */
.admin-menu {
    gap: 7px !important;
}

.admin-menu a {
    padding: 12px 15px !important;
    font-size: 13.5px !important;
}

/* Footer dentro del sidebar */
.admin-sidebar-footer {
    margin-top: auto !important;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {
    .admin-layout {
        display: block !important;
        min-height: 100vh !important;
        background: #fbf8f9 !important;
    }

    .admin-sidebar {
        position: relative !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        padding: 24px 22px !important;
        border-radius: 0 0 28px 28px !important;
    }

    .admin-brand.admin-brand-centered {
        padding: 18px 0 20px 0 !important;
        justify-items: center !important;
        text-align: center !important;
    }

    .admin-brand.admin-brand-centered .admin-sidebar-logo {
        width: 145px !important;
        max-width: 145px !important;
    }

    .admin-menu {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        display: grid !important;
        gap: 10px !important;
    }

    .admin-menu a {
        justify-content: center !important;
        text-align: center !important;
        padding: 13px 10px !important;
    }

    .admin-sidebar-footer {
        display: flex !important;
        gap: 12px !important;
        justify-content: center !important;
        margin-top: 22px !important;
    }

    .admin-sidebar-footer a {
        min-width: 150px !important;
    }

    .admin-main {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {
    .admin-sidebar {
        padding: 22px 16px !important;
        border-radius: 0 0 24px 24px !important;
    }

    .admin-brand.admin-brand-centered .admin-sidebar-logo {
        width: 125px !important;
        max-width: 125px !important;
    }

    .admin-brand-subtitle {
        font-size: 13px !important;
    }

    .admin-menu {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .admin-menu a {
        justify-content: flex-start !important;
        text-align: left !important;
        padding: 13px 16px !important;
    }

    .admin-sidebar-footer {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .admin-topbar {
        padding: 20px !important;
        gap: 14px !important;
    }

    .admin-content {
        padding: 22px 16px !important;
    }
}
/* =========================================================
   ADMIN PRODUCTS PAGINATION
   Shows 5 products per page
   ========================================================= */

.admin-products-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 0 22px;
    margin-bottom: 6px;
    border-bottom: 1px solid #eee7eb;
}

.admin-products-topline strong {
    display: block;
    color: #111111;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.admin-products-topline span {
    display: block;
    color: #77747a;
    font-size: 13px;
}

.admin-products-count {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 999px;
    background: #faf8f9;
    border: 1px solid #eee7eb;
    color: #333333;
    font-size: 13px;
    font-weight: 600;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding-top: 28px;
    margin-top: 22px;
    border-top: 1px solid #eee7eb;
    flex-wrap: wrap;
}

.admin-pagination-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-pagination a,
.admin-pagination span {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid #eee7eb;
    background: #ffffff;
    color: #222222;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.admin-pagination a:hover {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

.admin-pagination .active {
    background: linear-gradient(135deg, #e5308a, #d7a53b);
    color: #ffffff;
    border-color: transparent;
}

.admin-pagination-arrow {
    min-width: 96px !important;
}

.admin-pagination .disabled {
    opacity: 0.38;
    cursor: not-allowed;
    background: #f7f4f6;
}

@media (max-width: 700px) {
    .admin-products-topline {
        display: grid;
        gap: 12px;
    }

    .admin-products-count {
        width: fit-content;
    }

    .admin-pagination {
        justify-content: flex-start;
    }
}
/* =========================================================
   ADMIN CONTACT MESSAGES
   ========================================================= */

.admin-messages-list {
    display: grid;
    gap: 18px;
}

.admin-message-card {
    border: 1px solid #eee7eb;
    border-radius: 24px;
    background: #ffffff;
    padding: 24px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.04);
}

.admin-message-card.unread {
    border-color: rgba(217, 47, 131, 0.35);
    background:
        radial-gradient(circle at top left, rgba(217, 47, 131, 0.055), transparent 34%),
        #ffffff;
}

.admin-message-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.admin-message-header h2 {
    margin: 10px 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #111111;
}

.admin-message-header p {
    margin: 0;
    color: #77747a;
    font-size: 13px;
}

.message-status-badge {
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.message-status-badge.unread {
    background: rgba(217, 47, 131, 0.12);
    color: #d92f83;
}

.message-status-badge.read {
    background: rgba(31, 125, 82, 0.12);
    color: #1f7d52;
}

.message-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.message-actions a {
    min-height: 38px;
    border-radius: 999px;
    padding: 0 15px;
    border: 1px solid #eee7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #222222;
    background: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.message-actions a:hover {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

.message-actions a.delete {
    color: #b42335;
    border-color: #f0d8df;
}

.message-actions a.delete:hover {
    background: #b42335;
    color: #ffffff;
    border-color: #b42335;
}

.admin-message-body {
    padding: 20px;
    border-radius: 18px;
    background: #faf8f9;
    color: #4f4b52;
    line-height: 1.8;
    font-size: 14px;
}

.admin-message-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.admin-message-meta a {
    min-height: 38px;
    border-radius: 999px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    background: #faf8f9;
    border: 1px solid #eee7eb;
    color: #222222;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 700px) {
    .admin-message-header {
        display: grid;
    }

    .message-actions {
        justify-content: flex-start;
    }
}
/* =========================================================
   RESTORE KEYAK LOGIN PREMIUM - FINAL OVERRIDE
   ========================================================= */

body.admin-login-body,
.admin-login-body {
    min-height: 100vh !important;
    margin: 0 !important;
    font-family: "Manrope", "Montserrat", Arial, sans-serif !important;
    background:
        radial-gradient(circle at top left, rgba(217, 47, 131, 0.25), transparent 32%),
        radial-gradient(circle at bottom right, rgba(215, 165, 59, 0.18), transparent 34%),
        linear-gradient(145deg, #1b1118 0%, #080809 72%) !important;
    color: #ffffff !important;
    overflow-x: hidden !important;
}

.admin-login-wrapper {
    min-height: 100vh !important;
    display: grid !important;
    place-items: center !important;
    padding: 32px !important;
}

.admin-login-card {
    width: min(640px, 100%) !important;
    background: rgba(255,255,255,0.055) !important;
    border: 1px solid rgba(255,255,255,0.14) !important;
    border-radius: 34px !important;
    padding: 56px 54px !important;
    box-shadow: 0 34px 90px rgba(0,0,0,0.34) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
}

.admin-login-logo-wrap {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 26px !important;
}

.admin-login-logo {
    width: 210px !important;
    max-width: 72% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
}

.admin-login-heading {
    text-align: center !important;
    margin-bottom: 34px !important;
}

.admin-login-heading h1 {
    margin: 0 0 10px !important;
    color: #ffffff !important;
    font-size: 32px !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
}

.admin-login-heading p {
    margin: 0 !important;
    color: rgba(255,255,255,0.66) !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
}

.admin-login-form {
    display: grid !important;
    gap: 22px !important;
}

.admin-login-field {
    display: grid !important;
    gap: 10px !important;
}

.admin-login-field label {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

.admin-login-field input {
    width: 100% !important;
    min-height: 62px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    background: rgba(255,255,255,0.08) !important;
    color: #ffffff !important;
    padding: 0 22px !important;
    font-size: 16px !important;
    outline: none !important;
}

.admin-login-field input::placeholder {
    color: rgba(255,255,255,0.38) !important;
}

.admin-login-field input:focus {
    border-color: #d7a53b !important;
    box-shadow: 0 0 0 4px rgba(215,165,59,0.12) !important;
}

.admin-login-options {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}

.admin-check-option {
    display: inline-flex !important;
    align-items: center !important;
    gap: 9px !important;
    color: rgba(255,255,255,0.72) !important;
    font-size: 14px !important;
    cursor: pointer !important;
}

.admin-check-option input {
    width: 16px !important;
    height: 16px !important;
    accent-color: #d7a53b !important;
}

.admin-login-button {
    min-height: 62px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(
        135deg,
        #fff3b0 0%,
        #f4d779 16%,
        #d7a53b 42%,
        #9a681d 72%,
        #f8e6a0 100%
    ) !important;
    color: #111111 !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    box-shadow: 0 18px 40px rgba(215,165,59,0.24) !important;
    transition: all 0.25s ease !important;
}

.admin-login-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 24px 54px rgba(215,165,59,0.32) !important;
}

.admin-login-links {
    text-align: center !important;
    margin-top: 4px !important;
}

.admin-login-links a {
    color: #f4d779 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.admin-login-alert {
    border-radius: 18px !important;
    padding: 15px 18px !important;
    margin-bottom: 22px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

.admin-login-alert.error {
    background: rgba(255, 80, 110, 0.12) !important;
    border: 1px solid rgba(255, 80, 110, 0.28) !important;
    color: #ffd7df !important;
}

.admin-login-alert.success {
    background: rgba(215, 165, 59, 0.12) !important;
    border: 1px solid rgba(215, 165, 59, 0.28) !important;
    color: #fff3c5 !important;
}

@media (max-width: 640px) {
    .admin-login-wrapper {
        padding: 18px !important;
    }

    .admin-login-card {
        padding: 38px 26px !important;
        border-radius: 28px !important;
    }

    .admin-login-logo {
        width: 170px !important;
    }

    .admin-login-heading h1 {
        font-size: 26px !important;
    }

    .admin-login-options {
        display: grid !important;
        justify-content: start !important;
    }
}
/* =========================================================
   HOME BUILDER ADMIN
   ========================================================= */

.home-builder-list {
    display: grid;
    gap: 18px;
}

.home-builder-card {
    display: grid;
    grid-template-columns: 58px 150px minmax(0, 1fr) 180px;
    gap: 18px;
    align-items: center;
    border: 1px solid #eee7eb;
    border-radius: 24px;
    background: #ffffff;
    padding: 18px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.04);
}

.home-builder-card.inactive {
    opacity: 0.62;
}

.home-builder-order {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(217, 47, 131, 0.10);
    color: #d92f83;
    font-weight: 800;
    font-size: 13px;
}

.home-builder-preview {
    width: 150px;
    height: 96px;
    border-radius: 18px;
    overflow: hidden;
    background: #faf8f9;
    border: 1px solid #eee7eb;
}

.home-builder-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-builder-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #e5308a, #d7a53b);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 2px;
}

.home-builder-info {
    min-width: 0;
}

.home-builder-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.home-builder-meta span {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: #faf8f9;
    border: 1px solid #eee7eb;
    color: #77747a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.home-builder-info h2 {
    margin: 0 0 5px;
    font-size: 20px;
    color: #111111;
    font-weight: 700;
}

.home-builder-info h3 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #d92f83;
    font-weight: 700;
}

.home-builder-info p {
    margin: 0;
    color: #77747a;
    font-size: 14px;
    line-height: 1.6;
}

.home-builder-status-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.home-builder-status,
.home-builder-button-preview {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.home-builder-status.active {
    background: rgba(31, 125, 82, 0.12);
    color: #1f7d52;
}

.home-builder-status.inactive {
    background: rgba(180, 35, 53, 0.10);
    color: #b42335;
}

.home-builder-button-preview {
    background: rgba(185, 144, 72, 0.14);
    color: #8a641b;
}

.home-builder-actions {
    display: grid;
    gap: 8px;
}

.home-builder-actions a {
    min-height: 36px;
    border-radius: 999px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee7eb;
    background: #ffffff;
    color: #222222;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.home-builder-actions a:hover {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

.home-builder-actions a.delete {
    color: #b42335;
    border-color: #f0d8df;
}

.home-builder-actions a.delete:hover {
    background: #b42335;
    color: #ffffff;
    border-color: #b42335;
}

@media (max-width: 1100px) {
    .home-builder-card {
        grid-template-columns: 44px 130px minmax(0, 1fr);
    }

    .home-builder-actions {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
    }
}

@media (max-width: 700px) {
    .home-builder-card {
        grid-template-columns: 1fr;
    }

    .home-builder-preview {
        width: 100%;
        height: 190px;
    }

    .home-builder-actions {
        display: grid;
    }
}
/* =========================================================
   HOME ICON EDITOR ADMIN
   ========================================================= */

.admin-card-subsection {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid #eee7eb;
}

.admin-card-subsection h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #111111;
}

.admin-card-subsection p {
    margin: 0 0 22px;
    color: #77747a;
    font-size: 14px;
    line-height: 1.6;
}

.home-icon-editor-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.home-icon-editor-card {
    padding: 22px;
    border: 1px solid #eee7eb;
    border-radius: 22px;
    background: #faf8f9;
}

@media (max-width: 800px) {
    .home-icon-editor-list {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   HOME ICON EDITOR ADMIN
   ========================================================= */

.admin-card-subsection {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid #eee7eb;
}

.admin-card-subsection h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #111111;
}

.admin-card-subsection p {
    margin: 0 0 22px;
    color: #77747a;
    font-size: 14px;
    line-height: 1.6;
}

.home-icon-editor-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.home-icon-editor-card {
    padding: 22px;
    border: 1px solid #eee7eb;
    border-radius: 22px;
    background: #faf8f9;
}

@media (max-width: 800px) {
    .home-icon-editor-list {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   PREMIUM COLOR PICKER - HOME BUILDER DESIGN SETTINGS
   Corrige input type=color para que no se vea como raya
   ========================================================= */

.form-group input[type="color"] {
    width: 72px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-width: 72px !important;

    padding: 5px !important;
    border-radius: 16px !important;

    background: #ffffff !important;
    border: 1px solid #ddd8de !important;

    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;

    box-shadow: 0 8px 22px rgba(0,0,0,0.06) !important;
}

.form-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0 !important;
    border-radius: 12px !important;
}

.form-group input[type="color"]::-webkit-color-swatch {
    border: none !important;
    border-radius: 12px !important;
}

.form-group input[type="color"]::-moz-color-swatch {
    border: none !important;
    border-radius: 12px !important;
}

/* Organiza visualmente los campos de color */
.form-group:has(input[type="color"]) {
    display: grid !important;
    align-content: start !important;
    gap: 10px !important;
}

.form-group:has(input[type="color"]) label {
    margin-bottom: 0 !important;
}

/* Caja visual más clara para los controles de diseño */
.admin-card-subsection + .form-row .form-group input[type="color"],
.admin-card-subsection ~ .form-row .form-group input[type="color"] {
    display: block !important;
}

/* En móvil que no se estire raro */
@media (max-width: 700px) {
    .form-group input[type="color"] {
        width: 72px !important;
        max-width: 72px !important;
    }
}
/* =========================================================
   COLOR PICKER VALUE PREVIEW
   Shows HEX and RGB next to color picker
   ========================================================= */

.keyak-color-control {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    flex-wrap: wrap !important;
}

.keyak-color-values {
    display: grid;
    gap: 4px;
}

.keyak-color-hex,
.keyak-color-rgb {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0 11px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #eee7eb;
    color: #333333;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.keyak-color-rgb {
    color: #77747a;
    font-weight: 600;
}

.keyak-color-preview-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #ddd8de, 0 8px 18px rgba(0,0,0,0.10);
}
/* =========================================================
   HOME BUILDER CURRENT IMAGE PREVIEW - HERO STYLE
   Muestra la imagen completa en formato horizontal
   ========================================================= */

.current-image-preview {
    margin-bottom: 28px !important;
    padding: 28px !important;
    background: #f7f7f9 !important;
    border: 1px solid #dedee5 !important;
    border-radius: 28px !important;
    overflow: hidden !important;
}

.current-image-preview p {
    margin: 0 0 22px !important;
    color: #111111 !important;
    font-size: 24px !important;
    font-weight: 500 !important;
}

.current-image-preview img {
    width: 100% !important;
    max-width: 620px !important;
    height: 300px !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;

    background: #ffffff !important;
    border: 1px solid #dedee5 !important;
    border-radius: 24px !important;
    padding: 10px !important;
}

/* Para imagen tipo Hero o Background se ve más horizontal */
.admin-form select[name="image_position"] option[value="background"] {
    font-weight: 700;
}

@media (max-width: 760px) {
    .current-image-preview {
        padding: 20px !important;
        border-radius: 24px !important;
    }

    .current-image-preview img {
        max-width: 100% !important;
        height: 220px !important;
        border-radius: 20px !important;
    }
}
/* =========================================================
   CURRENT IMAGE + REPLACE IMAGE TOGETHER
   ========================================================= */

.current-image-preview {
    display: grid !important;
    gap: 22px !important;
}

.current-image-replace {
    width: 100% !important;
    max-width: 620px !important;
    display: grid !important;
    gap: 10px !important;
}

.current-image-replace > label {
    color: #111111 !important;
    font-size: 18px !important;
    font-weight: 500 !important;
}

.current-image-empty {
    width: 100% !important;
    max-width: 620px !important;
    min-height: 180px !important;
    border-radius: 24px !important;
    border: 1px dashed #d8d3da !important;
    background: #ffffff !important;
    color: #77747a !important;
    display: grid !important;
    place-items: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.current-image-replace .custom-file-upload {
    max-width: 620px !important;
}

.current-image-replace .custom-file-label {
    min-height: 64px !important;
    background: #ffffff !important;
}
/* =========================================================
   HOME BUILDER HERO FIXED CARD
   ========================================================= */

.home-builder-card.fixed-hero-block {
    border-color: rgba(217, 47, 131, 0.28);
    background:
        radial-gradient(circle at top left, rgba(217, 47, 131, 0.055), transparent 34%),
        #ffffff;
}

.home-builder-card.fixed-hero-block .home-builder-actions {
    align-self: center;
}

.home-builder-card.fixed-hero-block .home-builder-actions a {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

.home-builder-card.fixed-hero-block .home-builder-actions a:hover {
    background: linear-gradient(135deg, #e5308a, #d7a53b);
    border-color: transparent;
    color: #ffffff;
}
/* =========================================================
   HERO SLIDER MEDIA ADMIN PREVIEW
   Corrige imagen/video gigante en el editor del Hero
   ========================================================= */

.hero-media-editor-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px !important;
    margin-top: 22px !important;
}

.hero-media-editor-card {
    padding: 24px !important;
    border: 1px solid #eee7eb !important;
    border-radius: 24px !important;
    background: #faf8f9 !important;
    overflow: hidden !important;
}

.hero-media-editor-card h3 {
    margin: 0 0 8px !important;
    color: #111111 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
}

.hero-media-editor-card p {
    margin: 0 0 18px !important;
    color: #77747a !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

.hero-media-preview {
    width: 100% !important;
    max-width: 100% !important;
    height: 230px !important;
    margin: 18px 0 22px !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid #dedee5 !important;
}

.hero-media-preview img,
.hero-media-preview video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 230px !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    background: #ffffff !important;
}

.hero-media-new {
    border-style: dashed !important;
    border-color: rgba(217, 47, 131, 0.35) !important;
    background: #ffffff !important;
}

@media (max-width: 900px) {
    .hero-media-editor-list {
        grid-template-columns: 1fr !important;
    }

    .hero-media-preview {
        height: 210px !important;
    }
}
/* =========================================================
   HERO MEDIA DELETE OPTION
   ========================================================= */

.hero-media-delete-option {
    margin: 18px 0 !important;
    padding: 16px 18px !important;
    border-radius: 18px !important;
    border: 1px solid #f0d8df !important;
    background: #fffafa !important;
}

.delete-media-check {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #b42335 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.delete-media-check input {
    width: 18px !important;
    height: 18px !important;
    accent-color: #b42335 !important;
}
/* =========================================================
   KEYAK ADMIN - HERO SLIDER MEDIA EDITOR FINAL
   Organiza imagen/video, textos, colores, delete y preview
   ========================================================= */

.admin-card-subsection {
    margin: 42px 0 24px !important;
    padding: 28px 30px !important;
    border-radius: 26px !important;
    background:
        radial-gradient(circle at top left, rgba(229, 48, 138, 0.08), transparent 36%),
        #faf8f9 !important;
    border: 1px solid #eee7eb !important;
}

.admin-card-subsection h2 {
    margin: 0 0 8px !important;
    color: #111111 !important;
    font-size: 24px !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px !important;
}

.admin-card-subsection p {
    margin: 0 !important;
    color: #77747a !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}

/* Hero media grid */

.hero-media-editor-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
    margin-top: 22px !important;
}

.hero-media-editor-card {
    position: relative !important;
    padding: 26px !important;
    border-radius: 28px !important;
    background: #ffffff !important;
    border: 1px solid #eee7eb !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.045) !important;
    overflow: hidden !important;
}

.hero-media-editor-card::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    height: 5px !important;
    background: linear-gradient(90deg, #e5308a, #d7a53b) !important;
}

.hero-media-editor-card h3 {
    margin: 0 0 8px !important;
    color: #111111 !important;
    font-size: 22px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    letter-spacing: -0.4px !important;
}

.hero-media-editor-card p {
    margin: 0 0 20px !important;
    color: #77747a !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}

/* New media card */

.hero-media-new {
    border-style: dashed !important;
    border-color: rgba(229, 48, 138, 0.38) !important;
    background:
        radial-gradient(circle at top left, rgba(229, 48, 138, 0.055), transparent 34%),
        #ffffff !important;
}

/* Preview */

.hero-media-preview {
    width: 100% !important;
    height: 240px !important;
    margin: 18px 0 24px !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    background:
        linear-gradient(135deg, #faf8f9, #ffffff) !important;
    border: 1px solid #dedee5 !important;
    display: grid !important;
    place-items: center !important;
}

.hero-media-preview img,
.hero-media-preview video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 240px !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    background: #ffffff !important;
}

.hero-media-preview video {
    background: #111111 !important;
}

/* Fields inside media card */

.hero-media-editor-card .form-group {
    margin-bottom: 18px !important;
}

.hero-media-editor-card label {
    color: #1b1b1f !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.15px !important;
}

.hero-media-editor-card input[type="text"],
.hero-media-editor-card input[type="number"],
.hero-media-editor-card textarea,
.hero-media-editor-card select {
    width: 100% !important;
    min-height: 50px !important;
    border-radius: 16px !important;
    border: 1px solid #ddd8de !important;
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 14px !important;
    padding: 13px 15px !important;
    outline: none !important;
    transition: all 0.22s ease !important;
}

.hero-media-editor-card textarea {
    min-height: 112px !important;
    resize: vertical !important;
    line-height: 1.65 !important;
}

.hero-media-editor-card input:focus,
.hero-media-editor-card textarea:focus,
.hero-media-editor-card select:focus {
    border-color: rgba(229, 48, 138, 0.58) !important;
    box-shadow: 0 0 0 4px rgba(229, 48, 138, 0.08) !important;
}

/* Form rows inside hero media */

.hero-media-editor-card .form-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
}

.hero-media-editor-card .form-row:has(input[type="color"]) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Custom upload button */

.hero-media-editor-card .custom-file-upload,
.current-image-replace .custom-file-upload {
    width: 100% !important;
}

.hero-media-editor-card .custom-file-label,
.current-image-replace .custom-file-label {
    min-height: 62px !important;
    padding: 10px !important;
    border-radius: 18px !important;
    border: 1px dashed rgba(229, 48, 138, 0.36) !important;
    background: #fffafd !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    transition: all 0.22s ease !important;
}

.hero-media-editor-card .custom-file-label:hover,
.current-image-replace .custom-file-label:hover {
    border-color: rgba(229, 48, 138, 0.75) !important;
    background: #ffffff !important;
    box-shadow: 0 12px 28px rgba(229, 48, 138, 0.08) !important;
}

.hero-media-editor-card .custom-file-button,
.current-image-replace .custom-file-button {
    min-height: 42px !important;
    padding: 0 18px !important;
    border-radius: 999px !important;
    background: #111111 !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

.hero-media-editor-card .custom-file-name,
.current-image-replace .custom-file-name {
    color: #77747a !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.hero-media-editor-card .custom-file-upload.has-file .custom-file-name,
.current-image-replace .custom-file-upload.has-file .custom-file-name {
    color: #111111 !important;
}

/* Hide real file input */

.custom-file-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Delete media option */

.hero-media-delete-option {
    margin: 20px 0 !important;
    padding: 16px 18px !important;
    border-radius: 18px !important;
    border: 1px solid #f0d8df !important;
    background:
        linear-gradient(135deg, #fffafa, #ffffff) !important;
}

.delete-media-check {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #b42335 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
}

.delete-media-check input {
    width: 18px !important;
    height: 18px !important;
    accent-color: #b42335 !important;
    flex: 0 0 auto !important;
}

.hero-media-delete-option .admin-help-text {
    display: block !important;
    margin-top: 8px !important;
    color: #8a6670 !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

/* Color picker layout inside media cards */

.hero-media-editor-card .keyak-color-control {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.hero-media-editor-card input[type="color"] {
    width: 68px !important;
    height: 50px !important;
    min-height: 50px !important;
    padding: 5px !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1px solid #ddd8de !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05) !important;
}

.hero-media-editor-card input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0 !important;
    border-radius: 12px !important;
}

.hero-media-editor-card input[type="color"]::-webkit-color-swatch {
    border: none !important;
    border-radius: 12px !important;
}

.hero-media-editor-card input[type="color"]::-moz-color-swatch {
    border: none !important;
    border-radius: 12px !important;
}

.keyak-color-values {
    display: grid !important;
    gap: 4px !important;
}

.keyak-color-hex,
.keyak-color-rgb {
    min-height: 25px !important;
    display: inline-flex !important;
    align-items: center !important;
    width: fit-content !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    border: 1px solid #eee7eb !important;
    color: #333333 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.2px !important;
}

.keyak-color-rgb {
    color: #77747a !important;
    font-weight: 600 !important;
}

.keyak-color-preview-dot {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 0 0 1px #ddd8de, 0 8px 18px rgba(0,0,0,0.10) !important;
}

/* Current image block */

.current-image-preview {
    margin-bottom: 32px !important;
    padding: 28px !important;
    background: #f7f7f9 !important;
    border: 1px solid #dedee5 !important;
    border-radius: 28px !important;
    display: grid !important;
    gap: 22px !important;
    overflow: hidden !important;
}

.current-image-preview p {
    margin: 0 !important;
    color: #111111 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
}

.current-image-preview img {
    width: 100% !important;
    max-width: 680px !important;
    height: 320px !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    background: #ffffff !important;
    border: 1px solid #dedee5 !important;
    border-radius: 24px !important;
    padding: 10px !important;
}

.current-image-empty {
    width: 100% !important;
    max-width: 680px !important;
    min-height: 180px !important;
    border-radius: 24px !important;
    border: 1px dashed #d8d3da !important;
    background: #ffffff !important;
    color: #77747a !important;
    display: grid !important;
    place-items: center !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.current-image-replace {
    width: 100% !important;
    max-width: 680px !important;
    display: grid !important;
    gap: 10px !important;
}

.current-image-replace > label {
    color: #111111 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
}

/* Responsive */

@media (max-width: 1100px) {
    .hero-media-editor-list {
        grid-template-columns: 1fr !important;
    }

    .hero-media-editor-card .form-row:has(input[type="color"]) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    .admin-card-subsection {
        padding: 22px !important;
        border-radius: 22px !important;
    }

    .hero-media-editor-card {
        padding: 22px !important;
        border-radius: 24px !important;
    }

    .hero-media-editor-card .form-row,
    .hero-media-editor-card .form-row:has(input[type="color"]) {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .hero-media-preview {
        height: 210px !important;
        border-radius: 20px !important;
    }

    .current-image-preview {
        padding: 22px !important;
        border-radius: 24px !important;
    }

    .current-image-preview img {
        height: 230px !important;
        border-radius: 20px !important;
    }

    .hero-media-editor-card .custom-file-label,
    .current-image-replace .custom-file-label {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .hero-media-editor-card .custom-file-name,
    .current-image-replace .custom-file-name {
        max-width: 100% !important;
        white-space: normal !important;
    }
}
/* =========================================================
   HOME BUILDER FIXED BLOCKS
   Hero and Benefits sections only show Edit
   ========================================================= */

.home-builder-card.fixed-home-block {
    border-color: rgba(217, 47, 131, 0.28) !important;
    background:
        radial-gradient(circle at top left, rgba(217, 47, 131, 0.055), transparent 34%),
        #ffffff !important;
}

.home-builder-card.fixed-home-block .home-builder-actions {
    align-self: center !important;
}

.home-builder-card.fixed-home-block .home-builder-actions a {
    background: #111111 !important;
    color: #ffffff !important;
    border-color: #111111 !important;
}

.home-builder-card.fixed-home-block .home-builder-actions a:hover {
    background: linear-gradient(135deg, #e5308a, #d7a53b) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}
/* =========================================================
   ORDER ACTIONS
   ========================================================= */

.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.delete-order-form {
    display: inline-flex;
    margin: 0;
}

.delete-order-button {
    appearance: none;
    border: 1px solid #c62828;
    border-radius: 6px;
    padding: 8px 13px;
    background: #ffffff;
    color: #c62828;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.delete-order-button:hover {
    background: #c62828;
    color: #ffffff;
}

.delete-order-button:focus-visible {
    outline: 2px solid #c62828;
    outline-offset: 2px;
}

.admin-alert.error {
    margin-bottom: 20px;
    padding: 14px 18px;
    border: 1px solid #efb0b0;
    border-radius: 6px;
    background: #fff3f3;
    color: #9f1d1d;
}
/* =========================================================
   DASHBOARD — TARJETAS SUPERIORES 100% CLICKEABLES
   ========================================================= */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
}

.admin-stats .stat-card,
.admin-stats .stat-card-link {
    width: 100%;
    min-height: 175px;
    box-sizing: border-box;
}

.admin-stats a.stat-card {
    position: relative;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;

    padding: 32px 34px;
    border: 1px solid #e8e2e4;
    border-radius: 32px;

    background: #ffffff;
    color: #111111;
    text-decoration: none !important;
    cursor: pointer;

    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

.admin-stats a.stat-card:hover {
    transform: translateY(-4px);
    border-color: #efb3cf;
    box-shadow: 0 18px 38px rgba(17, 17, 17, 0.08);
}

.admin-stats a.stat-card:focus-visible {
    outline: 3px solid rgba(229, 48, 138, 0.25);
    outline-offset: 4px;
}

.admin-stats a.stat-card span {
    display: block;
    margin: 0 0 20px;
    color: #767676;
    font-family: "Manrope", Arial, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.3;
}

.admin-stats a.stat-card strong {
    display: block;
    margin: 0;
    color: #111111;
    font-family: "Manrope", Arial, sans-serif;
    font-size: 48px;
    font-weight: 500;
    line-height: 1;
}

.admin-stats a.stat-card .stat-card-action {
    display: block;
    margin-top: 18px;
    color: #e5308a;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(5px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.admin-stats a.stat-card:hover .stat-card-action,
.admin-stats a.stat-card:focus-visible .stat-card-action {
    opacity: 1;
    transform: translateY(0);
}

/* Toda el área responde al clic */

.admin-stats a.stat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

/* Tablet */

@media (max-width: 1100px) {
    .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Móvil */

@media (max-width: 650px) {
    .admin-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .admin-stats a.stat-card {
        min-height: 175px;
        padding: 30px 34px;
    }

    .admin-stats a.stat-card .stat-card-action {
        opacity: 1;
        transform: none;
    }
}
.admin-stats .stat-card-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-height: 175px;
    padding: 32px 34px;
    box-sizing: border-box;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.admin-stats .stat-card-link:hover {
    transform: translateY(-4px);
    border-color: #efb3cf;
    box-shadow: 0 18px 38px rgba(17, 17, 17, 0.08);
}

.admin-stats .stat-card-link:focus-visible {
    outline: 3px solid rgba(229, 48, 138, 0.25);
    outline-offset: 3px;
}
/public_html/products/css/admin.css
/* =========================================================
   DASHBOARD — TARJETAS SUPERIORES MÁS COMPACTAS
   ========================================================= */

.admin-stats {
    gap: 22px;
}

.admin-stats .stat-card,
.admin-stats .stat-card-link {
    min-height: 150px !important;
    padding: 26px 30px !important;
    border-radius: 26px !important;
}

.admin-stats .stat-card span,
.admin-stats .stat-card-link span {
    margin-bottom: 16px !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
}

.admin-stats .stat-card strong,
.admin-stats .stat-card-link strong {
    font-size: 42px !important;
    line-height: 1 !important;
}

/* Tablet */

@media (max-width: 1100px) {

    .admin-stats .stat-card,
    .admin-stats .stat-card-link {
        min-height: 140px !important;
        padding: 24px 26px !important;
    }

    .admin-stats .stat-card strong,
    .admin-stats .stat-card-link strong {
        font-size: 38px !important;
    }
}

/* Móvil */

@media (max-width: 650px) {

    .admin-stats {
        gap: 16px;
    }

    .admin-stats .stat-card,
    .admin-stats .stat-card-link {
        min-height: 125px !important;
        padding: 22px 24px !important;
        border-radius: 24px !important;
    }

    .admin-stats .stat-card span,
    .admin-stats .stat-card-link span {
        margin-bottom: 12px !important;
        font-size: 15px !important;
    }

    .admin-stats .stat-card strong,
    .admin-stats .stat-card-link strong {
        font-size: 36px !important;
    }
}