/* ── Variables ───────────────────────────────────────── */
:root {
    --accent-red: #c44536;
    --gradient-red: linear-gradient(135deg, #c44536, #d95f4e);
    --dark-bg: #0a0a0a;
    --dark-card: #111111;
    --dark-card-border: rgba(255, 255, 255, 0.07);
    --text-secondary: #a0a0a0;
    --text-muted: #5a5a5a;
}

/* ── Base ────────────────────────────────────────────── */
body {
    font-family: 'Raleway', sans-serif;
    background: var(--dark-bg);
    min-height: 100vh;
    padding: 80px 20px 60px;
}

/* ── Background decorations ──────────────────────────── */
.page-bg-glow {
    position: fixed;
    top: 0;
    right: 0;
    width: 65vw;
    height: 65vh;
    background: radial-gradient(ellipse at 75% 15%, rgba(196, 69, 54, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.page-bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: radial-gradient(ellipse at center, black 5%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, black 5%, transparent 75%);
}

/* ── Navbar ──────────────────────────────────────────── */
.navbar {
    background-color: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-brand { display: flex; align-items: center; }

.navbar-logo-icon {
    height: 40px; width: 40px;
    padding: 5px;
    background: var(--gradient-red);
    border-radius: 10px;
    margin-right: 0.75rem;
    object-fit: contain;
}

.navbar-logo-text { height: 40px; }

/* ── Page container ──────────────────────────────────── */
.account-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ── Profile hero card ───────────────────────────────── */
.profile-hero {
    background: var(--dark-card);
    border: 1px solid var(--dark-card-border);
    border-radius: 20px;
    padding: 2rem 2.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.account-avatar {
    width: 72px;
    height: 72px;
    background: var(--gradient-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(196, 69, 54, 0.18);
}

.profile-hero-info {
    flex: 1;
}

.profile-hero-info h1 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
}

.profile-hero-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.profile-hero-credits {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.workshop-logo-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.workshop-logo-hero img {
    max-height: 48px;
    max-width: 140px;
    object-fit: contain;
    border-radius: 4px;
}

.workshop-logo-hero span {
    font-size: 9px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.credits-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(196, 69, 54, 0.12);
    border: 1px solid rgba(196, 69, 54, 0.28);
    border-radius: 50px;
    padding: 0.55rem 1.2rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
}

.credits-pill i {
    color: var(--accent-red);
}

.credits-pill-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-align: right;
}

/* ── Content grid ────────────────────────────────────── */
.account-layout {
    display: block;
}

/* ── Cards ───────────────────────────────────────────── */
.account-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-card-border);
    border-radius: 20px;
    padding: 1.75rem 2rem;
}

.card-section-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent-red);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

/* ── Info grid ───────────────────────────────────────── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    transition: border-color 0.2s;
}

.info-item:hover {
    border-color: rgba(196, 69, 54, 0.3);
}

.info-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.info-label i {
    color: var(--accent-red);
    font-size: 0.68rem;
}

.info-value {
    color: #fff;
    font-size: 0.97rem;
    font-weight: 500;
}

/* ── Editable profile inputs ───────────────────────── */
.btn-edit-profile {
    background: transparent;
    border: 1px solid rgba(196, 69, 54, 0.45);
    color: var(--accent-red);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.btn-edit-profile:hover {
    background: rgba(196, 69, 54, 0.12);
}

.profile-input {
    background: rgba(255, 255, 255, 0.04) !important;
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff !important;
    font-size: 0.97rem;
    font-weight: 500;
    padding: 0.3rem 0.55rem;
    border-radius: 8px;
}

.profile-input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-red);
    box-shadow: 0 0 0 0.2rem rgba(196, 69, 54, 0.22);
    color: #fff;
}

.profile-input::placeholder {
    color: rgba(255, 255, 255, 0.28);
    font-weight: 400;
}

/* ── Right sidebar ───────────────────────────────────── */
.sidebar-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-card-border);
    border-radius: 20px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-credits-big {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(196, 69, 54, 0.06);
    border: 1px solid rgba(196, 69, 54, 0.15);
    border-radius: 14px;
}

.sidebar-credits-big .credits-num {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.sidebar-credits-big .credits-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* ── Buttons ─────────────────────────────────────────── */
.btn-primary {
    --bs-btn-bg: var(--accent-red);
    --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: #d95f4e;
    --bs-btn-hover-border-color: transparent;
    background: var(--gradient-red);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 50px;
    padding: 0.65rem 1.4rem;
    font-size: 0.9rem;
    box-shadow: 0 4px 14px rgba(196, 69, 54, 0.3);
    transition: all 0.25s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(196, 69, 54, 0.45);
    color: #fff;
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 50px;
    padding: 0.65rem 1.4rem;
    font-size: 0.9rem;
    transition: all 0.25s;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-outline-danger {
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #e07070;
    font-weight: 500;
    border-radius: 50px;
    padding: 0.65rem 1.4rem;
    font-size: 0.9rem;
    transition: all 0.25s;
}

.btn-outline-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.5);
    color: #ff8080;
}

