/* ==========================================================================
   Validator v2 Design System
   Based on user-profile.blade.php patterns
   ========================================================================== */

:root {
    --v2-primary: #0ea5e9;
    --v2-primary-dark: #0284c7;
    --v2-primary-light: #38bdf8;
    --v2-success: #10b981;
    --v2-success-dark: #059669;
    --v2-warning: #f59e0b;
    --v2-warning-dark: #d97706;
    --v2-danger: #ef4444;
    --v2-danger-dark: #dc2626;
    --v2-purple: #8b5cf6;
    --v2-purple-dark: #7c3aed;
    --v2-info: #06b6d4;
    --v2-info-dark: #0891b2;
    --v2-bg-dark: #0a1628;
    --v2-card-dark: rgba(15, 30, 50, 0.8);
    --v2-text-muted: #94a3b8;
    --v2-text-dark: #1e293b;
    --v2-text-secondary: #64748b;
    --v2-heading: #f8fafc;
    --v2-border-light: rgba(14, 165, 233, 0.15);
    --v2-border: #e2e8f0;
    --v2-bg-light: #f8fafc;
    --v2-radius-sm: 8px;
    --v2-radius: 12px;
    --v2-radius-lg: 16px;
    --v2-radius-xl: 20px;
    --v2-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --v2-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.v2-hero {
    background: var(--v2-bg-dark);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.v2-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.v2-hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 100%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

.v2-hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230ea5e9' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.v2-hero > .container-fluid,
.v2-hero > .container {
    position: relative;
    z-index: 10;
}

.v2-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 50px;
    color: var(--v2-primary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.v2-hero-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--v2-heading);
    margin: 0 0 0.5rem;
}

.v2-hero-subtitle {
    color: var(--v2-text-muted);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

/* Hero Stats */
.v2-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.v2-hero-stats.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.v2-hero-stat {
    background: var(--v2-card-dark);
    border: 1px solid var(--v2-border-light);
    border-radius: var(--v2-radius-lg);
    padding: 1rem 1.25rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.v2-hero-stat:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.3);
}

.v2-hero-stat.highlight { background: linear-gradient(135deg, var(--v2-primary), var(--v2-primary-dark)); border-color: transparent; }
.v2-hero-stat.success { background: linear-gradient(135deg, var(--v2-success), var(--v2-success-dark)); border-color: transparent; }
.v2-hero-stat.warning { background: linear-gradient(135deg, var(--v2-warning), var(--v2-warning-dark)); border-color: transparent; }
.v2-hero-stat.danger { background: linear-gradient(135deg, var(--v2-danger), var(--v2-danger-dark)); border-color: transparent; }
.v2-hero-stat.info { background: linear-gradient(135deg, var(--v2-info), var(--v2-info-dark)); border-color: transparent; }
.v2-hero-stat.purple { background: linear-gradient(135deg, var(--v2-purple), var(--v2-purple-dark)); border-color: transparent; }

.v2-hero-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--v2-heading);
    line-height: 1.2;
}

.v2-hero-stat-label {
    font-size: 0.75rem;
    color: var(--v2-text-muted);
    margin-top: 0.25rem;
}

.v2-hero-stat.highlight .v2-hero-stat-value,
.v2-hero-stat.highlight .v2-hero-stat-label,
.v2-hero-stat.success .v2-hero-stat-value,
.v2-hero-stat.success .v2-hero-stat-label,
.v2-hero-stat.warning .v2-hero-stat-value,
.v2-hero-stat.warning .v2-hero-stat-label,
.v2-hero-stat.danger .v2-hero-stat-value,
.v2-hero-stat.danger .v2-hero-stat-label,
.v2-hero-stat.info .v2-hero-stat-value,
.v2-hero-stat.info .v2-hero-stat-label,
.v2-hero-stat.purple .v2-hero-stat-value,
.v2-hero-stat.purple .v2-hero-stat-label {
    color: #fff;
}

/* Hero with inline stat cards (dashboard style) */
.v2-hero-stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--v2-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.v2-hero-stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.v2-hero-stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--v2-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.v2-hero-stat-card .stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.v2-hero-stat-card .stat-label {
    font-size: 0.7rem;
    color: var(--v2-text-secondary);
    margin-top: 0.2rem;
}

/* ==========================================================================
   Section (replaces .card)
   ========================================================================== */

