/* ==================== RESET Y VARIABLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores oficiales Novae IA */
    --primary-color: #ef771b;
    --primary-hover: #d86a17;
    --secondary-color: #2E4C9B;
    --secondary-hover: #243d7d;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-dark: #0f0f0f;
    --text-dark: #1a1a1a;
    --text-gray: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

/* ==================== TIPOGRAFÍA ==================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== LAYOUT ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-container {
    min-height: calc(100vh - 180px);
    padding: 2rem 0;
}

/* ==================== HEADER ==================== */
.header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo p {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 400;
}

.system-status {
    text-align: right;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.status-badge.ready {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==================== NAVEGACIÓN ==================== */
.header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.user-greeting {
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(239, 119, 27, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(239, 119, 27, 0.3);
}

/* Botón en header */
.header-nav .btn {
    padding: 0.5rem 1.25rem;
}

/* ==================== ALERTAS ==================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error, .alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert .close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.alert .close:hover {
    opacity: 1;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

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

.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-top: 0.5rem;
    font-style: italic;
}

.card-body {
    padding: 2rem;
}

/* ==================== FORMULARIOS ==================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.form-grid.three-cols {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    line-height: 1.6;
}

.form-group input:required,
.form-group textarea:required {
    border-left: 3px solid var(--primary-color);
}

/* ==================== BOTONES ==================== */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.25rem;
}

.btn-primary,
input[type="submit"].btn-primary,
button.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
    color: white !important;
    box-shadow: var(--shadow-sm);
    border: none;
}

.btn-primary:hover:not(:disabled),
input[type="submit"].btn-primary:hover:not(:disabled),
button.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-hover), #c45a10) !important;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary,
input[type="submit"].btn-secondary,
button.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-hover)) !important;
    color: white !important;
    box-shadow: var(--shadow-sm);
    border: none;
}

.btn-secondary:hover:not(:disabled),
input[type="submit"].btn-secondary:hover:not(:disabled),
button.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--secondary-hover), #1e3366) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Botón de éxito (verde) */
.btn-success,
input[type="submit"].btn-success,
button.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669) !important;
    color: white !important;
    box-shadow: var(--shadow-sm);
    border: none;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 1.5px solid var(--border-color);
}

.btn-outline:hover:not(:disabled) {
    background: var(--bg-light);
    border-color: var(--text-gray);
}

/* ==================== PROGRESO ==================== */
.progress-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4), 0 0 0 1px rgba(255,255,255,0.1);
    margin: 2rem 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: slideInDown 0.5s ease-out, pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4), 0 0 0 1px rgba(255,255,255,0.1);
    }
    50% {
        box-shadow: 0 10px 60px rgba(102, 126, 234, 0.6), 0 0 0 2px rgba(255,255,255,0.3);
    }
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.spinner-container {
    flex-shrink: 0;
}

.spinner-container .spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.progress-details {
    flex: 1;
}

.progress-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.progress-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 1rem 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
    border-radius: 999px;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    animation: shimmer 2s ease-in-out infinite;
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.progress-percentage {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 50px;
    text-align: right;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
    .progress-info {
        flex-direction: column;
        text-align: center;
    }

    .spinner-container .spinner {
        width: 60px;
        height: 60px;
    }

    .progress-title {
        font-size: 1.25rem;
    }

    .progress-text {
        font-size: 1rem;
    }
}

/* ==================== RESULTADOS ==================== */
.results-container {
    margin-top: 3rem;
}

.derechos-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.derecho-item {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--text-dark);
}

.content-box,
.preview-box {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    line-height: 1.8;
    white-space: pre-wrap;
    font-size: 0.9375rem;
    max-height: 600px;
    overflow-y: auto;
}

.preview-box {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    max-height: 800px;
}

/* ==================== FOOTER ==================== */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer p {
    margin: 0.25rem 0;
}

.footer-subtitle {
    font-size: 0.875rem;
    opacity: 0.7;
}

.footer-legal {
    margin-bottom: 1rem;
}

.footer-legal a {
    color: #a5b4fc;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: white;
    text-decoration: underline;
}

/* ==================== LOADING OVERLAY ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-spinner p {
    font-size: 1.125rem;
    font-weight: 500;
}

/* ==================== SCROLLBAR ==================== */
.content-box::-webkit-scrollbar,
.preview-box::-webkit-scrollbar {
    width: 8px;
}

.content-box::-webkit-scrollbar-track,
.preview-box::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 999px;
}

.content-box::-webkit-scrollbar-thumb,
.preview-box::-webkit-scrollbar-thumb {
    background: var(--text-gray);
    border-radius: 999px;
}

.content-box::-webkit-scrollbar-thumb:hover,
.preview-box::-webkit-scrollbar-thumb:hover {
    background: var(--text-dark);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .system-status {
        text-align: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .card-body {
        padding: 1.5rem;
    }
}

/* ==================== ANIMACIONES ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease;
}

/* ==================== UTILIDADES ==================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ==================== AUTH PAGES ==================== */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
}

