/* ============================================
   SafePass Design System
   Prefix: sp-
   Theme: Security (Indigo + Sky Blue + Teal)
   ============================================ */

/* === CSS Variables === */
:root {
    /* Primary palette */
    --sp-indigo: #6366f1;
    --sp-indigo-light: #818cf8;
    --sp-indigo-dark: #4f46e5;
    --sp-sky: #0ea5e9;
    --sp-sky-light: #38bdf8;
    --sp-sky-dark: #0284c7;
    --sp-teal: #14b8a6;
    --sp-teal-light: #2dd4bf;
    --sp-teal-dark: #0d9488;

    /* Gradients */
    --sp-gradient-primary: linear-gradient(135deg, var(--sp-indigo), var(--sp-sky));
    --sp-gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    --sp-gradient-card: linear-gradient(135deg, var(--sp-indigo), var(--sp-teal));
    --sp-gradient-danger: linear-gradient(135deg, #ef4444, #dc2626);
    --sp-gradient-success: linear-gradient(135deg, #22c55e, #16a34a);
    --sp-gradient-warning: linear-gradient(135deg, #f59e0b, #d97706);

    /* Light theme (default) */
    --sp-bg: #f8fafc;
    --sp-bg-card: #ffffff;
    --sp-bg-card-hover: #f1f5f9;
    --sp-bg-input: #ffffff;
    --sp-bg-nav: #0f172a;
    --sp-text: #1e293b;
    --sp-text-muted: #64748b;
    --sp-text-light: #94a3b8;
    --sp-border: #e2e8f0;
    --sp-border-light: #f1f5f9;
    --sp-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --sp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --sp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --sp-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Font */
    --sp-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sp-radius: 12px;
    --sp-radius-sm: 8px;
    --sp-radius-lg: 16px;
    --sp-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme */
[data-theme="dark"] {
    --sp-bg: #0f172a;
    --sp-bg-card: #1e293b;
    --sp-bg-card-hover: #334155;
    --sp-bg-input: #1e293b;
    --sp-bg-nav: #020617;
    --sp-text: #f1f5f9;
    --sp-text-muted: #94a3b8;
    --sp-text-light: #64748b;
    --sp-border: #334155;
    --sp-border-light: #1e293b;
    --sp-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --sp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --sp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
    --sp-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}

/* === Base Reset === */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: var(--sp-font);
    background-color: var(--sp-bg);
    color: var(--sp-text);
    margin-bottom: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--sp-indigo);
    transition: var(--sp-transition);
}

a:hover {
    color: var(--sp-indigo-dark);
}

/* === Focus States === */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
    border-color: var(--sp-indigo);
}

/* === Navbar === */
.sp-navbar {
    background: var(--sp-bg-nav);
    border-bottom: 3px solid transparent;
    border-image: var(--sp-gradient-primary) 1;
    padding: 0.5rem 0;
    backdrop-filter: blur(10px);
}

.sp-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sp-navbar .navbar-brand img {
    margin-top: -2px;
}

.sp-navbar .nav-link {
    color: #cbd5e1 !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--sp-radius-sm);
    transition: var(--sp-transition);
}

.sp-navbar .nav-link:hover,
.sp-navbar .nav-link.active {
    color: #fff !important;
    background: rgba(99, 102, 241, 0.2);
}

.sp-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.2);
}

.sp-navbar .navbar-toggler-icon {
    filter: invert(1);
}

/* === Cards === */
.sp-card {
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    transition: var(--sp-transition);
    overflow: hidden;
}

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

.sp-card-header {
    background: var(--sp-gradient-primary);
    color: #fff;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.sp-card-header h4,
.sp-card-header h5 {
    margin: 0;
    color: #fff;
}

.sp-card-header-danger {
    background: var(--sp-gradient-danger);
    color: #fff;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.sp-card-header-success {
    background: var(--sp-gradient-success);
    color: #fff;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.sp-card-header-warning {
    background: var(--sp-gradient-warning);
    color: #fff;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.sp-card-body {
    padding: 1.5rem;
}

.sp-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--sp-border);
    background: var(--sp-bg-card);
}

/* === Stat Cards === */
.sp-stat-card {
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--sp-transition);
    position: relative;
    overflow: hidden;
}

.sp-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--sp-gradient-primary);
}

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

.sp-stat-card .sp-stat-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    background: var(--sp-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sp-stat-card .sp-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--sp-text);
    line-height: 1.2;
}

