/* ==========================================
   SECUREVAULT - Premium Password Manager
   1Password-Inspired Modern Design
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    
    /* Accent Colors */
    --cyan: #00d4ff;
    --emerald: #10b981;
    --purple: #a855f7;
    --pink: #ec4899;
    --orange: #f97316;
    --blue: #3b82f6;
    
    /* Status Colors */
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Dark Theme */
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f14;
    --bg-tertiary: #16161d;
    --bg-card: rgba(22, 22, 29, 0.9);
    --bg-elevated: rgba(30, 30, 40, 0.95);
    --bg-hover: rgba(99, 102, 241, 0.1);
    
    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-bg: #0c0c10;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --text-link: var(--cyan);
    
    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(99, 102, 241, 0.5);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-cyan: linear-gradient(135deg, #00d4ff 0%, #6366f1 100%);
    --gradient-emerald: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-purple: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    --gradient-pink: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    --shadow-cyan: 0 0 30px rgba(0, 212, 255, 0.3);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Header */
    --header-height: 64px;
}

/* ==========================================
   RESET & BASE
   ========================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

::selection {
    background: var(--primary);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

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

/* ==========================================
   SIDEBAR LAYOUT
   ========================================== */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition-normal);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-cyan);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.25);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.sidebar-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.nav-section-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    margin-bottom: 0.25rem;
    position: relative;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.sidebar-link span {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-link:hover i {
    color: var(--cyan);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
    color: var(--text-primary);
    border-left: 3px solid var(--primary);
    margin-left: -3px;
}

.sidebar-link.active i {
    color: var(--primary);
}

.nav-badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-purple);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-info .user-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info .user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    color: var(--danger);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
}

/* ==========================================
   MAIN WRAPPER
   ========================================== */

.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Header */
.top-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    z-index: 100;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.mobile-menu-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.header-search {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.header-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.global-search {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

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

.global-search::placeholder {
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.header-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
}

/* ==========================================
   AUTH PAGES (Login/Register)
   ========================================== */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-box {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

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

.auth-footer a {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ==========================================
   FORMS
   ========================================== */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

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

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

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

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.btn-success {
    background: var(--gradient-emerald);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

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

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

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-info {
    background: var(--gradient-cyan);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ==========================================
   CARDS
   ========================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-normal);
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.card * {
    box-sizing: border-box;
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

/* ==========================================
   PAGE HEADER
   ========================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
    overflow: hidden;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.page-header h1 i {
    color: var(--cyan);
    flex-shrink: 0;
}

/* ==========================================
   PASSWORD CARDS (1Password Style)
   ========================================== */

.passwords-container {
    max-width: 100%;
    overflow: hidden;
}

.passwords-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
}

.password-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    cursor: pointer;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.password-card * {
    box-sizing: border-box;
}

.password-card:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.password-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.password-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.password-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.password-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.password-info p i {
    width: 14px;
    flex-shrink: 0;
}

.password-info a {
    color: var(--cyan);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.password-info a:hover {
    text-decoration: underline;
}

.password-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ==========================================
   SEARCH BOX
   ========================================== */

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.search-box i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 1;
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
    box-sizing: border-box;
}

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

.search-box input::placeholder {
    color: var(--text-muted);
}

/* ==========================================
   MODALS
   ========================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h2 i {
    color: var(--cyan);
}

.modal-close {
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

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

/* ==========================================
   PASSWORD INPUT GROUP
   ========================================== */

.password-input-group {
    display: flex;
    gap: 0.5rem;
}

.password-input-group input {
    flex: 1;
}

/* ==========================================
   VIEW PASSWORD DETAILS
   ========================================== */

.view-password-details .detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.view-password-details .detail-row:last-child {
    border-bottom: none;
}

.view-password-details label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-password-details span {
    font-size: 1rem;
    color: var(--text-primary);
    word-break: break-all;
}

.password-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.password-display span {
    font-family: 'Courier New', monospace;
    background: var(--bg-tertiary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
}

/* ==========================================
   ALERTS & NOTIFICATIONS
   ========================================== */

.alerts-container {
    margin-bottom: 1.5rem;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.alert-danger, .alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info);
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.alert-close:hover {
    opacity: 1;
}

/* Floating Notifications */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    z-index: 10002;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(120%);
    transition: var(--transition-normal);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.success i {
    color: var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification.error i {
    color: var(--danger);
}

/* ==========================================
   CENTERED POPUP TOAST (for important actions)
   ========================================== */

.center-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.center-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.center-popup {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.98), rgba(20, 20, 30, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 2rem 3rem;
    text-align: center;
    max-width: 90%;
    min-width: 280px;
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 100px rgba(99, 102, 241, 0.15);
}

.center-popup-overlay.show .center-popup {
    transform: scale(1) translateY(0);
}

.center-popup-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2rem;
}

.center-popup-icon.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.1));
    color: #22c55e;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.3);
    animation: pulseSuccess 2s infinite;
}

.center-popup-icon.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
    color: #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
}

.center-popup-icon.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1));
    color: #3b82f6;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.center-popup-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
    color: #f59e0b;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

