/* =============================================================================
   VAULT PORTAL - MODERN DESIGN
   ============================================================================= */

/* Auth Pages (Login, Set Password, OTP) */
.vault-auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.vault-auth-page .auth-form-light {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.vault-auth-page .btn-primary {
    background: #667eea;
    border-color: #667eea;
}

.vault-auth-page .btn-primary:hover {
    background: #5568d3;
    border-color: #5568d3;
}

/* Portal Pages (Documents Dashboard) */
.vault-portal-page {
    background: #f5f7fa;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* =============================================================================
   TOP NAVIGATION BAR
   ============================================================================= */
.vault-topbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e9f2;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.vault-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo Section */
.vault-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vault-logo img {
    height: 100px;
    width: auto;
}

.vault-logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* Search Bar (Center) */
.vault-search {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.vault-search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.vault-search-input:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.vault-search-wrapper {
    position: relative;
}

.vault-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8898aa;
    font-size: 1rem;
}

/* Right Section - User Menu */
.vault-user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vault-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    background: transparent;
}

.vault-user-info:hover {
    background: #f8f9fa;
}

.vault-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.vault-user-name {
    font-size: 0.9375rem;
    color: #2c3e50;
    font-weight: 500;
}

.vault-logout-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid #e5e9f2;
    background: white;
    color: #6c757d;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vault-logout-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff5f5;
}

/* =============================================================================
   MAIN CONTENT AREA
   ============================================================================= */
.vault-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Page Header */
.vault-page-header {
    margin-bottom: 2rem;
}

.vault-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.vault-page-subtitle {
    font-size: 0.9375rem;
    color: #6c757d;
    margin: 0;
}

/* Stats Cards Row */
.vault-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.vault-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e9f2;
    transition: all 0.2s ease;
}

.vault-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.vault-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.vault-stat-icon.blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.vault-stat-icon.green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.vault-stat-icon.orange {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.vault-stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.vault-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

/* =============================================================================
   DOCUMENTS GRID
   ============================================================================= */
.vault-documents-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e9f2;
    padding: 2rem;
}

.vault-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.vault-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.vault-view-toggle {
    display: flex;
    gap: 0.5rem;
}

.vault-view-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e9f2;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
}

.vault-view-btn:hover,
.vault-view-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

.vault-document-card {
    background: white;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.vault-document-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: #667eea;
}

.vault-doc-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.vault-doc-icon-wrapper.pdf {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.vault-doc-icon-wrapper.image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.vault-doc-icon-wrapper.document {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.vault-doc-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vault-doc-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.vault-doc-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e5e9f2;
    color: #667eea;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

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

.vault-doc-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border: 1px solid #e5e9f2;
    background: white;
    color: #667eea;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.vault-doc-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.vault-doc-btn.danger:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* List View */
.vault-documents-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.vault-document-row {
    display: grid;
    grid-template-columns: 50px 1fr 150px 150px 200px;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e5e9f2;
    transition: background 0.2s ease;
}

.vault-document-row:hover {
    background: #f8f9fa;
}

.vault-document-row:last-child {
    border-bottom: none;
}

/* Empty State */
.vault-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.vault-empty-icon {
    font-size: 4rem;
    color: #e5e9f2;
    margin-bottom: 1rem;
}

.vault-empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.vault-empty-text {
    font-size: 0.9375rem;
    color: #6c757d;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */
@media (max-width: 768px) {
    .vault-topbar-inner {
        padding: 1rem;
    }

    .vault-search {
        display: none;
    }

    .vault-content {
        padding: 1rem;
    }

    .vault-documents-grid {
        grid-template-columns: 1fr;
    }

    .vault-document-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .vault-stats {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */
.vault-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.vault-badge.success {
    background: #d4edda;
    color: #155724;
}

.vault-badge.info {
    background: #d1ecf1;
    color: #0c5460;
}

.vault-badge.warning {
    background: #fff3cd;
    color: #856404;
}