.sp-stat-card .sp-stat-label {
    font-size: 0.875rem;
    color: var(--sp-text-muted);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Stat card color variants */
.sp-stat-card.sp-stat-indigo::before { background: var(--sp-indigo); }
.sp-stat-card.sp-stat-sky::before { background: var(--sp-sky); }
.sp-stat-card.sp-stat-teal::before { background: var(--sp-teal); }
.sp-stat-card.sp-stat-danger::before { background: #ef4444; }

/* === Buttons === */
.sp-btn-primary {
    background: var(--sp-gradient-primary);
    color: #fff;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: var(--sp-radius-sm);
    font-weight: 600;
    transition: var(--sp-transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.sp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    color: #fff;
    text-decoration: none;
}

.sp-btn-ghost {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.25rem;
    border-radius: var(--sp-radius-sm);
    font-weight: 500;
    transition: var(--sp-transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.sp-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
}

.sp-btn-danger {
    background: var(--sp-gradient-danger);
    color: #fff;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: var(--sp-radius-sm);
    font-weight: 600;
    transition: var(--sp-transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.sp-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    color: #fff;
}

.sp-btn-success {
    background: var(--sp-gradient-success);
    color: #fff;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: var(--sp-radius-sm);
    font-weight: 600;
    transition: var(--sp-transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.sp-btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    color: #fff;
}

/* === Badges === */
.sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
}

.sp-badge-indigo {
    background: rgba(99, 102, 241, 0.15);
    color: var(--sp-indigo);
}

.sp-badge-sky {
    background: rgba(14, 165, 233, 0.15);
    color: var(--sp-sky);
}

.sp-badge-teal {
    background: rgba(20, 184, 166, 0.15);
    color: var(--sp-teal);
}

.sp-badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.sp-badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.sp-badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.sp-badge-muted {
    background: rgba(100, 116, 139, 0.15);
    color: var(--sp-text-muted);
}

[data-theme="dark"] .sp-badge-success { color: #4ade80; }
[data-theme="dark"] .sp-badge-warning { color: #fbbf24; }
[data-theme="dark"] .sp-badge-danger { color: #f87171; }

/* === Hero Section === */
.sp-hero {
    background: var(--sp-gradient-hero);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.sp-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
    animation: sp-float 20s ease-in-out infinite;
}

/* Floating orbs for depth */
.sp-hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    top: 10%;
    right: -5%;
    animation: sp-orb-float 15s ease-in-out infinite alternate;
}

@keyframes sp-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -2%) rotate(1deg); }
    66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

@keyframes sp-orb-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30px, 40px) scale(1.15); }
}

.sp-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    animation: sp-hero-entrance 0.8s cubic-bezier(0, 0, 0.2, 1) forwards;
}

@keyframes sp-hero-entrance {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.sp-hero h1 {
    font-size: 3.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.sp-hero h1 .sp-gradient-text {
    background: linear-gradient(135deg, #818cf8, #38bdf8, #2dd4bf);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: sp-gradient-shift 6s ease-in-out infinite;
}

@keyframes sp-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.sp-hero p {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.sp-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.sp-hero-actions .sp-btn-primary {
    padding: 0.875rem 2.25rem;
    font-size: 1.1rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.sp-hero-actions .sp-btn-primary:hover {
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.sp-hero-actions .sp-btn-ghost {
    padding: 0.875rem 2.25rem;
    font-size: 1.1rem;
    border-radius: 12px;
}

.sp-hero-shield {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 28px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(10px);
    animation: sp-pulse-shield 3s ease-in-out infinite;
}

@keyframes sp-pulse-shield {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.2); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px 10px rgba(99, 102, 241, 0.1); }
}

@media (max-width: 768px) {
    .sp-hero h1 { font-size: 2.25rem; }
    .sp-hero p { font-size: 1rem; }
    .sp-hero-shield { font-size: 3rem; width: 80px; height: 80px; }
}

/* === Features Section === */
.sp-features {
    padding: 5rem 0;
    background: var(--sp-bg);
}

.sp-feature-card {
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--sp-transition);
    height: 100%;
}

.sp-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--sp-shadow-xl);
    border-color: var(--sp-indigo);
}

.sp-feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.5rem;
    color: #fff;
}

.sp-feature-icon.sp-icon-indigo { background: var(--sp-gradient-primary); }
.sp-feature-icon.sp-icon-teal { background: linear-gradient(135deg, var(--sp-teal), var(--sp-sky)); }
.sp-feature-icon.sp-icon-sky { background: linear-gradient(135deg, var(--sp-sky), var(--sp-indigo)); }

.sp-feature-card h5 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--sp-text);
}

