/**
 * edXtra Vault - Main Stylesheet
 * Professional & Formal Design
 */

/* Color Palette */
:root {
    --primary: #005df8;
    --primary-light: #e8f1ff;
    --primary-lighter: #ded5ff;
    --primary-dark: #001e50;
    --secondary: #0c61d7;
    --accent: #6d56ca;
    --accent-light: #977dff;
    --blue-light: #aaceff;
    --navy: #01163a;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-600: #6c757d;
    --gray-800: #343a40;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    font-size: 15px;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--gray-600);
    font-size: 14px;
}

.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-800);
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 93, 248, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--gray-600);
    font-size: 12px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-300);
}

.login-footer p {
    color: var(--gray-600);
    font-size: 13px;
}

/* Main Layout */
body:not(.login-page):not(.error-page) {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--navy) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 700;
}

.sidebar-header p {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.user-role {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 0 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background 0.2s ease;
    font-size: 14px;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: var(--primary);
    font-weight: 600;
}

.sidebar-nav hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 15px 10px;
}

.sidebar-footer {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    position: absolute;
    bottom: 0;
    width: 260px;
}

.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 30px;
    min-height: 100vh;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    color: var(--primary-dark);
    font-size: 28px;
    font-weight: 700;
}

.page-header p {
    color: var(--gray-600);
    font-size: 14px;
    margin-top: 4px;
}

/* Vault Toggle */
.vault-toggle {
    display: flex;
    gap: 10px;
}

.vault-btn {
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    text-decoration: none;
    color: var(--gray-800);
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vault-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 93, 248, 0.15);
}

.vault-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary);
    box-shadow: 0 2px 8px rgba(0, 93, 248, 0.2);
}

.btn-secondary {
    background: var(--gray-600);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--gray-800);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn .icon {
    margin-right: 6px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.btn-icon:hover {
    opacity: 0.7;
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    font-size: 36px;
    opacity: 0.9;
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--gray-600);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-active { border-left: 4px solid var(--success); }
.stat-warning { border-left: 4px solid var(--warning); }
.stat-expired { border-left: 4px solid var(--danger); }
.stat-size { border-left: 4px solid var(--info); }

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Content Sections */
.content-section {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.content-section h2 {
    color: var(--primary-dark);
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: var(--gray-100);
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-800);
    border-bottom: 2px solid var(--gray-300);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.data-table tbody tr:hover {
    background: var(--primary-light);
}

.data-table td small {
    color: var(--gray-600);
    font-size: 12px;
}

.data-table .actions {
    display: flex;
    gap: 8px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-800);
}

.expiry-badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.expiry-active {
    background: #d4edda;
    color: #155724;
}

.expiry-expiring_soon {
    background: #fff3cd;
    color: #856404;
}

.expiry-expired {
    background: #f8d7da;
    color: #721c24;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--gray-100);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: var(--primary-light);
}

.activity-icon {
    font-size: 24px;
}

.activity-content {
    flex: 1;
}

.activity-content strong {
    color: var(--primary-dark);
}

.activity-content small {
    color: var(--gray-600);
    font-size: 12px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* Filters */
.filters-section {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filters-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.required {
    color: var(--danger);
}

/* Upload */
.upload-container {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.upload-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--gray-200);
    border-radius: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: var(--gray-600);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-300);
}

.modal-header h2 {
    color: var(--primary-dark);
    font-size: 20px;
}

.modal-close {
    font-size: 32px;
    color: var(--gray-600);
    text-decoration: none;
    cursor: pointer;
}

.modal-form {
    padding: 24px;
}

/* Settings */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.settings-section {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.settings-section h2 {
    color: var(--primary-dark);
    font-size: 22px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

.settings-section h3 {
    color: var(--gray-800);
    font-size: 16px;
    margin: 24px 0 16px;
}

.test-email-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-300);
}

.test-email-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

/* Error Pages */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
}

.error-container {
    text-align: center;
    padding: 40px;
}

.error-container h1 {
    font-size: 120px;
    color: var(--primary);
    margin-bottom: 20px;
}

