/*
 * VaultGuard Premium Glassmorphic Stylesheet
 */

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

:root {
    /* Color Tokens */
    --color-bg-deep: #07080c;
    --color-bg-space: #0f1118;
    --color-glass-panel: rgba(16, 18, 27, 0.65);
    --color-glass-border: rgba(255, 255, 255, 0.06);
    --color-glass-border-hover: rgba(255, 255, 255, 0.12);
    
    --grad-primary: linear-gradient(135deg, #06b6d4 0%, #0d9488 100%);
    --grad-primary-hover: linear-gradient(135deg, #22d3ee 0%, #0f766e 100%);
    --grad-accent: linear-gradient(135deg, #8b5cf6 0%, #4f46e5 100%);
    
    --color-text: #f3f4f6;
    --color-text-muted: #9ca3af;
    --color-text-dark: #6b7280;
    
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-quick: all 0.15s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-deep);
    background-image: 
        radial-gradient(at 10% 20%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.hidden {
    display: none !important;
}

/* Glassmorphism System */
.glass {
    background: var(--color-glass-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-glass-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Common UI Inputs and Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
    background: var(--grad-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn-accent {
    background: var(--grad-accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-glass-border-hover);
    color: var(--color-text);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-icon {
    padding: 8px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-glass-border);
    cursor: pointer;
    transition: var(--transition-quick);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.input-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.input-label {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 13px;
    color: var(--color-text-muted);
}

.input-field {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-glass-border);
    color: #fff;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.input-field:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

/* ----------------------------------------------------
 * SCREEN: Setup & Unlock Screen (Intro)
 * ---------------------------------------------------- */
.screen-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 40px;
    text-align: center;
}

.auth-logo {
    font-size: 48px;
    margin-bottom: 12px;
}

.auth-title {
    font-size: 28px;
    margin-bottom: 8px;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 30px;
}

.auth-error {
    color: var(--color-danger);
    font-size: 13px;
    margin-top: 12px;
    height: 18px;
}

/* ----------------------------------------------------
 * SCREEN: Main Dashboard Layout
 * ---------------------------------------------------- */
.dashboard-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Sidebar Panel */
.sidebar {
    width: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    border-left: none;
    background: rgba(10, 11, 18, 0.85);
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 24px;
    padding: 8px;
    border-radius: 10px;
    background: var(--grad-primary);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.logo-tag {
    font-size: 11px;
    color: #06b6d4;
    font-weight: 500;
}

.sidebar-menu {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 24px;
}

.menu-title {
    font-family: var(--font-heading);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-dark);
    margin-bottom: 12px;
    padding-left: 8px;
}

/* Category items in sidebar */
.category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: var(--transition-quick);
}

.category-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.category-row.active {
    background: rgba(6, 182, 212, 0.1);
    border-left: 3px solid #06b6d4;
    padding-left: 11px;
}

.category-name {
    font-weight: 500;
    font-size: 14px;
}

.category-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-muted);
}

.category-row.active .category-badge {
    background: #06b6d4;
    color: #000;
    font-weight: 600;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Main Dashboard Workspace */
.main-workspace {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    padding: 30px;
}

/* Workspace Header Actions */
.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.search-container {
    position: relative;
    max-width: 480px;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 15px;
}

.search-field {
    width: 100%;
    padding-left: 48px !important;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Filter Subtabs Website / Software / Cards */
.type-tabs-container {
    display: flex;
    border-bottom: 1px solid var(--color-glass-border);
    margin-bottom: 24px;
    gap: 8px;
}

.type-tab {
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: var(--transition-quick);
}

.type-tab:hover {
    color: var(--color-text);
}

.type-tab.active {
    color: #06b6d4;
}

.type-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #06b6d4;
}

.entries-count-row {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

/* Grid & Cards */
.entries-grid-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 8px;
}

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

.vault-card {
    padding: 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 180px;
    position: relative;
    overflow: hidden;
}

.vault-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-glass-border-hover);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    background: rgba(255, 255, 255, 0.02);
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.card-type-icon {
    font-size: 20px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--color-glass-border);
}

.card-meta {
    flex-grow: 1;
    min-width: 0;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-subtitle {
    display: none;
}

.card-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 1px 6px;
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
    border-radius: 20px;
    display: inline-block;
}

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-field {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.card-label {
    color: var(--color-text-muted);
    font-weight: 500;
}

.card-value {
    color: var(--color-text);
    font-weight: 400;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.03);
    padding-top: 10px;
}

/* Utilities */
.ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.italic { font-style: italic; }
.text-muted { color: var(--color-text-muted); }

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 6px;
}

.empty-state p {
    color: var(--color-text-muted);
    font-size: 14px;
}

/* ----------------------------------------------------
 * SCREEN: Sliding Side Details Drawer
 * ---------------------------------------------------- */
.side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    z-index: 100;
    background: rgba(12, 14, 22, 0.95);
    border-left: 1px solid var(--color-glass-border);
    border-radius: 0;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.side-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.drawer-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
}

.drawer-close:hover {
    color: #fff;
}

.drawer-meta-tags {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.drawer-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.badge-typology {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.badge-type {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.drawer-section-title {
    font-family: var(--font-heading);
    font-size: 12px;
    text-transform: uppercase;
    color: var(--color-text-dark);
    margin-bottom: 8px;
}

.drawer-field-container {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-glass-border);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 12px;
}

.drawer-field-container .drawer-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    padding: 8px 12px;
    outline: none;
}

.drawer-link {
    color: #06b6d4;
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 8px 12px;
}

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

.drawer-text {
    font-size: 14px;
    display: block;
    padding: 8px 12px;
}

.drawer-notes-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--color-glass-border);
    border-radius: 10px;
    padding: 15px;
    font-size: 13.5px;
    min-height: 80px;
    max-height: 180px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.drawer-time-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11.5px;
    color: var(--color-text-dark);
}