.sp-feature-card p {
    color: var(--sp-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* === Steps Section === */
.sp-steps {
    padding: 5rem 0;
    background: var(--sp-bg-card);
}

[data-theme="dark"] .sp-steps {
    background: #1a1f35;
}

.sp-step {
    text-align: center;
    position: relative;
    padding: 0 1rem;
}

.sp-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--sp-gradient-primary);
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 1;
}

.sp-step h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--sp-text);
}

.sp-step p {
    color: var(--sp-text-muted);
    font-size: 0.9rem;
}

.sp-steps-connector {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-steps-connector::before {
    content: '';
    width: 100%;
    height: 2px;
    background: var(--sp-gradient-primary);
    opacity: 0.3;
}

@media (max-width: 768px) {
    .sp-steps-connector { display: none; }
}

/* === Security Badges Section === */
.sp-security-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0;
}

.sp-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--sp-indigo-light);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--sp-transition);
}

.sp-security-badge:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

/* === CTA Banner === */
.sp-cta-banner {
    background: var(--sp-gradient-primary);
    padding: 4rem 2rem;
    text-align: center;
    color: #fff;
    border-radius: var(--sp-radius-lg);
    margin: 2rem 0;
}

.sp-cta-banner h3 {
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.sp-cta-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.sp-cta-banner .sp-btn-cta {
    background: #fff;
    color: var(--sp-indigo);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--sp-radius-sm);
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--sp-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.sp-cta-banner .sp-btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* === Search Bar === */
.sp-search-bar {
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 1.25rem;
    box-shadow: var(--sp-shadow);
}

.sp-search-input {
    background: var(--sp-bg-input);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    color: var(--sp-text);
    transition: var(--sp-transition);
    width: 100%;
}

.sp-search-input:focus {
    border-color: var(--sp-indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

.sp-search-input::placeholder {
    color: var(--sp-text-light);
}

.sp-search-wrapper {
    position: relative;
}

.sp-search-wrapper i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sp-text-light);
}

.sp-search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--sp-text-light);
    cursor: pointer;
    padding: 0.25rem;
    display: none;
}

.sp-search-clear.visible {
    display: block;
}

/* === Form Controls === */
.sp-form-control {
    background: var(--sp-bg-input);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    padding: 0.625rem 1rem;
    color: var(--sp-text);
    transition: var(--sp-transition);
    width: 100%;
}

.sp-form-control:focus {
    border-color: var(--sp-indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--sp-bg-input);
    border-color: var(--sp-border);
    color: var(--sp-text);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--sp-bg-input);
    border-color: var(--sp-indigo);
    color: var(--sp-text);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--sp-text-light);
}

/* === Filter Buttons === */
.sp-filter-btn {
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--sp-border);
    background: var(--sp-bg-card);
    color: var(--sp-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--sp-transition);
}

.sp-filter-btn:hover {
    border-color: var(--sp-indigo);
    color: var(--sp-indigo);
}

.sp-filter-btn.active {
    background: var(--sp-indigo);
    border-color: var(--sp-indigo);
    color: #fff;
}

/* View toggle */
.sp-view-toggle {
    display: inline-flex;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    overflow: hidden;
}

.sp-view-toggle button {
    padding: 0.375rem 0.75rem;
    border: none;
    background: var(--sp-bg-card);
    color: var(--sp-text-muted);
    cursor: pointer;
    transition: var(--sp-transition);
}

.sp-view-toggle button.active {
    background: var(--sp-indigo);
    color: #fff;
}

.sp-view-toggle button:not(:last-child) {
    border-right: 1px solid var(--sp-border);
}

/* === Password Strength Meter === */
.sp-password-strength {
    margin-top: 0.5rem;
}

.sp-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--sp-border);
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.sp-strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0;
}

