/* style.css - Premium Glassmorphic Styling for Personal Vault */

:root {
    /* Color Palette */
    --bg-main: #0b0816;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-surface-dark: rgba(0, 0, 0, 0.4);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-color-glow: rgba(99, 102, 241, 0.4);
    
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --primary-hover: #4f46e5;
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.15);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Layout Details */
    --sidebar-width: 260px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --transition-speed: 0.3s;
    
    /* Fonts */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(239, 68, 68, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glassmorphism base helper */
.glass {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-dark {
    background: var(--bg-surface-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

/* Hover effects */
.hover-lift {
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow var(--transition-speed) ease,
                border-color var(--transition-speed) ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.15);
}

/* Buttons */
.btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    gap: 8px;
    justify-content: center;
    padding: 10px 20px;
    transition: all var(--transition-speed) ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    color: #fff;
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

.btn-danger-hover:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-glow);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: color var(--transition-speed) ease;
}
.btn-close:hover {
    color: var(--danger);
}

/* Form Styles */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    color: var(--text-secondary);
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input, 
.form-group select, 
.form-group textarea {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    padding: 12px 14px;
    transition: all var(--transition-speed) ease;
    width: 100%;
}
.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
    outline: none;
}

.form-row {
    display: flex;
    gap: 15px;
}
.flex-1 {
    flex: 1;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}
.password-input-wrapper input {
    padding-right: 48px;
}
.toggle-password {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    transition: color var(--transition-speed) ease;
    width: 44px;
}
.toggle-password:hover {
    color: var(--text-primary);
}

.btn-inside {
    background: var(--primary-glow);
    border: 1px solid var(--primary);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    height: 38px;
    padding: 0 12px;
    position: absolute;
    right: 5px;
    top: 5px;
    transition: all var(--transition-speed) ease;
}
.btn-inside:hover {
    background: var(--primary);
}

/* Helpers */
.hidden {
    display: none !important;
}

/* TOAST NOTIFICATIONS */
.toast {
    align-items: center;
    border-left: 4px solid var(--primary);
    bottom: 24px;
    display: flex;
    gap: 12px;
    max-width: 380px;
    padding: 16px 20px;
    position: fixed;
    right: 24px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    z-index: 2000;
    background: rgba(15, 12, 27, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}
.toast.hidden {
    opacity: 0;
    transform: translateY(100px);
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-danger { border-left-color: var(--danger); }

/* AUTHENTICATION VIEW */
.auth-container {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    max-width: 440px;
    padding: 40px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}
.logo-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
    color: #fff;
    display: inline-block;
    font-size: 2.2rem;
    height: 70px;
    line-height: 70px;
    margin-bottom: 16px;
    text-align: center;
    width: 70px;
}
.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 24px;
    text-align: center;
}
.auth-footer a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}
.auth-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.security-warning {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    padding: 14px;
}
.security-warning i {
    color: var(--warning);
    font-size: 1.2rem;
    margin-top: 2px;
}
.security-warning p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Password strength in register */
.password-strength-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}
.strength-bar {
    background: var(--border-color);
    border-radius: 2px;
    height: 4px;
    position: relative;
    transition: all var(--transition-speed) ease;
    width: 60%;
}
.strength-bar::after {
    content: '';
    border-radius: 2px;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    transition: all var(--transition-speed) ease;
    width: 0;
}
.strength-bar.weak::after { background: var(--danger); width: 33%; }
.strength-bar.medium::after { background: var(--warning); width: 66%; }
.strength-bar.strong::after { background: var(--success); width: 100%; }

.strength-text {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: right;
}

/* APP LAYOUT */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    border-radius: 0;
    border-bottom: none;
    border-left: none;
    border-top: none;
    display: flex;
    flex-direction: column;
    height: 100vh;
    left: 0;
    position: fixed;
    top: 0;
    width: var(--sidebar-width);
    z-index: 100;
}

.sidebar-brand {
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    height: 70px;
    padding: 0 24px;
}
.brand-logo {
    color: var(--primary);
    font-size: 1.5rem;
}
.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
}
.sidebar-nav ul {
    list-style: none;
}
.nav-item {
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    margin-bottom: 6px;
    transition: all var(--transition-speed) ease;
    position: relative;
}
.nav-item a {
    align-items: center;
    color: var(--text-secondary);
    display: flex;
    font-size: 0.95rem;
    font-weight: 500;
    gap: 14px;
    padding: 12px 16px;
    text-decoration: none;
}
.nav-item i {
    font-size: 1.1rem;
    width: 20px;
}
.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.05);
}
.nav-item:hover a, .nav-item.active a {
    color: var(--text-primary);
}
.nav-item.active::before {
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    content: '';
    height: 60%;
    left: 0;
    position: absolute;
    top: 20%;
    width: 4px;
}