.v2-section {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--v2-radius-xl);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.v2-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #1a2538 0%, #1e293b 50%, #1f2d42 100%);
    border-bottom: none;
}

.v2-section-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--v2-primary), var(--v2-primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.v2-section-icon.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.v2-section-icon.green { background: linear-gradient(135deg, var(--v2-success), var(--v2-success-dark)); }
.v2-section-icon.purple { background: linear-gradient(135deg, var(--v2-purple), var(--v2-purple-dark)); }
.v2-section-icon.orange { background: linear-gradient(135deg, var(--v2-warning), var(--v2-warning-dark)); }
.v2-section-icon.red { background: linear-gradient(135deg, var(--v2-danger), var(--v2-danger-dark)); }
.v2-section-icon.cyan { background: linear-gradient(135deg, var(--v2-info), var(--v2-info-dark)); }

.v2-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

.v2-section-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0.15rem 0 0;
}

.v2-section-body {
    padding: 1.5rem;
}

.v2-section-body.p-0 {
    padding: 0;
}

.v2-section-footer {
    padding: 1rem 1.5rem;
    background: var(--v2-bg-light);
    border-top: 1px solid var(--v2-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ==========================================================================
   Table
   ========================================================================== */

.v2-table-wrapper {
    border-radius: var(--v2-radius-lg);
    overflow: hidden;
}

.v2-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

.v2-table thead th {
    background: var(--v2-bg-light);
    border-bottom: 1px solid var(--v2-border);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--v2-text-secondary);
    padding: 14px 16px;
    white-space: nowrap;
}

.v2-table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: var(--v2-text-dark);
}

.v2-table tbody tr:last-child td {
    border-bottom: none;
}

.v2-table tbody tr {
    transition: background 0.15s ease;
}

.v2-table tbody tr:hover {
    background: var(--v2-bg-light);
}

/* ==========================================================================
   Badge
   ========================================================================== */

.v2-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
}

