/* ==========================================
   SafeVault CSS stylesheet - Modern & Premium
   ========================================== */

/* Design Tokens & Variables */
:root {
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Theme-independent colors */
    --color-secure: #10b981;      /* Emerald Green */
    --color-secure-glow: rgba(16, 185, 129, 0.15);
    --color-primary: #6366f1;     /* Indigo */
    --color-primary-glow: rgba(99, 102, 241, 0.2);
    --color-warning: #f59e0b;     /* Amber */
    --color-danger: #ef4444;      /* Red */
    
    /* Dark Theme Variables (Default) */
    --bg-main: #0b0f17;
    --bg-card: rgba(17, 24, 39, 0.6);
    --bg-sidebar: #0f1322;
    --bg-input: rgba(31, 41, 55, 0.5);
    --bg-modal: rgba(15, 23, 42, 0.95);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-inverse: #111827;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --neon-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* Light Theme Variables */
.light-theme {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-sidebar: #f1f5f9;
    --bg-input: rgba(255, 255, 255, 0.8);
    --bg-modal: rgba(255, 255, 255, 0.98);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    --border-color: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(99, 102, 241, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.15);
    --neon-shadow: 0 0 20px rgba(99, 102, 241, 0.05);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    height: 100vh;
}

/* Layout Container */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    flex-shrink: 0;
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.logo-icon {
    background: linear-gradient(135deg, var(--color-primary), #4f46e5);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    background: linear-gradient(to right, var(--color-primary), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item i {
    width: 18px;
    height: 18px;
}

.nav-item:hover {
    color: var(--text-main);
    background-color: rgba(99, 102, 241, 0.08);
}

.nav-item.active {
    color: white;
    background: linear-gradient(135deg, var(--color-primary), #4f46e5);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-status-card {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    background-color: var(--color-secure);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.8s infinite;
}

.security-status-card h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-secure);
}

.security-status-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.logout-btn {
    border-radius: 10px !important;
    font-size: 0.85rem !important;
    padding: 0.65rem 1rem !important;
    margin-top: 0.25rem;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    background: radial-gradient(circle at 70% 10%, rgba(99, 102, 241, 0.05), transparent 60%);
}

/* Header Styling */
.main-header {
    height: 80px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(11, 15, 23, 0.2);
    backdrop-filter: blur(10px);
    z-index: 5;
    flex-shrink: 0;
}

.search-bar-container {
    position: relative;
    width: 400px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

#search-input {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

#search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
    background-color: rgba(31, 41, 55, 0.7);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background-color: var(--border-color);
    transform: scale(1.05);
}

/* Light-Dark toggle visibility */
.dark-theme .theme-toggle .sun-icon { display: block; }
.dark-theme .theme-toggle .moon-icon { display: none; }
.light-theme .theme-toggle .sun-icon { display: none; }
.light-theme .theme-toggle .moon-icon { display: block; }

.theme-toggle i {
    width: 18px;
    height: 18px;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 30px;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #4f46e5);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.btn-success {
    background: linear-gradient(135deg, var(--color-secure), #047857);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.btn-large {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    border-radius: 12px;
}

.btn-full {
    width: 100%;
}

/* Content Body */
.content-body {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Hero Section */
.dashboard-hero {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.3) 0%, rgba(17, 24, 39, 0.3) 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    box-shadow: var(--glass-shadow);
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    top: -50px;
    right: -50px;
    pointer-events: none;
}

.hero-text {
    max-width: 50%;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    background: linear-gradient(to right, #ffffff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.light-theme .hero-text h1 {
    background: linear-gradient(to right, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Stats Cards */
.stats-grid {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 180px;
    backdrop-filter: blur(10px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    width: 20px;
    height: 20px;
}

.utility-color {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
}

.secure-color {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-secure);
}

.dl-color {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Programs Section Header */
.programs-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.view-controls {
    display: flex;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active {
    background-color: var(--color-primary);
    color: white;
}

/* Programs Grid View */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Card Design - Glassmorphism */
.app-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--glass-shadow), var(--neon-shadow);
}

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

.app-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-badge i {
    width: 24px;
    height: 24px;
}

.security-badge {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-secure);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.35rem 0.6rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    letter-spacing: 0.2px;
}

.security-badge i {
    width: 12px;
    height: 12px;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.app-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.app-version-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.app-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    height: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.file-size {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

.download-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.download-count i {
    width: 12px;
    height: 12px;
}

.dl-btn {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--color-primary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dl-btn:hover {
    background-color: var(--color-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* LIST VIEW LAYOUT */
.programs-list-view {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.programs-list-view .app-card {
    flex-direction: row;
    align-items: center;
    padding: 0.85rem 1.5rem;
    gap: 1.5rem;
}

.programs-list-view .app-card:hover {
    transform: translateX(4px);
}

.programs-list-view .card-header {
    width: 30%;
    align-items: center;
    margin-bottom: 0;
}

.programs-list-view .app-description {
    width: 40%;
    height: auto;
    margin: 0;
    -webkit-line-clamp: 1;
}

.programs-list-view .card-footer {
    width: 25%;
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    justify-content: flex-end;
    gap: 1.5rem;
}

.programs-list-view .security-badge {
    margin-left: auto;
}

/* Modals Backend Structure */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 600px;
    max-width: 90vw;
    background-color: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-backdrop.active .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background-color: var(--border-color);
    color: var(--text-main);
}

.modal-header-detail {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.app-badge-large {
    width: 64px;
    height: 64px;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-badge-large i {
    width: 32px;
    height: 32px;
}

.modal-title-container {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.modal-category {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-primary);
    letter-spacing: 0.5px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
}

.modal-version {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.modal-body {
    overflow-y: auto;
    margin-bottom: 2rem;
}

.scrollable-form {
    padding-right: 8px;
}

/* Modal layout details */
.modal-info-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
}

@media (max-width: 580px) {
    .modal-info-grid {
        grid-template-columns: 1fr;
    }
}

.info-section h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.info-section p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.tag-badge {
    background-color: var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 30px;
}

.specs-section {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 16px;
}

.security-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.security-item i {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    margin-top: 2px;
}

.security-item.verified i {
    color: var(--color-secure);
}

.security-item strong {
    font-size: 0.8rem;
    display: block;
    color: var(--text-main);
}

.security-item p, .security-item a {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hash-code {
    font-family: monospace;
    background-color: var(--bg-input);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    word-break: break-all;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
}

.official-link {
    color: var(--color-primary) !important;
    text-decoration: none;
    font-weight: 500;
}

.official-link:hover {
    text-decoration: underline;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

/* Forms design inside modal */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

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

.form-group.full-width {
    grid-column: span 2;
}

@media (max-width: 480px) {
    .form-group {
        grid-column: span 2 !important;
    }
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input, .form-group select, .form-group textarea {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--color-primary);
}

.required {
    color: var(--color-danger);
}

/* Download Toast & Progress bar */
.download-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 320px;
    background-color: var(--bg-modal);
    border: 1px solid var(--color-primary);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(99, 102, 241, 0.2);
    z-index: 200;
    transform: translateY(150%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.download-toast.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-content {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.toast-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

.toast-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.toast-title {
    font-weight: 700;
    font-size: 0.9rem;
}

.toast-progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.toast-progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--color-primary);
    border-radius: 10px;
    transition: width 0.1s linear;
}

.toast-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* No results state */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    border: 1px dashed var(--border-color);
    border-radius: 20px;
}

.no-results-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.no-results h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================
   🔒 DDoS & Authentication Overlays Styling
   ========================================== */

.security-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #05070c;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.04) 0%, transparent 40%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* Glass card styling for overlays */
.card-glass {
    background: rgba(17, 24, 39, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.05);
}

.light-theme .card-glass {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 20px 50px rgba(148, 163, 184, 0.12);
}

/* DDoS Screen Container */
.ddos-container {
    width: 480px;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    animation: fadeInScale 0.4s ease-out;
}

.ddos-shield-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.35);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
    animation: pulseGlow 2s infinite;
}

.ddos-shield-icon i {
    width: 36px;
    height: 36px;
}

.ddos-container h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
}

.ddos-container p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* DDoS Verification Checklist */
.verification-steps {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0.5rem 0;
}

.step-item {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-color);
    display: inline-block;
}

.step-item.current {
    color: var(--text-main);
    font-weight: 500;
}

.step-item.current .step-dot {
    background-color: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary);
}

.step-item.verified {
    color: var(--color-secure);
}

.step-item.verified .step-dot {
    background-color: var(--color-secure);
    box-shadow: 0 0 8px var(--color-secure);
}

.ddos-loader {
    width: 100%;
    margin-top: 0.5rem;
}

.ddos-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.ddos-bar-running {
    animation: none;
}

.ddos-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--color-primary), var(--color-secure));
    border-radius: 10px;
    transition: width 0.1s linear;
}

.security-notice {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.security-notice i {
    width: 12px;
    height: 12px;
}

/* Login Screen Container */
.login-container {
    width: 440px;
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(99, 102, 241, 0.12);
    animation: fadeInScale 0.4s ease-out;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.login-container h3 {
    font-family: var(--font-heading);
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: -0.25rem;
    background: linear-gradient(to right, #ffffff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.light-theme .login-container h3 {
    background: linear-gradient(to right, #1e293b, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
    margin-top: -1.25rem;
    margin-bottom: 0.5rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.input-with-icon input {
    width: 100%;
    padding-left: 2.8rem !important;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-with-icon input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
    background-color: rgba(31, 41, 55, 0.7);
}

/* Password Toggle Styling */
.password-input-container input {
    padding-right: 3rem !important;
}

.password-toggle-btn {
    position: absolute;
    right: 0.85rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    z-index: 5;
    transition: all 0.2s ease;
}

.password-toggle-btn:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.05);
}

.light-theme .password-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Error details */
.error-container {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: shake 0.4s ease;
}

.light-theme .error-container {
    background-color: rgba(239, 68, 68, 0.05);
    color: #b91c1c;
}

.error-container i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Bruteforce lockout */
.lockout-container {
    background-color: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fde047;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.light-theme .lockout-container {
    background-color: rgba(245, 158, 11, 0.05);
    color: #b45309;
}

.lockout-container i {
    width: 18px;
    height: 18px;
    color: var(--color-warning);
    margin-top: 2px;
    flex-shrink: 0;
}

.lockout-container strong {
    font-weight: 600;
    display: block;
    margin-bottom: 0.15rem;
}

.lockout-container p {
    font-size: 0.8rem;
    opacity: 0.85;
}

/* Custom Animations */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 0 35px rgba(99, 102, 241, 0.45);
        border-color: rgba(99, 102, 241, 0.6);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

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

/* Neon Border Glow Utility */
.neon-border {
    border: 1px solid var(--border-hover);
    box-shadow: var(--neon-shadow);
}

/* Custom Scrollbar for modern looks */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        gap: 1rem;
    }
    .logo-area {
        margin-bottom: 0.5rem;
        justify-content: center;
    }
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
        justify-content: flex-start;
        gap: 0.5rem;
        scrollbar-width: none; /* Firefox */
    }
    .sidebar-nav::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    .nav-item {
        white-space: nowrap;
        padding: 0.6rem 0.85rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    .sidebar-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-top: 0.5rem;
        gap: 1rem;
    }
    .security-status-card {
        padding: 0.5rem 0.75rem;
        flex-grow: 1;
    }
    .logout-btn {
        margin-top: 0;
        width: auto;
        flex-shrink: 0;
    }
    .main-content {
        height: auto;
        overflow-y: visible;
    }
    .content-body {
        padding: 1.25rem;
        gap: 1.5rem;
    }
    .main-header {
        height: auto;
        padding: 1.25rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    .search-bar-container {
        width: 100%;
    }
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
    }
    .header-actions .btn {
        flex: 1;
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.65rem 1rem;
        white-space: nowrap;
    }
    .theme-toggle {
        flex-shrink: 0;
    }
    .dashboard-hero {
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem;
        gap: 1.5rem;
        text-align: center;
    }
    .hero-text {
        max-width: 100%;
    }
    .hero-text h1 {
        font-size: 1.8rem;
    }
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        width: 100%;
        gap: 0.75rem;
    }
    .stat-card {
        padding: 1rem;
        justify-content: center;
        min-width: unset;
    }
    .programs-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1rem;
    }
    
    /* Modal mobile optimization */
    .modal-content {
        padding: 1.5rem;
        width: 95%;
        border-radius: 20px;
        max-height: 95vh;
    }
    .modal-header-detail {
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
    }
    .modal-info-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .specs-section {
        padding: 1rem;
    }
    .modal-footer {
        padding-top: 1rem;
    }
}

@media (max-width: 500px) {
    .sidebar-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .security-status-card {
        width: 100%;
    }
    .logout-btn {
        width: 100%;
    }
    .programs-grid {
        grid-template-columns: 1fr;
    }
    .programs-list-view .app-card {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem;
        gap: 1rem;
    }
    .programs-list-view .card-header,
    .programs-list-view .app-description,
    .programs-list-view .card-footer {
        width: 100% !important;
        margin: 0 !important;
    }
    .programs-list-view .card-footer {
        justify-content: space-between !important;
        border-top: 1px solid var(--border-color);
        padding-top: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    .ddos-container, .login-container {
        width: 100%;
        padding: 2.25rem 1.25rem;
        margin: 0 10px;
        border-radius: 20px;
    }
    .login-container h3 {
        font-size: 1.45rem;
    }
}

/* ==========================================
   📂 File Upload Form Styles
   ========================================== */
.input-upload-group {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.input-upload-group input[type="url"] {
    flex-grow: 1;
}

.upload-btn-wrapper {
    position: relative;
    display: flex;
}

.upload-btn-wrapper button {
    border-radius: 10px !important;
    white-space: nowrap;
    padding: 0 1.25rem !important;
    font-size: 0.85rem !important;
}

.upload-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    margin-top: 0.5rem;
    animation: fadeInScale 0.3s ease;
    font-size: 0.85rem;
}

.upload-status-indicator.success {
    background-color: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--color-secure);
}

.upload-status-indicator.error {
    background-color: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
}

.upload-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

.upload-status-indicator.success .upload-spinner,
.upload-status-indicator.error .upload-spinner {
    display: none;
}