.badge {
    background: var(--primary);
    border-radius: 10px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
}
.badge-warning { background: var(--warning); color: #000; }
#audit-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-footer {
    align-items: center;
    border-top: 1px solid var(--border-color);
    display: flex;
    height: 80px;
    justify-content: space-between;
    padding: 0 24px;
}
.user-profile {
    align-items: center;
    display: flex;
    gap: 12px;
}
.user-avatar {
    align-items: center;
    background: var(--primary-glow);
    border: 1px solid var(--primary);
    border-radius: 50%;
    color: var(--primary);
    display: flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}
.user-details {
    display: flex;
    flex-direction: column;
}
.user-details .username {
    font-size: 0.9rem;
    font-weight: 600;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-details .status {
    align-items: center;
    color: var(--success);
    display: flex;
    font-size: 0.75rem;
    gap: 4px;
}
.status-dot {
    font-size: 0.4rem;
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color var(--transition-speed) ease;
}
.btn-logout:hover {
    color: var(--danger);
}

/* Main Content Wrapper */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    width: calc(100% - var(--sidebar-width));
}

/* Top Bar */
.top-bar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 20px;
}
.search-wrapper {
    max-width: 400px;
    position: relative;
    width: 100%;
}
.search-wrapper input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    padding: 10px 14px 10px 40px;
    width: 100%;
    transition: all var(--transition-speed) ease;
}
.search-wrapper input:focus {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
    outline: none;
}
.search-icon {
    color: var(--text-muted);
    left: 15px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

/* View Headings */
.view-header {
    margin-bottom: 30px;
}
.view-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.view-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* DASHBOARD SUMMARY */
.dashboard-summary {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 30px;
}
.stat-card {
    align-items: center;
    display: flex;
    gap: 20px;
    padding: 24px;
}
.stat-icon {
    align-items: center;
    border-radius: var(--border-radius-sm);
    display: flex;
    height: 48px;
    justify-content: center;
    width: 48px;
    font-size: 1.3rem;
}
.bg-primary-glow { background: var(--primary-glow); color: var(--primary); border: 1px solid rgba(99, 102, 241, 0.2); }
.bg-warning-glow { background: var(--warning-glow); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.bg-danger-glow { background: var(--danger-glow); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.bg-success-glow { background: var(--success-glow); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }

.stat-info h3 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}
.stat-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Category Filter pills */
.filter-bar {
    align-items: center;
    display: flex;
    gap: 15px;
    margin-bottom: 24px;
}
.filter-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pill {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 16px;
    transition: all var(--transition-speed) ease;
}
.pill:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}
.pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Credentials Grid */
.credentials-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.credential-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.card-header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}
.card-title-block {
    display: flex;
    flex-direction: column;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.card-url {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-url:hover {
    color: var(--primary);
    text-decoration: underline;
}

.card-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    padding: 2px 6px;
}
.cat-Login { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.2); }
.cat-Social { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.cat-Finance { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.cat-Work { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.cat-Reference { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.2); }
.cat-Other { background: rgba(255, 255, 255, 0.08); color: #d1d5db; border: 1px solid rgba(255, 255, 255, 0.1); }

.card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.body-row {
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
}
.body-row-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.body-row-val {
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.body-row-val.masked {
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 2px;
}
.row-actions {
    display: flex;
    gap: 4px;
}
.btn-card-action {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    height: 28px;
    transition: color var(--transition-speed) ease;
    width: 28px;
}
.btn-card-action:hover {
    color: var(--text-primary);
}

.card-footer {
    align-items: center;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
}
.card-timestamp {
    color: var(--text-muted);
    font-size: 0.75rem;
}
.card-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-danger {
    color: var(--text-muted);
}
.btn-icon-danger:hover {
    color: var(--danger);
}
.btn-icon-primary:hover {
    color: var(--primary);
}

/* Empty/Placeholder States */
.empty-state {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}
.empty-icon {
    color: var(--text-muted);
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.4;
}
.empty-state h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 400px;
}

/* PASSWORD GENERATOR VIEW */
.generator-container {
    max-width: 600px;
    padding: 30px;
    width: 100%;
}
.generator-display {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    overflow: hidden;
    padding: 8px 8px 8px 18px;
}
.generator-display input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 1.25rem;
    outline: none;
    width: 80%;
}
.generator-actions {
    display: flex;
    gap: 6px;
}
.btn-gen-action {
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    height: 44px;
    justify-content: center;
    transition: all var(--transition-speed) ease;
    width: 44px;
}
.btn-gen-action:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--text-primary);
}

.strength-meter-container {
    margin-bottom: 24px;
}
.meter-bar-wrapper {
    background: var(--border-color);
    border-radius: 3px;
    height: 6px;
    margin-bottom: 8px;
    width: 100%;
}
.gen-strength-bar {
    border-radius: 3px;
    height: 100%;
    transition: all var(--transition-speed) ease;
    width: 0;
}
#gen-strength-bar.weak { background: var(--danger); width: 25%; }
#gen-strength-bar.fair { background: var(--warning); width: 50%; }
#gen-strength-bar.good { background: #3b82f6; width: 75%; }
#gen-strength-bar.strong { background: var(--success); width: 100%; }