.sp-strength-fill.weak { width: 25%; background: #ef4444; }
.sp-strength-fill.fair { width: 50%; background: #f59e0b; }
.sp-strength-fill.good { width: 75%; background: #0ea5e9; }
.sp-strength-fill.strong { width: 100%; background: #22c55e; }

.sp-strength-text {
    font-size: 0.75rem;
    font-weight: 500;
}

.sp-strength-text.weak { color: #ef4444; }
.sp-strength-text.fair { color: #f59e0b; }
.sp-strength-text.good { color: #0ea5e9; }
.sp-strength-text.strong { color: #22c55e; }

/* === Footer === */
.sp-footer {
    background: var(--sp-bg-nav);
    color: #94a3b8;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.sp-footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--sp-transition);
}

.sp-footer a:hover {
    color: var(--sp-indigo-light);
}

.sp-footer-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.sp-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-footer-links li {
    margin-bottom: 0.5rem;
}

.sp-footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 1.5rem;
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.sp-footer-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sp-footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--sp-indigo-light);
    font-size: 0.7rem;
    font-weight: 600;
}

/* === Theme Toggle === */
.sp-theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 1.1rem;
    transition: var(--sp-transition);
    padding: 0;
}

.sp-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(15deg);
}

/* === Table === */
.sp-table {
    width: 100%;
    border-collapse: collapse;
}

.sp-table thead th {
    background: var(--sp-bg-card);
    color: var(--sp-text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid var(--sp-border);
}

.sp-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--sp-border-light);
    color: var(--sp-text);
    vertical-align: middle;
}

.sp-table tbody tr {
    transition: var(--sp-transition);
}

.sp-table tbody tr:hover {
    background: var(--sp-bg-card-hover);
}

/* === Password Card (for MDP list) === */
.sp-pwd-card {
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    overflow: hidden;
    transition: var(--sp-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sp-pwd-card:hover {
    border-color: var(--sp-indigo);
    box-shadow: var(--sp-shadow-lg);
    transform: translateY(-2px);
}

.sp-pwd-card.sp-pwd-alert {
    border-color: #ef4444;
    border-left: 4px solid #ef4444;
}

.sp-pwd-card.sp-pwd-inactive {
    opacity: 0.7;
    border-color: #f59e0b;
}

.sp-pwd-card-header {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--sp-border-light);
}

.sp-pwd-card-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    color: var(--sp-text);
}

.sp-pwd-card-body {
    padding: 1.25rem;
    flex: 1;
}

.sp-pwd-card-body .sp-pwd-field {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--sp-text-muted);
}

.sp-pwd-card-body .sp-pwd-field strong {
    color: var(--sp-text);
}

.sp-pwd-card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--sp-border-light);
    display: flex;
    gap: 0.5rem;
}

.sp-pwd-card-footer .btn {
    flex: 1;
}

/* === List View (alternative to grid) === */
.sp-list-view .sp-pwd-card {
    flex-direction: row;
    align-items: center;
}

.sp-list-view .sp-pwd-card-header {
    border-bottom: none;
    border-right: 1px solid var(--sp-border-light);
    min-width: 200px;
}

.sp-list-view .sp-pwd-card-body {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.sp-list-view .sp-pwd-card-footer {
    border-top: none;
    border-left: 1px solid var(--sp-border-light);
    flex-direction: column;
    min-width: 120px;
}

@media (max-width: 768px) {
    .sp-list-view .sp-pwd-card { flex-direction: column; }
    .sp-list-view .sp-pwd-card-header { border-right: none; border-bottom: 1px solid var(--sp-border-light); }
    .sp-list-view .sp-pwd-card-body { flex-direction: column; gap: 0.5rem; }
    .sp-list-view .sp-pwd-card-footer { border-left: none; border-top: 1px solid var(--sp-border-light); flex-direction: row; }
}

/* === Empty State === */
.sp-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--sp-text-muted);
}

.sp-empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.sp-empty-state h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--sp-text);
}

/* === Manage Nav (sidebar) === */
.sp-manage-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-manage-nav .nav-link {
    padding: 0.75rem 1.25rem;
    border-radius: var(--sp-radius-sm);
    color: var(--sp-text-muted);
    font-weight: 500;
    transition: var(--sp-transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.sp-manage-nav .nav-link:hover {
    background: var(--sp-bg-card-hover);
    color: var(--sp-indigo);
}

.sp-manage-nav .nav-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--sp-indigo);
    font-weight: 600;
    position: relative;
}

.sp-manage-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 3px;
    background: var(--sp-indigo);
    border-radius: 0 3px 3px 0;
}

/* === Dark mode overrides for Bootstrap components === */
[data-theme="dark"] .card {
    background-color: var(--sp-bg-card);
    border-color: var(--sp-border);
}

[data-theme="dark"] .card-header {
    border-color: var(--sp-border);
}

[data-theme="dark"] .card-footer {
    border-color: var(--sp-border);
}

[data-theme="dark"] .table {
    color: var(--sp-text);
}