.center-popup-icon.copied {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(124, 58, 237, 0.1));
    color: #a855f7;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.3);
}

.center-popup-icon.shared {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(6, 182, 212, 0.1));
    color: #00d4ff;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

@keyframes pulseSuccess {
    0%, 100% { box-shadow: 0 0 30px rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 50px rgba(34, 197, 94, 0.5); }
}

.center-popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.center-popup-message {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.center-popup-dismiss {
    margin-top: 1.5rem;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.center-popup-dismiss:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

/* Mobile responsive center popup */
@media (max-width: 480px) {
    .center-popup {
        padding: 1.5rem 2rem;
        min-width: 250px;
    }
    
    .center-popup-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
    
    .center-popup-title {
        font-size: 1.25rem;
    }
    
    .center-popup-message {
        font-size: 0.9rem;
    }
}

/* ==========================================
   UPLOAD PROGRESS OVERLAY
   ========================================== */

.upload-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.upload-progress-overlay.show {
    opacity: 1;
    visibility: visible;
}

.upload-progress-container {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.98), rgba(20, 20, 30, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 2.5rem 3rem;
    text-align: center;
    min-width: 350px;
    max-width: 90%;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 100px rgba(99, 102, 241, 0.2);
}

.upload-progress-overlay.show .upload-progress-container {
    transform: scale(1) translateY(0);
}

.upload-progress-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.1));
    color: #818cf8;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
    animation: uploadPulse 1.5s ease-in-out infinite;
}

.upload-progress-icon.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.1));
    color: #22c55e;
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.4);
    animation: none;
}

.upload-progress-icon.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
    color: #ef4444;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.4);
    animation: none;
}

@keyframes uploadPulse {
    0%, 100% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 60px rgba(99, 102, 241, 0.5);
        transform: scale(1.05);
    }
}

.upload-progress-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.upload-progress-filename {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: auto;
    margin-right: auto;
}

.upload-progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7, #00d4ff);
    background-size: 200% 100%;
    border-radius: 6px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressGradient 2s linear infinite;
    position: relative;
}

.upload-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 1.5s ease-in-out infinite;
}