.meter-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.option-row {
    margin-bottom: 20px;
}
.option-row label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
}

/* Custom styled Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    margin: 10px 0;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    transition: all 0.1s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Option Grid Checkboxes */
.option-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Custom Checkbox */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    color: var(--text-secondary);
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    top: 1px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all var(--transition-speed) ease;
}
.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.1);
}
.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}
.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* SECURITY AUDIT VIEW */
.audit-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr 2fr;
}
.audit-score-card {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 30px;
    text-align: center;
}
.radial-progress-wrapper {
    margin: 30px 0;
    position: relative;
    width: 160px;
    height: 160px;
}
.radial-progress {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}
.radial-progress circle {
    fill: none;
    stroke-width: 8;
}
.radial-progress circle.bg {
    stroke: rgba(255, 255, 255, 0.05);
}
.radial-progress circle.progress {
    stroke: var(--success);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-in-out;
}
.radial-text {
    align-items: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}
.radial-text span {
    font-size: 2.2rem;
    font-weight: 700;
}
.radial-text small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.audit-summary-note {
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.audit-issues-card {
    padding: 30px;
}
.audit-issues-card h3 {
    margin-bottom: 20px;
    font-size: 1.25rem;
}
.audit-lists {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.audit-section h4 {
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.audit-item-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.audit-item-list li {
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
}
.audit-item-info {
    display: flex;
    flex-direction: column;
}
.audit-item-name {
    font-weight: 600;
    font-size: 0.9rem;
}
.audit-item-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.empty-list-placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    border: 1px dashed var(--border-color) !important;
    background: transparent !important;
    justify-content: center !important;
    padding: 15px !important;
}

/* SETTINGS VIEW */
.settings-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.settings-grid .card {
    padding: 30px;
}
.settings-grid h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.settings-grid p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 24px;
}
.icon-accent {
    color: var(--primary);
}

.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.export-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.settings-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 10px 0;
}
.import-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.file-upload-label {
    margin-bottom: 0;
    width: 100%;
}
.file-name-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    word-break: break-all;
}

/* MODALS */
.modal {
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    height: 100%;
    justify-content: center;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: opacity var(--transition-speed) ease;
}
.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    max-width: 500px;
    padding: 30px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}
.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Notes Modal Detail Row */
.detail-row {
    margin-bottom: 15px;
    font-size: 0.95rem;
}
.detail-row strong {
    color: var(--text-secondary);
    display: inline-block;
    width: 100px;
}
.notes-display-box {
    margin-top: 8px;
    padding: 15px;
    min-height: 100px;
    max-height: 250px;
    overflow-y: auto;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    white-space: pre-wrap;
    line-height: 1.5;
}

/* Document spreadsheet table styles */
.doc-table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
}
.doc-table th {
    background: #110e22;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.doc-table td {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 12px 16px;
    transition: color 0.15s ease;
    word-break: break-word;
}
.doc-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}


/* Animation classes */
@keyframes pop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.animate-pop {
    animation: pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Responsive styles */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        height: auto;
        position: static;
        width: 100%;
    }
    .sidebar-footer {
        display: none;
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
        width: 100%;
    }
    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .audit-grid {
        grid-template-columns: 1fr;
    }
}

/* Multi-Factor Authentication Styles */
.mfa-info-box {
    text-align: center;
    padding: 18px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-color);
}
.mfa-info-box i {
    font-size: 2.2rem;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
    margin-bottom: 4px;
}
.mfa-info-box p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.key-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    width: 100%;
    margin-top: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}
.mfa-key-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1.5px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}
.btn-copy-key {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition-speed) ease;
}
.btn-copy-key:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
}
.mfa-code-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    width: 100%;
}
#mfa-code, #mfa-setup-code {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1.6rem !important;
    letter-spacing: 0.6rem !important;
    font-weight: 700;
    padding: 12px;
    text-align: center;
    width: 100%;
    outline: none;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}
#mfa-code:focus, #mfa-setup-code:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}
#mfa-code::placeholder, #mfa-setup-code::placeholder {
    letter-spacing: 0.6rem;
    color: var(--text-muted);
}

/* Floating MODAL style for View Excel Document */
#document-modal {
    background: transparent !important;
    pointer-events: none; /* Let clicks pass through outside the modal */
    align-items: flex-start;
    justify-content: flex-start;
    display: flex !important; /* Always display flex when active */
}
#document-modal.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}
#document-modal .modal-content {
    pointer-events: auto; /* Handle clicks inside the modal */
    position: fixed;
    top: 100px;
    right: 30px;
    width: 520px;
    max-width: calc(100vw - 60px);
    max-height: calc(100vh - 150px);
    margin: 0;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
}
#document-modal .modal-header {
    cursor: move; /* Draggable cursor */
    user-select: none;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
#document-modal .document-modal-body {
    flex: 1;
    overflow-y: auto;
}
#document-modal .modal-actions {
    margin-top: 15px !important;
}

.ref-spreadsheet-link:hover {
    color: var(--success) !important;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