/* ── Alerts ──────────────────────────────────────────── */
.alert {
    border-radius: 10px;
    border: none;
    font-size: 0.88rem;
}

/* ── Auth Loader ─────────────────────────────────────── */
#authLoader {
    position: fixed;
    inset: 0;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

#authLoader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.auth-loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(196, 69, 54, 0.15);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.auth-loader-text {
    color: var(--text-secondary);
    margin-top: 1rem;
    font-size: 0.9rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar-brand {
        position: relative !important;
        left: auto !important;
        transform: none !important;
        margin-left: 0;
    }

    .profile-hero {
        flex-direction: column;
        text-align: center;
    }

    .profile-hero-credits {
        align-items: center;
        width: 100%;
    }

    .credits-pill-label {
        text-align: center;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}


.navbar-brand {
    display: flex;
    align-items: center;
}

/* ── Subscription card ───────────────────────────────── */
.sub-loading {
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 0.5rem 0;
}

.sub-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding: 1.5rem 0 0.5rem;
    text-align: center;
}
.sub-empty i {
    font-size: 2rem;
    color: var(--text-muted);
}
.sub-empty p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0;
}
.btn-ver-planes {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.35rem;
    background: var(--gradient-red);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-family: 'Raleway', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(196, 69, 54, 0.35);
    transition: box-shadow 0.22s, transform 0.22s;
}
.btn-ver-planes:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(196, 69, 54, 0.5);
}

.sub-status-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.sub-status-row > div {
    flex: 1;
    min-width: 120px;
}

.sub-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
}
.sub-badge-active {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}
.sub-badge-pending {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #eab308;
}
.sub-badge-pastdue {
    background: rgba(196, 69, 54, 0.1);
    border: 1px solid rgba(196, 69, 54, 0.3);
    color: #f87171;
}
.sub-badge-cancelled {
    background: rgba(100, 116, 139, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #94a3b8;
}

.sub-pastdue-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(196, 69, 54, 0.08);
    border: 1px solid rgba(196, 69, 54, 0.25);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}
