/*
 * IRIS Modern Components
 * Ambertone Security - 2025
 * Modern UI components with glassmorphism and cybersecurity aesthetic
 */

/* ===== Modern Card Styles ===== */
.modern-card {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.95) 0%, rgba(20, 25, 38, 0.95) 100%);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 12px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(0, 217, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(0, 217, 255, 0.25);
    border-color: rgba(0, 217, 255, 0.4);
}

.modern-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
    background: linear-gradient(90deg, rgba(0, 217, 255, 0.05) 0%, transparent 100%);
}

.modern-card-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modern-card-body {
    padding: 24px;
}

/* ===== Modern Stat Cards ===== */
.stat-card {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.98) 0%, rgba(20, 25, 38, 0.98) 100%);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(0, 217, 255, 0.15);
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0ea5e9, #00d9ff, #5ce1e6);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 70px rgba(0, 217, 255, 0.3);
    border-color: rgba(0, 217, 255, 0.4);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-icon.primary {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(0, 217, 255, 0.2) 100%);
    color: #00d9ff;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.stat-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(34, 197, 94, 0.2) 100%);
    color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.stat-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(251, 191, 36, 0.2) 100%);
    color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.stat-icon.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
    color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-change {
    font-size: 0.875rem;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
}

.stat-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ===== Modern Buttons ===== */
.btn-modern {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-modern-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-modern-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-modern-success {
    background: linear-gradient(135deg, #10b981 0%, #22c55e 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-modern-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ===== Modern Form Controls ===== */
.form-control-modern {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ffffff;
    transition: all 0.3s ease;
}

.form-control-modern:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
    outline: none;
}

.form-control-modern::placeholder {
    color: #6b7280;
}

.form-group-modern label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #e5e7eb;
    margin-bottom: 8px;
    display: block;
}

/* ===== Modern Tables ===== */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-modern thead th {
    background: rgba(0, 217, 255, 0.05);
    color: #e5e7eb;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px;
    border: none;
}

.table-modern tbody tr {
    background: rgba(26, 31, 46, 0.6);
    transition: all 0.2s ease;
}

.table-modern tbody tr:hover {
    background: rgba(26, 31, 46, 0.9);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.table-modern tbody td {
    padding: 16px;
    border-top: 1px solid rgba(0, 217, 255, 0.05);
    border-bottom: 1px solid rgba(0, 217, 255, 0.05);
    color: #d1d5db;
}

.table-modern tbody tr td:first-child {
    border-left: 3px solid transparent;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    transition: border-color 0.2s ease;
}

.table-modern tbody tr:hover td:first-child {
    border-left-color: #00d9ff;
}

.table-modern tbody tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* ===== Modern Badges ===== */
.badge-modern {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-modern.badge-primary {
    background: rgba(14, 165, 233, 0.2);
    color: #00d9ff;
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.badge-modern.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-modern.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-modern.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-modern.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ===== Modern Alerts ===== */
.alert-modern {
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-modern.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #93c5fd;
}

.alert-modern.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #6ee7b7;
}

.alert-modern.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #fcd34d;
}

.alert-modern.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #fca5a5;
}

/* ===== Modern Progress Bars ===== */
.progress-modern {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-modern {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #00d9ff);
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== Modern Tabs ===== */
.nav-tabs-modern {
    border-bottom: 2px solid rgba(0, 217, 255, 0.1);
    gap: 8px;
}

.nav-tabs-modern .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #9ca3af;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-tabs-modern .nav-link:hover {
    color: #00d9ff;
    background: rgba(0, 217, 255, 0.05);
}

.nav-tabs-modern .nav-link.active {
    color: #00d9ff;
    border-bottom-color: #00d9ff;
    background: rgba(0, 217, 255, 0.1);
}

/* ===== Modern Dropdown ===== */
.dropdown-menu-modern {
    background: rgba(26, 31, 46, 0.98);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 8px;
}

.dropdown-item-modern {
    padding: 10px 16px;
    border-radius: 8px;
    color: #d1d5db;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item-modern:hover {
    background: rgba(0, 217, 255, 0.1);
    color: #00d9ff;
}

/* ===== Modern Modal Enhancements ===== */
.modal-content-modern {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.98) 0%, rgba(20, 25, 38, 0.98) 100%);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-header-modern {
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
    background: linear-gradient(90deg, rgba(0, 217, 255, 0.1) 0%, transparent 100%);
}

/* ===== Utility Classes ===== */
.cyber-glow {
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.4);
}

.cyber-text-glow {
    text-shadow: 0 0 15px rgba(0, 217, 255, 0.8);
    color: #00d9ff;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.text-gradient {
    background: linear-gradient(135deg, #0ea5e9 0%, #00d9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(135deg, #0ea5e9, #00d9ff);
}