.drawer-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

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

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 30px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--color-text-muted);
    cursor: pointer;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    overflow-y: auto;
    flex-grow: 1;
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Custom form additions */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.suggested-typology-badge {
    display: none;
    font-size: 11px;
    padding: 3px 8px;
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border-radius: 4px;
    margin-top: 4px;
    align-self: flex-start;
}

.suggested-typology-badge.manual {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.btn-field-side {
    position: absolute;
    right: 8px;
    top: 31px;
    padding: 6px;
    font-size: 13px;
    height: 30px;
    width: 30px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--color-glass-border);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-field-side:hover {
    background: rgba(255,255,255,0.15);
}

.input-field-with-btn {
    padding-right: 48px;
}

/* ----------------------------------------------------
 * INTERFACE: Password Generator Settings
 * ---------------------------------------------------- */
.gen-result-container {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--color-glass-border);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 20px;
}

.gen-result-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    font-family: monospace;
    font-weight: 600;
    padding: 10px 14px;
    outline: none;
}

.strength-meter-container {
    margin-bottom: 24px;
}

.strength-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    margin-bottom: 6px;
}

.strength-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.gen-settings-title {
    font-family: var(--font-heading);
    font-size: 13px;
    text-transform: uppercase;
    color: var(--color-text-dark);
    margin-bottom: 12px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.slider-input {
    flex-grow: 1;
    -webkit-appearance: none;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 5px;
    outline: none;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #06b6d4;
    cursor: pointer;
    transition: var(--transition-quick);
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.gen-length-badge {
    font-size: 16px;
    font-weight: 700;
    color: #06b6d4;
    width: 30px;
    text-align: right;
}

.switch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.switch-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--color-glass-border);
    padding: 12px 16px;
    border-radius: 10px;
}

.switch-label {
    font-size: 13.5px;
    font-weight: 500;
}

.switch-input {
    width: 40px;
    height: 20px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.08);
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: var(--transition-quick);
}

.switch-input:checked {
    background: #0d9488;
}

.switch-input::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: var(--transition-quick);
}

.switch-input:checked::before {
    left: 23px;
}

/* ----------------------------------------------------
 * INTERFACE: Excel Spreadsheet Import Drag Zone
 * ---------------------------------------------------- */
.file-drag-zone {
    border: 2px dashed rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    margin-bottom: 20px;
}

.file-drag-zone:hover {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.02);
}

.drag-icon {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
}

.drag-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.drag-subtitle {
    color: var(--color-text-muted);
    font-size: 12.5px;
}

.hidden-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.progress-loader-box {
    text-align: center;
    padding: 15px 0;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid #06b6d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ----------------------------------------------------
 * NOTIFICATION: Animated Toast Alerts
 * ---------------------------------------------------- */
#notification-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
    width: 100%;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

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

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 13.5px;
    font-weight: 500;
}