@keyframes progressGradient {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

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

.upload-progress-percent {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.upload-progress-status {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.upload-progress-status.success {
    color: #22c55e;
}

.upload-progress-status.error {
    color: #ef4444;
}

/* Multiple files progress */
.upload-files-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.upload-file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.upload-file-item:last-child {
    margin-bottom: 0;
}

.upload-file-item i {
    font-size: 1.25rem;
    color: #6366f1;
}

.upload-file-item .file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

.upload-file-item .file-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.upload-file-item .file-status.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.upload-file-item .file-status.uploading {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.upload-file-item .file-status.done {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.upload-file-item .file-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Mobile responsive upload progress */
@media (max-width: 480px) {
    .upload-progress-container {
        min-width: 280px;
        padding: 2rem;
    }
    
    .upload-progress-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .upload-progress-title {
        font-size: 1.25rem;
    }
    
    .upload-progress-percent {
        font-size: 1.75rem;
    }
}

/* ==========================================
   EMPTY STATE
   ========================================== */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

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

.empty-state p {
    font-size: 1.1rem;
}

/* ==========================================
   LOADING
   ========================================== */

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.loading i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* ==========================================
   FILE CARDS
   ========================================== */

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.file-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-fast);
}

.file-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.file-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-cyan);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.file-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    word-break: break-all;
}

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

/* ==========================================
   KEY/DOCUMENT CARDS
   ========================================== */

.key-card, .document-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
}

.key-card:hover, .document-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.key-icon, .document-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-emerald);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.document-icon {
    background: var(--gradient-purple);
}

/* ==========================================
   AUTHENTICATOR
   ========================================== */

.totp-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.totp-code {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--cyan);
    letter-spacing: 0.5rem;
    margin: 1rem 0;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.totp-timer {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 1rem;
}

.totp-timer-bar {
    height: 100%;
    background: var(--gradient-cyan);
    transition: width 1s linear;
}

/* ==========================================
   ERROR MESSAGE
   ========================================== */

.error-message {
    text-align: center;
    padding: 2rem;
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
}

/* ==========================================
   UTILITIES
   ========================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-cyan { color: var(--cyan) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }

.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }

.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* ==========================================
   COMPREHENSIVE RESPONSIVE DESIGN
   Mobile-First Approach
   ========================================== */

/* Large Screens (1200px and below) */
@media (max-width: 1200px) {
    .main-content {
        padding: 1.75rem 1.5rem;
    }
}