.sub-pastdue-banner i { color: #f87171; flex-shrink: 0; }
.sub-pastdue-banner a { color: #f87171; }

.btn-cancel-sub {
    background: transparent;
    border: 1px solid rgba(196, 69, 54, 0.4);
    color: #f87171;
    font-family: 'Raleway', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.95rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-cancel-sub:hover {
    background: rgba(196, 69, 54, 0.1);
    border-color: #f87171;
}
.btn-cancel-sub:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sub-cancel-note {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin: 0.4rem 0 0;
}


.navbar-logo-icon {
    height: 40px;
    width: 40px;
    padding: 5px;
    background: linear-gradient(135deg, #c44536, #d95f4e);
    border-radius: 10px;
    margin-right: 0.75rem;
    object-fit: contain;
}

.navbar-logo-text {
    height: 40px;
}

body {
    font-family: 'Raleway', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    min-height: 100vh;
    padding: 80px 20px 40px;
}

.account-container {
    max-width: 800px;
    margin: 0 auto;
}

.account-card {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

.account-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #2a2a2a;
}

.account-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #c44536 0%, #d95f4e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    font-weight: 700;
}

.account-title h1 {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.account-title p {
    color: #a0a0a0;
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section:last-child {
    margin-bottom: 0;
}

.section-title {
    color: #c44536;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    background-color: #0a0a0a;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    transition: all 0.3s;
}

.info-item:hover {
    border-color: #c44536;
    transform: translateY(-2px);
}

.info-label {
    color: #6a6a6a;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-value {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
}

.credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #c44536 0%, #d95f4e 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 1.25rem;
    font-weight: 700;
    border: 1px solid white;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #a0a0a0;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #ffffff;
}

.btn-outline-primary {
    background: linear-gradient(135deg, #c44536 0%, #d95f4e 100%);
    border: 1px solid white;
    color: white;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #d95f4e 0%, #c44536 100%);
    border-color: white;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(196, 69, 54, 0.4);
}

.alert {
    border-radius: 8px;
    border: none;
}

/* Auth Loader */
#authLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#authLoader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.auth-loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #2a2a2a;
    border-top-color: #c44536;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.auth-loader-text {
    color: #a0a0a0;
    margin-top: 1rem;
    font-size: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        position: relative !important;
        left: auto !important;
        transform: none !important;
        margin-left: 0;
    }
    
    .account-card {
        padding: 2rem 1.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Historial de Actividad ──────────────────────────── */

/* Card wrapper */
.act-card {
    margin-bottom: 1.5rem;
}

/* ── Filter bar ─── */
.act-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.act-filter-select,
.act-filter-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d0d0d0;
    font-family: 'Raleway', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.38rem 0.7rem;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    height: 34px;
}

.act-filter-select {
    min-width: 145px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    padding-right: 1.8rem;
}

.act-filter-select option {
    background: #111;
    color: #d0d0d0;
}

.act-filter-select:focus,
.act-filter-input:focus {
    border-color: var(--accent-red);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(196, 69, 54, 0.12);
}

.act-filter-input::-webkit-calendar-picker-indicator {
    filter: invert(0.6);
    cursor: pointer;
}

.act-filter-date-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.act-filter-date-sep {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.act-filter-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-family: 'Raleway', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.38rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    height: 34px;
    transition: border-color 0.2s, color 0.2s;
}

.act-filter-reset:hover {
    border-color: rgba(196, 69, 54, 0.4);
    color: var(--accent-red);
}

/* ── State messages ─── */
.act-state-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.act-state-msg i {
    font-size: 1.1rem;
    opacity: 0.6;
}

/* ── Feed list ─── */
#activityList {
    list-style: none;
    padding: 0;
    margin: 0;
}

.act-item {
    display: flex;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 0.55rem;
    transition: border-color 0.2s, background 0.2s;
}

.act-item:last-child {
    margin-bottom: 0;
}

.act-item:hover {
    border-color: rgba(196, 69, 54, 0.22);
    background: rgba(0, 0, 0, 0.3);
}

/* ── Icon circle ─── */
.act-icon-wrap {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    margin-top: 0.1rem;
}

.act-icon-created        { background: rgba(76, 175, 80, 0.12);  }
.act-icon-updated        { background: rgba(33, 150, 243, 0.12); }
.act-icon-deleted        { background: rgba(244, 67, 54, 0.12);  }
.act-icon-stock_adjusted { background: rgba(255, 152, 0, 0.12);  }

/* ── Item body ─── */
.act-body {
    flex: 1;
    min-width: 0;
}

.act-summary {
    font-size: 0.875rem;
    color: #c8c8c8;
    line-height: 1.5;
    word-break: break-word;
}

.act-actor {
    font-weight: 700;
    color: #efefef;
}

.act-verb {
    color: var(--text-secondary);
}

.act-entity {
    color: var(--text-secondary);
}

.act-label {
    color: #c0c0c0;
    font-weight: 500;
}

/* ── Meta row ─── */
.act-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.4rem;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.act-meta i.fa-clock {
    opacity: 0.6;
}

/* ── Action badge ─── */
.act-badge {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.act-badge-created        { background: rgba(76, 175, 80, 0.12);  color: #81c784; }
.act-badge-updated        { background: rgba(33, 150, 243, 0.12); color: #64b5f6; }
.act-badge-deleted        { background: rgba(244, 67, 54, 0.12);  color: #ef9a9a; }
.act-badge-stock_adjusted { background: rgba(255, 152, 0, 0.12);  color: #ffb74d; }

/* ── "Ver cambios" button ─── */
.act-diff-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: transparent;
    border: 1px solid rgba(196, 69, 54, 0.3);
    color: var(--accent-red);
    font-family: 'Raleway', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.15s, border-color 0.15s;
}

.act-diff-toggle:hover {
    background: rgba(196, 69, 54, 0.1);
    border-color: rgba(196, 69, 54, 0.55);
}

/* ── Diff table ─── */
.act-diff {
    margin-top: 0.75rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.act-diff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.79rem;
}

.act-diff-table th {
    text-align: left;
    padding: 0.45rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.act-diff-table td {
    padding: 0.42rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
    word-break: break-word;
}

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

.act-diff-field  {
    color: #b8b8b8;
    font-weight: 600;
    width: 32%;
}

.act-diff-before {
    color: #ef9a9a;
    background: rgba(244, 67, 54, 0.04);
}

.act-diff-after {
    color: #81c784;
    background: rgba(76, 175, 80, 0.04);
}

/* ── Pagination ─── */
.act-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.25rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.act-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 1px solid rgba(196, 69, 54, 0.35);
    color: var(--accent-red);
    font-family: 'Raleway', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.38rem 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s, border-color 0.2s;
}

.act-page-btn:hover:not(:disabled) {
    background: rgba(196, 69, 54, 0.1);
    border-color: var(--accent-red);
}

.act-page-btn:disabled {
    opacity: 0.28;
    cursor: not-allowed;
}

.act-page-info {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
}

/* ── Responsive ─── */
@media (max-width: 600px) {
    .act-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .act-filter-select,
    .act-filter-input,
    .act-filter-reset {
        width: 100%;
    }

    .act-filter-date-group {
        flex: 1;
    }

    .act-filter-date-group .act-filter-input {
        flex: 1;
    }
}
