/* ========================================================
   PROPSID.COM - DESIGN SYSTEM & STYLESHEET
   Aesthetics: Modern SaaS, Clean Glassmorphism, Responsive
   ======================================================== */

:root {
    --propsid-primary: #1e40af;
    --propsid-primary-hover: #1d4ed8;
    --propsid-primary-light: #eff6ff;
    --propsid-secondary: #0f172a;
    --propsid-accent: #0284c7;
    --propsid-success: #10b981;
    --propsid-warning: #f59e0b;
    --propsid-danger: #ef4444;
    --propsid-info: #06b6d4;
    --propsid-dark: #0f172a;
    --propsid-light: #f8fafc;
    --propsid-border: #e2e8f0;
    --propsid-sidebar-bg: #0f172a;
    --propsid-sidebar-text: #94a3b8;
    --propsid-sidebar-active: #38bdf8;
    --propsid-card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --propsid-card-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --propsid-radius: 0.75rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f1f5f9;
    color: #334155;
    min-height: 100vh;
}

/* Glassmorphism Cards */
.propsid-card {
    background: #ffffff;
    border: 1px solid var(--propsid-border);
    border-radius: var(--propsid-radius);
    box-shadow: var(--propsid-card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.propsid-card:hover {
    box-shadow: var(--propsid-card-shadow-hover);
}

.propsid-card-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--propsid-border);
    padding: 1.1rem 1.4rem;
    font-weight: 600;
    font-size: 1.05rem;
    border-top-left-radius: var(--propsid-radius);
    border-top-right-radius: var(--propsid-radius);
}

/* Stat Widgets */
.stat-card {
    background: #ffffff;
    border: 1px solid var(--propsid-border);
    border-radius: var(--propsid-radius);
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--propsid-card-shadow);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--propsid-primary);
}

.stat-card.stat-success::before { background-color: var(--propsid-success); }
.stat-card.stat-warning::before { background-color: var(--propsid-warning); }
.stat-card.stat-danger::before { background-color: var(--propsid-danger); }
.stat-card.stat-info::before { background-color: var(--propsid-info); }

.stat-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.35rem;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
}

.stat-icon {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0.9;
}

/* Sidebar Navigation */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    background: var(--propsid-sidebar-bg);
    color: var(--propsid-sidebar-text);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.3s ease;
}

.app-sidebar .sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.app-sidebar .sidebar-brand span {
    color: #38bdf8;
}

.sidebar-nav {
    padding: 1rem 0;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 0.75rem 1.5rem 0.25rem;
    font-weight: 700;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 1.5rem;
    color: var(--propsid-sidebar-text);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.sidebar-link i {
    width: 24px;
    font-size: 1.1rem;
    margin-right: 0.6rem;
}

.sidebar-link:hover, .sidebar-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.06);
    border-left-color: var(--propsid-sidebar-active);
}

.app-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.app-header {
    background: #ffffff;
    border-bottom: 1px solid var(--propsid-border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
}

.app-main {
    padding: 1.5rem;
    flex-grow: 1;
}

/* Badges & Tables */
.table-responsive {
    background: #ffffff;
    border-radius: var(--propsid-radius);
    border: 1px solid var(--propsid-border);
}

.table th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--propsid-border);
}

.table td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--propsid-border);
}

/* Support Mode Impersonation Banner */
.support-mode-banner {
    background: linear-gradient(90deg, #d97706, #b45309);
    color: #ffffff;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 0.95rem;
}

/* Status Badges */
.badge-status {
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-trial { background-color: #e0f2fe; color: #0369a1; }
.badge-activo { background-color: #dcfce7; color: #15803d; }
.badge-en-gracia { background-color: #fef3c7; color: #b45309; }
.badge-restringido { background-color: #ffedd5; color: #c2410c; }
.badge-suspendido { background-color: #fee2e2; color: #b91c1c; }
.badge-cancelado { background-color: #f1f5f9; color: #475569; }

/* Mobile Portería Touch UI */
.porteria-touch-btn {
    padding: 1.5rem 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--propsid-card-shadow);
    transition: transform 0.15s ease;
}

.porteria-touch-btn:active {
    transform: scale(0.97);
}

@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
    }
    .app-sidebar.show {
        left: 0;
    }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
        z-index: 999;
        display: none;
    }
    .sidebar-overlay.show {
        display: block;
    }
}