.error-container h2 {
    font-size: 32px;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.error-container p {
    color: var(--gray-600);
    margin-bottom: 30px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-form {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Grid View & File Viewer */
.view-toggle {
    display: flex;
    gap: 8px;
    background: var(--white);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-toggle-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-600);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-toggle-btn:hover {
    color: var(--primary);
}

.view-toggle-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* Files Grid View */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.file-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.file-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.file-icon {
    font-size: 64px;
    margin-bottom: 12px;
    color: var(--primary);
}

.file-icon.pdf { color: #dc3545; }
.file-icon.doc, .file-icon.docx { color: #2b579a; }
.file-icon.xls, .file-icon.xlsx { color: #217346; }
.file-icon.ppt, .file-icon.pptx { color: #d24726; }
.file-icon.zip, .file-icon.rar { color: #ffc107; }
.file-icon.jpg, .file-icon.jpeg, .file-icon.png, .file-icon.gif { color: #17a2b8; }
.file-icon.txt { color: #6c757d; }

.file-card-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
    font-size: 14px;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-card-meta {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.file-card-party {
    font-size: 12px;
    color: #6366f1;
    background: #f0f4ff;
    padding: 6px 10px;
    border-radius: 6px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.file-card-party i {
    color: #8b5cf6;
}

.file-card-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.file-card-actions a {
    padding: 6px 12px;
    background: var(--gray-100);
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 12px;
    transition: all 0.2s ease;
}

.file-card-actions a:hover {
    background: var(--primary);
    color: var(--white);
}

.file-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
}

/* ============================================
   FILE VIEWER - SaaS Professional Design
   ============================================ */

/* Main Container - Top-Bottom Layout */
.view-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
    max-width: 100%;
}

/* Card Base Styles - Modern SaaS Design */
.file-info-card,
.file-preview-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.1),
        0 1px 2px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.file-info-card:hover,
.file-preview-card:hover {
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Card Headers - Clean & Professional */
.file-info-card h2,
.file-preview-card h2 {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.file-info-card h2 i,
.file-preview-card h2 i {
    color: #6366f1;
    font-size: 16px;
}

.file-info-card h2 .header-title,
.file-preview-card h2 .header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* File Information Grid - Horizontal Layout */
.info-grid {
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.15s ease;
}

.info-item:hover {
    background-color: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
}

.info-item.full-width {
    grid-column: 1 / -1;
}

/* Labels - Modern Typography */
.info-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-label i {
    color: #6366f1;
    width: 12px;
    font-size: 12px;
    opacity: 0.8;
}

/* Values - Clear & Readable */
.info-value {
    color: #111827;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Vault Badges - Premium Design */
.vault-badge-edxtra {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    display: inline-block;
}

.vault-badge-personal {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
    display: inline-block;
}

/* Tag Badges - Subtle & Clean */
.tag-badge {
    display: inline-flex;
    align-items: center;
    background: #eff6ff;
    color: #1e40af;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 6px;
    margin-bottom: 6px;
    border: 1px solid #dbeafe;
    transition: all 0.15s ease;
}

.tag-badge:hover {
    background: #dbeafe;
    border-color: #bfdbfe;
}

/* Preview Container - Full Width Layout */
.preview-container {
    width: 100%;
    min-height: 800px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-top: 0;
}

/* Image Preview - Centered & Professional */
.preview-image {
    max-width: 100%;
    max-height: 1000px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

/* PDF & Office Document Viewer - Full Width */
.preview-pdf,
.preview-office {
    width: 100%;
    height: 1000px;
    border: none;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Preview Action Button */
.preview-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: #6366f1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.preview-action-btn:hover {
    background: #eff6ff;
    color: #4f46e5;
}

/* Text File Preview - Code-like Display */
.preview-text {
    width: 100%;
    max-height: 800px;
    overflow-y: auto;
    padding: 0;
    background: #1f2937;
    border-radius: 8px;
}

.preview-text pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #e5e7eb;
    padding: 24px;
    margin: 0;
    background: transparent;
}

/* No Preview State - Clean Empty State */
.no-preview {
    text-align: center;
    padding: 80px 40px;
    color: #6b7280;
}

.no-preview i {
    color: #d1d5db;
    margin-bottom: 24px;
    opacity: 0.6;
}

.no-preview h3 {
    color: #374151;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.no-preview p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.no-preview .file-ext {
    display: inline-block;
    font-weight: 700;
    color: #6366f1;
    font-size: 24px;
    margin: 20px 0;
    padding: 12px 24px;
    background: #eff6ff;
    border-radius: 8px;
    border: 2px solid #dbeafe;
}

.no-preview .btn {
    margin-top: 24px;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

/* File Preview Card Body */
.file-preview-card > .preview-container {
    margin: 0;
    min-height: 800px;
    border-radius: 0 0 16px 16px;
    border-top: none;
}

/* Expiry Badge in Info Panel - SaaS Style */
.expiry-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.expiry-badge.expiry-active {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.expiry-badge.expiry-expiring_soon {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.expiry-badge.expiry-expired {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Loading States */
.preview-container.loading {
    background: linear-gradient(
        90deg,
        #f3f4f6 0%,
        #e5e7eb 50%,
        #f3f4f6 100%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Design - Mobile First */
@media (max-width: 992px) {
    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
        padding: 20px;
    }
    
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .view-container {
        gap: 16px;
    }
    
    .file-info-card,
    .file-preview-card {
        border-radius: 12px;
    }
    
    .file-info-card h2,
    .file-preview-card h2 {
        padding: 16px 20px;
        font-size: 15px;
        flex-wrap: wrap;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 12px;
    }
    
    .info-item {
        padding: 12px;
    }
    
    .preview-container {
        min-height: 500px;
    }
    
    .preview-pdf,
    .preview-office {
        height: 600px;
    }
}

@media (max-width: 480px) {
    .info-label {
        font-size: 10px;
    }
    
    .info-value {
        font-size: 13px;
    }
    
    .vault-badge-edxtra,
    .vault-badge-personal {
        font-size: 10px;
        padding: 5px 10px;
    }
    
    .tag-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .preview-action-btn {
        font-size: 12px;
        padding: 5px 10px;
    }
}