.v2-badge.warning { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.v2-badge.info { background: rgba(6, 182, 212, 0.15); color: #0891b2; }
.v2-badge.success { background: rgba(16, 185, 129, 0.15); color: #047857; }
.v2-badge.danger { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.v2-badge.secondary { background: rgba(100, 116, 139, 0.15); color: #475569; }
.v2-badge.primary { background: rgba(14, 165, 233, 0.15); color: #0284c7; }
.v2-badge.purple { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }

.v2-badge i {
    font-size: 0.65rem;
}

/* ==========================================================================
   Button
   ========================================================================== */

.v2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(135deg, var(--v2-primary), var(--v2-primary-dark));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.v2-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    color: #fff;
    text-decoration: none;
}

.v2-btn.sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
}

.v2-btn.success { background: linear-gradient(135deg, var(--v2-success), var(--v2-success-dark)); }
.v2-btn.success:hover { box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); }
.v2-btn.warning { background: linear-gradient(135deg, var(--v2-warning), var(--v2-warning-dark)); }
.v2-btn.danger { background: linear-gradient(135deg, var(--v2-danger), var(--v2-danger-dark)); }
.v2-btn.purple { background: linear-gradient(135deg, var(--v2-purple), var(--v2-purple-dark)); }

.v2-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    background: #fff;
    border: 1px solid var(--v2-border);
    border-radius: 10px;
    color: var(--v2-text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.v2-btn-outline:hover {
    border-color: var(--v2-primary);
    color: var(--v2-primary);
    background: rgba(14, 165, 233, 0.05);
    text-decoration: none;
}

/* Icon-only action button */
.v2-action-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--v2-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--v2-border);
    background: #fff;
    color: var(--v2-text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
}

.v2-action-btn:hover {
    border-color: var(--v2-primary);
    color: var(--v2-primary);
    background: #eff6ff;
    text-decoration: none;
}

.v2-action-btn.success:hover { border-color: var(--v2-success); color: var(--v2-success); background: #ecfdf5; }
.v2-action-btn.danger:hover { border-color: var(--v2-danger); color: var(--v2-danger); background: #fef2f2; }
.v2-action-btn.primary { border-color: var(--v2-primary); color: var(--v2-primary); background: #eff6ff; }

/* ==========================================================================
   Form
   ========================================================================== */

.v2-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.v2-field-group {
    display: flex;
    flex-direction: column;
}

.v2-field-group.full {
    grid-column: 1 / -1;
}

.v2-field-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
}

.v2-field-input {
    padding: 0.65rem 1rem;
    border: 1px solid var(--v2-border);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--v2-text-dark);
    background: #fff;
    transition: all 0.2s ease;
}

.v2-field-input:focus {
    outline: none;
    border-color: var(--v2-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* ==========================================================================
   Alert
   ========================================================================== */

.v2-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--v2-radius);
    margin-bottom: 1rem;
}

.v2-alert.success { background: #d1fae5; color: #047857; border: 1px solid #a7f3d0; }
.v2-alert.danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.v2-alert.warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.v2-alert.info { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

/* ==========================================================================
   Stat Card (white bg version)
   ========================================================================== */

.v2-stat-card {
    background: #fff;
    border-radius: var(--v2-radius-lg);
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    text-align: center;
    transition: all 0.2s ease;
}

.v2-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.v2-stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.v2-stat-card .stat-title {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.v2-empty-state {
    padding: 60px 20px;
    text-align: center;
}

.v2-empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 16px;
    display: block;
}

.v2-empty-state p {
    color: var(--v2-text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* ==========================================================================
   Filter Pills
   ========================================================================== */

.v2-filter-btn {
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--v2-border);
    background: #fff;
    color: var(--v2-text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.v2-filter-btn:hover {
    border-color: var(--v2-primary);
    color: var(--v2-primary);
}

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

/* ==========================================================================
   Quick Actions
   ========================================================================== */

.v2-quick-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: #fff;
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    color: var(--v2-text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
}

.v2-quick-action:hover {
    border-color: var(--v2-primary);
    color: var(--v2-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    text-decoration: none;
}

.v2-quick-action .qa-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.v2-quick-action .qa-icon.blue { background: rgba(14, 165, 233, 0.1); color: var(--v2-primary); }
.v2-quick-action .qa-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--v2-success); }
.v2-quick-action .qa-icon.purple { background: rgba(139, 92, 246, 0.1); color: var(--v2-purple); }
.v2-quick-action .qa-icon.orange { background: rgba(245, 158, 11, 0.1); color: var(--v2-warning); }

/* ==========================================================================
   Deadline Items (v2)
   ========================================================================== */

.v2-deadline-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--v2-radius-sm);
    border: 1px solid #e5e7eb;
    margin-bottom: 0.4rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.v2-deadline-item:hover {
    background: var(--v2-bg-light);
    border-color: #d1d5db;
    transform: translateX(2px);
    color: inherit;
    text-decoration: none;
}

.v2-deadline-item.overdue {
    border-left: 3px solid var(--v2-danger);
    background: #fff5f5;
}

.v2-deadline-item.urgent {
    border-left: 3px solid #fd7e14;
    background: #fffbf0;
}

.v2-deadline-item.upcoming {
    border-left: 3px solid var(--v2-warning);
}

.v2-deadline-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--v2-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.v2-deadline-progress {
    height: 3px;
    border-radius: 2px;
    background: #e5e7eb;
    margin-top: 0.3rem;
    overflow: hidden;
}

.v2-deadline-progress-fill {
    height: 100%;
    border-radius: 2px;
}

/* ==========================================================================
   User Avatar
   ========================================================================== */

.v2-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.v2-pagination .page-link {
    border-radius: 8px;
    border: 1px solid var(--v2-border);
    color: var(--v2-text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    margin: 0 2px;
    transition: all 0.2s ease;
}

.v2-pagination .page-item.active .page-link {
    background: var(--v2-primary);
    border-color: var(--v2-primary);
    color: #fff;
}

.v2-pagination .page-link:hover {
    background: var(--v2-bg-light);
    border-color: var(--v2-primary);
    color: var(--v2-primary);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1199px) {
    .v2-hero-stats.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .v2-hero .row {
        flex-direction: column;
    }
    .v2-hero-title {
        font-size: 1.5rem;
    }
    .v2-hero-stats {
        margin-top: 1.25rem;
    }
    .v2-fields-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .v2-hero {
        padding: 1.75rem 1.25rem;
    }
    .v2-hero-stats {
        grid-template-columns: 1fr 1fr;
    }
    .v2-hero-stats.cols-3 {
        grid-template-columns: 1fr 1fr;
    }
    .v2-section-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .v2-hero-stats {
        grid-template-columns: 1fr;
    }
}