/* Tablets and Medium Screens (992px and below) */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .notification-panel {
        width: 320px;
        right: 0.5rem;
    }
}

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        --sidebar-width: 280px;
    }
    
    .main-content {
        padding: 1.25rem 1rem;
        padding-bottom: 3rem;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.35rem;
    }
    
    .page-header > div {
        width: 100%;
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .page-header .btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
    
    .password-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .password-info {
        width: 100%;
    }
    
    .password-info h3 {
        white-space: normal;
    }
    
    .password-actions {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .modal-content {
        margin: 0.75rem;
        max-height: 95vh;
        padding: 1.25rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
        padding: 1rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .header-search {
        max-width: none;
        flex: 1;
    }
    
    .header-actions {
        display: flex;
        gap: 0.25rem;
        flex-shrink: 0;
    }
    
    .header-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .notification-panel {
        width: calc(100% - 2rem);
        right: 1rem;
        left: 1rem;
        max-height: calc(100vh - var(--header-height) - 2rem);
    }
    
    .glass-card {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }
    
    .sidebar-header {
        padding: 1.25rem;
    }
    
    .sidebar-footer {
        padding: 1rem;
    }
    
    .top-header {
        padding: 0 1rem;
        gap: 0.75rem;
    }
    
    .search-modal-content {
        width: 95%;
        max-width: 500px;
        margin: 1rem;
    }
    
    .search-modal-header {
        padding: 1rem;
    }
    
    .search-results {
        max-height: 50vh;
    }
    
    .search-footer {
        padding: 0.75rem 1rem;
        font-size: 0.7rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Small Mobile Devices (576px and below) */
@media (max-width: 576px) {
    .main-content {
        padding: 1rem 0.875rem;
    }
    
    .page-header h1 {
        font-size: 1.2rem;
    }
    
    .page-header h1 i {
        font-size: 1rem;
    }
    
    .auth-box {
        padding: 1.5rem;
        border-radius: var(--radius-md);
    }
    
    .glass-card {
        padding: 1rem;
    }
    
    .file-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .password-input-group {
        flex-direction: column;
    }
    
    .password-input-group .btn {
        width: 100%;
    }
    
    .top-header {
        padding: 0 0.75rem;
    }
    
    .header-search input {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem 0.5rem 2rem;
    }
    
    .mobile-menu-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        padding: 1rem;
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-body {
        max-height: calc(90vh - 150px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1.5rem;
    }
    
    .modal-footer {
        flex-wrap: wrap;
    }
    
    .modal-footer .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .form-group label {
        font-size: 0.8rem;
    }
    
    .form-control {
        padding: 0.65rem 0.875rem;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .btn {
        padding: 0.55rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .notification-panel {
        width: calc(100% - 1rem);
        right: 0.5rem;
        left: 0.5rem;
    }
    
    .notification-item {
        padding: 0.75rem;
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .notification-title {
        font-size: 0.8rem;
    }
    
    .notification-text {
        font-size: 0.7rem;
    }
}

/* Extra Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
    :root {
        --header-height: 52px;
    }
    
    .main-content {
        padding: 0.875rem 0.75rem;
    }
    
    .page-header h1 {
        font-size: 1.1rem;
        gap: 0.5rem;
    }
    
    .sidebar-logo {
        gap: 0.5rem;
    }
    
    .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .logo-title {
        font-size: 1rem;
    }
    
    .logo-subtitle {
        font-size: 0.6rem;
    }
    
    .sidebar-link {
        padding: 0.65rem 0.875rem;
    }
    
    .sidebar-link span {
        font-size: 0.85rem;
    }
    
    .glass-card {
        padding: 0.875rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .search-modal-content {
        width: calc(100% - 1rem);
        margin: 0.5rem;
    }
    
    .search-input-wrapper input {
        font-size: 0.9rem;
    }
}

/* Extra Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .main-content {
        padding: 0.75rem 0.5rem;
    }
    
    .page-header h1 {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .modal-content {
        margin: 0.25rem;
        padding: 0.875rem;
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: calc(95vh - 130px);
        padding: 1rem 0.75rem;
    }
    
    .modal-header {
        padding: 0.75rem;
    }
    
    .modal-footer {
        padding: 0.75rem;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* ==========================================
   NOTIFICATION PANEL
   ========================================== */

.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-panel {
    position: fixed;
    top: calc(var(--header-height) + 0.5rem);
    right: 1rem;
    width: 360px;
    max-height: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.notification-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.notification-panel-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.notification-panel-header h4 i {
    color: var(--cyan);
}

.clear-notifications {
    background: none;
    border: none;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.clear-notifications:hover {
    color: var(--danger);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    background: rgba(99, 102, 241, 0.05);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.notification-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notification-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.notification-icon.info {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.notification-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.notification-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.notification-empty i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--success);
    opacity: 0.5;
}

.notification-empty p {
    font-size: 0.9rem;
}

/* ==========================================
   GLOBAL SEARCH MODAL
   ========================================== */

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    width: 100%;
    max-width: 640px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), 0 0 60px rgba(99, 102, 241, 0.15);
    overflow: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: transform 0.2s ease;
}

.search-modal.active .search-modal-content {
    transform: translateY(0) scale(1);
}

.search-modal-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 0 1rem;
}

.search-input-wrapper i {
    color: var(--text-muted);
    font-size: 1rem;
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem 0;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.search-input-wrapper kbd {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: inherit;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.search-empty i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.search-category {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.search-result-item:hover {
    background: var(--bg-hover);
}

.search-result-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.search-result-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.search-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.search-footer span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.search-footer kbd {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 0.15rem 0.35rem;
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ==========================================
   PREMIUM MICRO-INTERACTIONS
   ========================================== */

/* Enhanced Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.btn:hover::before {
    transform: translateX(100%);
}

/* Pulse Animation for Important Elements */
@keyframes subtle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.notification-badge {
    animation: subtle-pulse 2s ease-in-out infinite;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.stat-icon {
    animation: float 3s ease-in-out infinite;
}

/* Enhanced Card Hover */
.password-card,
.doc-card,
.key-card,
.glass-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-card:hover,
.doc-card:hover,
.key-card:hover,
.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(99, 102, 241, 0.15);
}

/* Glow Effect on Focus */
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.15),
        0 0 20px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Skeleton Loading Animation */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, 
        var(--bg-secondary) 25%, 
        var(--bg-tertiary) 50%, 
        var(--bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

/* Icon Bounce on Hover */
.sidebar-link:hover i,
.btn:hover i,
.header-btn:hover i {
    animation: icon-bounce 0.4s ease;
}

@keyframes icon-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Success Checkmark Animation */
@keyframes checkmark-draw {
    0% { stroke-dashoffset: 50; }
    100% { stroke-dashoffset: 0; }
}

.success-checkmark {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: checkmark-draw 0.5s ease forwards;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-effect 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Enhanced Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    padding: 0.5rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Progress Bar Glow */
.progress-bar {
    box-shadow: 0 0 10px currentColor;
}

/* Enhanced Modal Backdrop Blur */
.modal {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Smooth Scroll Indicator */
.scroll-indicator {
    position: fixed;
    top: var(--header-height);
    left: var(--sidebar-width);
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform-origin: left;
    z-index: 100;
}

/* Enhanced Badge Styles */
.badge-premium {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.badge-new {
    background: linear-gradient(135deg, #22c55e, #10b981);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Glassmorphism Enhancement */
.glass-effect {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Animated Gradient Border */
.gradient-border {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, var(--primary), var(--cyan), var(--purple));
    background-size: 200% 200%;
    animation: gradient-rotate 3s ease infinite;
}

.gradient-border > * {
    background: var(--bg-card);
    border-radius: calc(var(--radius-lg) - 1px);
}

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

/* Keyboard Shortcut Indicator */
.shortcut-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: monospace;
    color: var(--text-muted);
    box-shadow: 0 2px 0 var(--border-color);
}

/* Status Indicator Dots */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.offline { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.status-dot.idle { background: var(--warning); box-shadow: 0 0 8px var(--warning); }

/* ==========================================
   GLOBAL OVERFLOW FIX - ALL CARDS
   ========================================== */

/* Ensure all card-like elements handle overflow properly */
.card,
.glass-card,
.password-card,
.stat-card,
.stat-box,
.alert-card,
.security-item,
.document-card,
.key-card,
.file-card,
.item-card,
.data-card,
.info-card,
.feature-card,
.action-card,
.dashboard-card,
.widget-card,
[class*="-card"] {
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Text truncation utilities */
.text-truncate,
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Container overflow control */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-x-auto { overflow-x: auto !important; overflow-y: hidden !important; }
.overflow-y-auto { overflow-y: auto !important; overflow-x: hidden !important; }

/* Flex item fix for truncation */
.flex-shrink-0 { flex-shrink: 0 !important; }
.flex-grow-0 { flex-grow: 0 !important; }
.min-w-0 { min-width: 0 !important; }

/* Grid items */
.grid > * {
    min-width: 0;
    overflow: hidden;
}

/* Fix for flex containers */
.flex-container,
[class*="flex"],
[class*="-grid"],
[class*="-list"] {
    min-width: 0;
}

/* Ensure icons don't shrink */
.icon,
[class*="-icon"],
[class*="icon-"],
i.fa,
i.fas,
i.far,
i.fab {
    flex-shrink: 0;
}

/* ==========================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================== */

/* Focus Visible for Keyboard Navigation */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .sidebar,
    .top-header,
    .sidebar-overlay,
    .mobile-menu-btn,
    .header-actions,
    .password-actions,
    .btn {
        display: none !important;
    }
    
    .main-wrapper {
        margin-left: 0 !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .password-card,
    .card,
    .glass-card {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}