[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: var(--sp-bg-card-hover);
    color: var(--sp-text);
}

[data-theme="dark"] .alert-info {
    background-color: rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.3);
    color: var(--sp-sky-light);
}

[data-theme="dark"] .alert-warning {
    background-color: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

[data-theme="dark"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

[data-theme="dark"] .alert-success {
    background-color: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

[data-theme="dark"] .modal-content {
    background-color: var(--sp-bg-card);
    border-color: var(--sp-border);
    color: var(--sp-text);
}

[data-theme="dark"] .modal-header {
    border-color: var(--sp-border);
}

[data-theme="dark"] .modal-footer {
    border-color: var(--sp-border);
}

[data-theme="dark"] .btn-outline-secondary {
    border-color: var(--sp-border);
    color: var(--sp-text-muted);
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: var(--sp-bg-card-hover);
    border-color: var(--sp-text-muted);
    color: var(--sp-text);
}

[data-theme="dark"] .btn-secondary {
    background-color: #334155;
    border-color: #475569;
    color: #fff;
}

[data-theme="dark"] .text-muted {
    color: var(--sp-text-muted) !important;
}

[data-theme="dark"] .border-top {
    border-color: var(--sp-border) !important;
}

[data-theme="dark"] .input-group-text {
    background-color: var(--sp-bg-card-hover);
    border-color: var(--sp-border);
    color: var(--sp-text-muted);
}

[data-theme="dark"] .toast {
    background-color: var(--sp-bg-card);
    border-color: var(--sp-border);
}

[data-theme="dark"] .toast-body {
    color: var(--sp-text);
}

[data-theme="dark"] hr {
    border-color: var(--sp-border);
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--sp-bg-card);
    border-color: var(--sp-border);
}

[data-theme="dark"] .dropdown-item {
    color: var(--sp-text);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--sp-bg-card-hover);
}

/* === User Avatar === */
.sp-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sp-gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* === Collapsible Section === */
.sp-collapsible-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    user-select: none;
}

.sp-collapsible-header i.sp-chevron {
    transition: transform 0.3s ease;
}

.sp-collapsible-header[aria-expanded="true"] i.sp-chevron {
    transform: rotate(180deg);
}

/* === Pulse animation for warning icons === */
@keyframes sp-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.sp-pulse {
    animation: sp-pulse 2s ease-in-out infinite;
}

/* === Toggle Switch (actif/inactif) === */
.sp-toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
}

.sp-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sp-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #94a3b8;
    border-radius: 26px;
    transition: var(--sp-transition);
}

.sp-toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: var(--sp-transition);
}

.sp-toggle-switch input:checked + .sp-toggle-slider {
    background: var(--sp-indigo);
}

.sp-toggle-switch input:checked + .sp-toggle-slider::before {
    transform: translateX(22px);
}

/* === Alert Expiration Card === */
.sp-alert-card {
    background: var(--sp-bg-card);
    border: 1px solid #f59e0b;
    border-left: 4px solid #f59e0b;
    border-radius: var(--sp-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.sp-alert-card.sp-alert-danger {
    border-color: #ef4444;
    border-left-color: #ef4444;
}

/* === Quick Action Cards (Dashboard) === */
.sp-action-card {
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--sp-transition);
    text-decoration: none;
    display: block;
    color: var(--sp-text);
    height: 100%;
}

.sp-action-card:hover {
    border-color: var(--sp-indigo);
    box-shadow: var(--sp-shadow-md);
    transform: translateY(-4px);
    color: var(--sp-text);
    text-decoration: none;
}

.sp-action-card i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.sp-action-card h6 {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.sp-action-card p {
    color: var(--sp-text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* === Notification Badge (navbar) === */
.sp-notif-badge {
    position: relative;
}

.sp-notif-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* === Utilities === */
.sp-section-title {
    font-weight: 800;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--sp-text);
}

.sp-section-subtitle {
    text-align: center;
    color: var(--sp-text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.sp-gradient-text {
    background: var(--sp-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sp-full-width {
    max-width: 100%;
    padding: 0;
}

/* Full-width layout for landing page */
.sp-layout-full main {
    max-width: 100%;
    padding: 0;
}

/* Container layout for authenticated pages */
.sp-layout-container main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Definition list for details page */
.sp-dl dt {
    color: var(--sp-text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.sp-dl dd {
    color: var(--sp-text);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

/* Password zone */
.sp-password-zone {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--sp-radius);
    padding: 1.25rem;
}

[data-theme="dark"] .sp-password-zone {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}