.auth-box {
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.auth-box-header {
    background: linear-gradient(135deg, #2E4C9B 0%, #1a3178 100%);
    padding: 2.25rem 2.5rem 1.75rem;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
}

.auth-logo-icon { font-size: 2rem; margin-bottom: 0.6rem; }

.auth-box-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.auth-box-header p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    margin: 0;
}

.auth-box-body { padding: 2rem 2.5rem 2.5rem; }

.auth-footer-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.auth-footer-link a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.auth-footer-link a:hover { text-decoration: underline; }

.form-error {
    font-size: 0.8rem;
    color: var(--danger-color);
    margin-top: 0.25rem;
    display: block;
}

/* ==================== PAGE HERO ==================== */
.page-hero {
    background: linear-gradient(135deg, #2E4C9B 0%, #1a3178 55%, #0f2a4a 100%);
    margin-top: -2rem;
    margin-bottom: 2.5rem;
    padding: 2.25rem 0;
    border-bottom: 3px solid var(--primary-color);
}

.page-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.page-hero h1 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.2rem;
}

.page-hero p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    margin: 0;
}

/* ==================== DASHBOARD ==================== */
.dashboard-welcome {
    background: linear-gradient(135deg, #2E4C9B 0%, #1a3178 55%, #0f2a4a 100%);
    margin-top: -2rem;
    margin-bottom: 2.5rem;
    padding: 2.25rem 0;
    border-bottom: 3px solid var(--primary-color);
}

.welcome-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.plan-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 0.35rem 1rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.88);
}

.plan-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
}

.plan-dot.trial  { background: #f59e0b; }
.plan-dot.none   { background: #6b7280; }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    animation: fadeIn 0.3s ease;
}

.tool-card:hover:not(.tool-card--locked) {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: #c7d7f7;
}

.tool-card--locked { opacity: 0.6; }

.tool-card-top {
    padding: 1.25rem 1.5rem 0.9rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.tool-top-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tool-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.tool-icon.blue   { background: #dbeafe; }
.tool-icon.green  { background: #d1fae5; }
.tool-icon.purple { background: #ede9fe; }
.tool-icon.amber  { background: #fef3c7; }
.tool-icon.rose   { background: #fee2e2; }

.tool-name {
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--text-dark);
}

.upgrade-chip {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-gray);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tool-card-body {
    padding: 0.9rem 1.5rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tool-desc {
    font-size: 0.855rem;
    color: var(--text-gray);
    line-height: 1.6;
    flex: 1;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
}

.see-all-link {
    font-size: 0.825rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.see-all-link:hover { text-decoration: underline; }

.activity-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.activity-row:last-child { border-bottom: none; }
.activity-row:hover { background: #f8fafc; }

.activity-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--secondary-color);
    background: #eff6ff;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.activity-text {
    font-size: 0.875rem;
    color: var(--text-dark);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-time {
    font-size: 0.775rem;
    color: var(--text-gray);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==================== PLAN CARDS ==================== */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.plan-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.plan-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(239,119,27,0.12);
}

.plan-popular-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.plan-card-top {
    padding: 1.75rem 1.75rem 1.25rem;
    background: #fafcff;
    border-bottom: 1px solid var(--border-color);
}

.plan-card.featured .plan-card-top {
    background: linear-gradient(135deg, #fff9f4, #fff4eb);
    border-bottom-color: rgba(239,119,27,0.25);
}

.plan-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.3rem;
}

.plan-desc {
    font-size: 0.84rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.plan-price-block {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
}

.plan-price-amount {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.plan-price-period {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-left: 0.15rem;
}

.plan-features-list {
    list-style: none;
    padding: 1.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.plan-feature-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.plan-feature-check { color: var(--success-color); font-weight: 700; flex-shrink: 0; }

.plan-cta-block { padding: 1rem 1.75rem 1.75rem; }

/* ==================== STATUS PILLS ==================== */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

.status-pill.active   { background: #d1fae5; color: #065f46; }
.status-pill.trial    { background: #fef3c7; color: #92400e; }
.status-pill.cancelled,
.status-pill.expired  { background: #f3f4f6; color: #6b7280; }
.status-pill.approved { background: #d1fae5; color: #065f46; }
.status-pill.pending  { background: #fef3c7; color: #92400e; }
.status-pill.rejected { background: #fee2e2; color: #991b1b; }

/* ==================== DATA TABLE ==================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.75rem 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-light);
}

.data-table td {
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f8fafc; }

/* ==================== FILTER PILLS ==================== */
.filter-pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.filter-pill {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.18s;
    border: 1.5px solid var(--border-color);
    color: var(--text-gray);
    background: var(--bg-white);
}

.filter-pill:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.filter-pill.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--secondary-color);
    border: 1.5px solid var(--border-color);
    background: var(--bg-white);
    transition: all 0.18s;
}

.pagination a:hover {
    border-color: var(--secondary-color);
    background: var(--bg-light);
}

/* ==================== RESPONSIVE ADDITIONS ==================== */
@media (max-width: 768px) {
    .auth-box-header { padding: 1.75rem 1.5rem 1.25rem; }
    .auth-box-body { padding: 1.5rem 1.5rem 2rem; }
    .plans-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .page-hero-inner { flex-direction: column; align-items: flex-start; }
}