.toast-success {
    border-left: 4px solid var(--color-success);
}
.toast-warning {
    border-left: 4px solid var(--color-warning);
}
.toast-error {
    border-left: 4px solid var(--color-danger);
}

/* ----------------------------------------------------
 * RESPONSIVE MOBILE ELEMENTS
 * ---------------------------------------------------- */
.btn-mobile-menu {
    display: none !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 140;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .btn-mobile-menu {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        z-index: 10;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        z-index: 150;
        transform: translateX(-100%);
        transition: var(--transition-smooth);
        border-radius: 0;
        border-right: 1px solid var(--color-glass-border);
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6);
        padding: 16px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header {
        margin-bottom: 16px;
    }

    .sidebar-menu {
        margin-bottom: 16px;
    }

    .sidebar-footer {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
        margin-top: auto;
    }

    .sidebar-footer .btn {
        width: 100% !important;
        margin-top: 0 !important;
        padding: 8px 4px !important;
        font-size: 12px !important;
        gap: 4px !important;
        height: 38px;
    }

    .sidebar-footer #btn-lock,
    .sidebar-footer #btn-open-family {
        grid-column: span 2;
    }
    
    .main-workspace {
        padding: 16px;
        height: 100vh;
        overflow-y: auto;
    }
    
    .workspace-header {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .btn-mobile-menu {
        grid-column: 1;
        grid-row: 1;
    }
    
    .header-actions {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    
    .search-container {
        grid-column: 1 / span 2;
        grid-row: 2;
        max-width: none;
        width: 100%;
    }
    
    .workspace-header #btn-add-entry {
        padding: 10px !important;
        min-width: 38px;
        min-height: 38px;
        border-radius: 10px;
        gap: 0 !important;
    }
    
    .workspace-header #btn-add-entry .btn-text {
        display: none;
    }
    
    .entries-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .vault-card {
        padding: 12px 16px;
        height: auto;
        min-height: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .vault-card .card-header {
        margin-bottom: 0;
        width: auto;
        flex-grow: 1;
        min-width: 0;
        align-items: center;
    }

    .vault-card .card-meta {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .card-subtitle {
        display: block;
        font-size: 12px;
        color: var(--color-text-muted);
        opacity: 0.85;
        max-width: 100%;
        font-weight: 400;
    }

    .vault-card .card-badge {
        display: none !important;
    }

    .vault-card .card-body {
        display: none !important;
    }

    .vault-card .card-btn-view {
        display: none !important;
    }

    .vault-card .card-footer {
        border-top: none;
        padding-top: 0;
        margin-top: 0;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .switch-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modal-content {
        max-width: 95%;
        padding: 20px;
        max-height: 90vh;
    }
    
    /* Make touch targets comfortable on small mobile screens */
    .btn-peek, .btn-copy-field, .btn-field-side {
        min-height: 38px;
        min-width: 38px;
    }
    
    /* Reposition dice generator inside input line on mobile */
    .input-field-with-btn {
        padding-right: 88px;
    }
    .btn-peek {
        right: 44px;
    }
}

@media (max-width: 576px) {
    /* Bottom Sheet sliding Drawer for Premium Mobile feel */
    .side-drawer {
        top: auto;
        bottom: 0;
        right: 0;
        width: 100vw;
        height: 82vh;
        transform: translateY(100%);
        border-left: none;
        border-top: 1px solid var(--color-glass-border);
        border-radius: 24px 24px 0 0;
        padding: 20px;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    }
    
    .side-drawer.open {
        transform: translateY(0);
        transform: translateX(0); /* Lock horizontal slide */
    }
    
    .drawer-header {
        margin-bottom: 16px;
    }
    
    .drawer-body {
        gap: 16px;
        margin-bottom: 16px;
    }
    
    .drawer-notes-box {
        min-height: 60px;
        max-height: 120px;
    }
    
    .drawer-footer {
        padding-bottom: 10px;
    }
}

@media (min-width: 769px) {
    /* Premium Desktop List View Mode */
    .entries-grid.list-view {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .entries-grid.list-view .vault-card {
        height: 72px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 24px;
        border-radius: 12px;
    }
    
    .entries-grid.list-view .vault-card:hover {
        transform: translateX(6px);
        background: rgba(255, 255, 255, 0.04);
        border-color: var(--color-glass-border-hover);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .entries-grid.list-view .card-header {
        margin-bottom: 0;
        width: 25%;
        flex-shrink: 0;
        align-items: center;
        gap: 12px;
    }
    
    .entries-grid.list-view .card-body {
        flex-direction: row;
        align-items: center;
        gap: 40px;
        flex-grow: 1;
        margin-top: 0;
    }
    
    .entries-grid.list-view .card-field {
        font-size: 13.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .entries-grid.list-view .card-field:nth-child(1) {
        width: 35%;
    }
    
    .entries-grid.list-view .card-field:nth-child(2) {
        width: 65%;
    }
    
    .entries-grid.list-view .card-footer {
        border-top: none;
        padding-top: 0;
        margin-top: 0;
        gap: 10px;
        flex-shrink: 0;
        margin-left: auto;
    }
}

/* ----------------------------------------------------
 * TYPOLOGY SWIMLANES & GROUP DIVIDERS
 * ---------------------------------------------------- */
.swimlane-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    margin-bottom: 16px;
    width: 100%;
    user-select: none;
    
    /* Premium Persistent Sticky Scroll */
    position: sticky;
    top: -16px; /* Offsets slightly to align beautifully with workspace top padding boundaries */
    z-index: 50;
    background: rgba(15, 17, 24, 0.9); /* Frosted glass matches workspace dark theme */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 16px;
    border-radius: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: background 0.3s ease;
}

/* Hide top margin if it's the very first element in the grid */
.entries-grid > .swimlane-header:first-child {
    margin-top: 4px;
}

.swimlane-icon {
    font-size: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-glass-border);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.swimlane-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.1em;
    opacity: 0.95;
}

.swimlane-count {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    background: rgba(6, 182, 212, 0.12);
    color: #22d3ee;
    border-radius: 12px;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.swimlane-divider {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    margin-left: 10px;
}

/* Drag and Drop Visual Feedback */
.category-row.dragging {
    opacity: 0.35;
    transform: scale(0.96);
    border: 1px dashed rgba(6, 182, 212, 0.4) !important;
}

.category-row.dragover {
    background: rgba(6, 182, 212, 0.1) !important;
    border-left: 3px solid #22d3ee !important;
    box-shadow: inset 0 0 10px rgba(6, 182, 212, 0.15);
}

.swimlane-header.dragging {
    opacity: 0.3;
    transform: scale(0.99);
}

.swimlane-header.dragover {
    background: rgba(6, 182, 212, 0.08) !important;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
    transform: translateY(-2px);
}

/* Premium Details Field Action Buttons */
.drawer-field-container button {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    margin-right: 4px;
    padding: 0 !important;
}

.drawer-field-container button:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(6, 182, 212, 0.3) !important;
    color: #22d3ee !important;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.drawer-field-container button:active {
    transform: scale(0.95);
}

/* Premium Family Members Management CSS Table & Buttons */
.premium-table th {
    color: var(--color-text-dark);
    font-family: var(--font-heading);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 10px;
}

.premium-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--color-text);
}

.premium-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.badge-role {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.badge-role-admin {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.badge-role-member {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
}

/* ----------------------------------------------------
 * SECURE PIN UNLOCK KEYPAD & DOTS STYLES
 * ---------------------------------------------------- */
.pin-dots-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 25px 0;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pin-dot.active {
    background: #22d3ee;
    border-color: #22d3ee;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.8);
    transform: scale(1.15);
}

.pin-dot.error {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
    transform: scale(1.15);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 280px;
    margin: 0 auto 20px auto;
}

.keypad-btn {
    height: 60px;
    width: 60px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 auto;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.keypad-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(6, 182, 212, 0.3);
    color: #22d3ee;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.keypad-btn:active {
    transform: scale(0.9);
    background: rgba(6, 182, 212, 0.15);
    border-color: #22d3ee;
}

.keypad-btn.btn-action {
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--color-text-muted);
}

.keypad-btn.btn-action:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    box-shadow: none;
    transform: none;
}

.keypad-btn.btn-action:active {
    transform: scale(0.9);
}

/* Vibrational shake animation for incorrect PIN entry */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.shake-animation {
    animation: shake 0.35s ease-in-out;
}

/* Virtual Credit Card 3D Flipping Styles */
.virtual-card.flipped {
    transform: rotateY(180deg) !important;
}

.virtual-card-side {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Premium CSS Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #a1a1aa;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .slider {
    background-color: #06b6d4;
    border-color: #22d3ee;
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(20px);
    background-color: white;
}

