        /* CSS Version: 2025.01.16.1 - Heroicons Integration & Design Upgrade */

        /* ========================================
           HEROICONS UTILITY CLASSES
           ======================================== */

        /* Base icon styling - Heroicons outline style */
        .hero-icon {
            width: 20px;
            height: 20px;
            stroke: currentColor;
            stroke-width: 1.5;
            fill: none;
            flex-shrink: 0;
            display: inline-block;
            vertical-align: middle;
        }

        /* Icon sizes */
        .hero-icon-xs {
            width: 14px;
            height: 14px;
        }

        .hero-icon-sm {
            width: 16px;
            height: 16px;
        }

        .hero-icon-md {
            width: 20px;
            height: 20px;
        }

        .hero-icon-lg {
            width: 24px;
            height: 24px;
        }

        .hero-icon-xl {
            width: 32px;
            height: 32px;
        }

        /* Icon colors */
        .hero-icon-accent {
            color: var(--accent);
        }

        .hero-icon-success {
            color: var(--success);
        }

        .hero-icon-warning {
            color: var(--warning);
        }

        .hero-icon-danger {
            color: var(--danger);
        }

        .hero-icon-muted {
            color: var(--muted);
        }

        /* Button with icon alignment */
        .btn-icon-left {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn-icon-left .hero-icon {
            margin-right: 0;
        }

        .btn-icon-right {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn-icon-right .hero-icon {
            order: 1;
        }

        /* Icon-only button */
        .btn-icon-only {
            padding: 0.5rem;
            min-width: auto;
            width: 36px;
            height: 36px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .btn-icon-only .hero-icon {
            width: 18px;
            height: 18px;
        }

        /* Status indicators with icons */
        .status-indicator {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.85rem;
        }

        .status-indicator .hero-icon {
            width: 16px;
            height: 16px;
        }

        .status-indicator.success {
            color: var(--success);
        }

        .status-indicator.warning {
            color: var(--warning);
        }

        .status-indicator.error {
            color: var(--danger);
        }

        .status-indicator.info {
            color: var(--accent);
        }

        /* Card headers with icons */
        .card-header-icon {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .card-header-icon .hero-icon {
            color: var(--accent);
        }

        /* Section titles with icons */
        .section-title-icon {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .section-title-icon .hero-icon {
            color: var(--accent);
            width: 20px;
            height: 20px;
        }

        /* Navigation items with icons */
        .nav-item-icon {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .nav-item-icon .hero-icon {
            width: 18px;
            height: 18px;
            opacity: 0.8;
        }

        .nav-item-icon:hover .hero-icon,
        .nav-item-icon.active .hero-icon {
            opacity: 1;
        }

        /* Empty state icons */
        .empty-state-icon {
            width: 48px;
            height: 48px;
            color: var(--muted);
            opacity: 0.5;
            margin-bottom: 1rem;
        }

        /* Loading spinner replacement */
        .loading-icon {
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        /* ========================================
           END HEROICONS UTILITIES
           ======================================== */
        .admin-container {
            max-width: 1200px;
        }

        .admin-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
        }

        .nav-links {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
        }

        .nav-links a {
            color: var(--muted);
            text-decoration: none;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            transition: all 0.2s;
            font-size: 0.875rem;
            border: 1px solid transparent;
        }

        .nav-links a:hover {
            background: rgba(255, 255, 255, 0.03);
            border-color: var(--line);
            color: var(--text);
        }

        .nav-links a.active {
            background: rgba(94, 234, 212, 0.15);
            border-color: rgba(94, 234, 212, 0.4);
            color: #d0fff8;
            font-weight: 500;
        }

        .filter-bar {
            display: flex;
            gap: 1rem;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }

        .filter-bar select {
            width: auto;
            min-width: 150px;
        }

        .stats-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .stat-card {
            background: var(--bg-card);
            border-radius: 8px;
            padding: 1.25rem;
            text-align: center;
            border: 1px solid var(--line);
        }

        .stat-number {
            font-size: 2rem;
            font-weight: 700;
            color: var(--accent);
        }

        .stat-label {
            font-size: 0.85rem;
            color: var(--muted);
            margin-top: 0.25rem;
        }

        /* Dashboard Widgets */
        .dashboard-widgets {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .widget {
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 1.25rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            transition: all 0.2s;
        }

        .widget:hover {
            border-color: var(--accent);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .widget-pending-actions {
            cursor: pointer;
        }

        .widget-awaiting-response {
            cursor: pointer;
        }

        .widget-icon {
            width: 3rem;
            height: 3rem;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .widget-pending-actions .widget-icon {
            background: rgba(245, 158, 11, 0.1);
        }

        .widget-pending-actions .widget-icon svg {
            stroke: #f59e0b;
            width: 1.5rem;
            height: 1.5rem;
        }

        .widget-this-month .widget-icon {
            background: rgba(59, 130, 246, 0.1);
        }

        .widget-this-month .widget-icon svg {
            stroke: #3b82f6;
            width: 1.5rem;
            height: 1.5rem;
        }

        .widget-awaiting-response .widget-icon {
            background: rgba(139, 92, 246, 0.1);
        }

        .widget-awaiting-response .widget-icon svg {
            stroke: #8b5cf6;
            width: 1.5rem;
            height: 1.5rem;
        }

        .widget-content {
            flex: 1;
        }

        .widget-number {
            font-size: 1.75rem;
            font-weight: 700;
            color: var(--text);
            line-height: 1;
        }

        .widget-label {
            font-size: 0.85rem;
            color: var(--muted);
            margin-top: 0.25rem;
        }

        /* Company Cards Grid - Compact */
        .company-cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 1rem;
            align-items: start;
        }

        /* Company Card - Compact */
        .company-card {
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 1rem;
            transition: all 0.2s ease;
            cursor: pointer;
            height: fit-content;
        }

        .company-card:hover {
            border-color: var(--accent);
            background: rgba(94, 234, 212, 0.03);
        }

        /* Card Content */
        .company-card-content {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .company-card h3 {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text);
            margin: 0;
            line-height: 1.3;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .company-card-stats {
            display: flex;
            gap: 1.25rem;
        }

        .card-stat {
            display: flex;
            flex-direction: column;
            gap: 0.125rem;
        }

        .card-stat-label {
            font-size: 0.65rem;
            color: var(--muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .card-stat-value {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text);
        }

        .card-stat-value.accent {
            color: var(--accent);
        }

        .card-stat-value.warning {
            color: #fbbf24;
        }

        .card-stat-value.danger {
            color: var(--danger);
        }

        .card-stat-days {
            display: block;
            font-size: 0.7rem;
            color: var(--muted);
            margin-top: 0.25rem;
        }

        .card-stat-days.warning {
            color: #fbbf24;
        }

        .card-stat-days.danger {
            color: var(--danger);
        }

        /* Company View Page */
        .view-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--line);
        }

        .view-actions-left {
            display: flex;
            gap: 0.75rem;
            align-items: center;
        }

        .view-actions {
            display: flex;
            gap: 0.75rem;
            align-items: center;
        }

        .company-header-section {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 2rem;
        }

        .company-header-left {
            flex: 1;
        }

        .company-title {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .company-title .trading-name {
            font-size: 1rem;
            font-weight: 400;
            color: var(--muted);
            margin-left: 0.5rem;
        }

        .company-title .trading-name em {
            color: var(--accent);
            font-style: italic;
        }

        .company-title .trading-name em.empty {
            color: var(--muted);
        }

        .company-title .btn-edit-contact {
            background: none;
            border: none;
            cursor: pointer;
            padding: 0.25rem;
            margin-left: 0.5rem;
            opacity: 0.6;
            transition: opacity 0.2s;
        }

        .company-title .btn-edit-contact:hover {
            opacity: 1;
        }

        .trading-name-card {
            font-size: 0.75rem;
            font-weight: 400;
            color: var(--accent);
            font-style: italic;
        }

        .company-addresses {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            margin: 1rem 0;
        }

        .address-item {
            background: rgba(255,255,255,0.02);
            padding: 0.75rem;
            border-radius: 8px;
            border: 1px solid var(--line);
        }

        .address-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }

        .address-label {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--accent);
        }

        .address-value {
            color: var(--muted);
            font-size: 0.9rem;
            line-height: 1.4;
        }

        .btn-edit-small {
            background: none;
            border: none;
            color: var(--muted);
            cursor: pointer;
            font-size: 1rem;
            padding: 0.25rem;
            opacity: 0.6;
            transition: opacity 0.2s ease;
        }

        .btn-edit-small:hover {
            opacity: 1;
        }

        .company-header-right {
            text-align: right;
            flex-shrink: 0;
        }

        .company-meta-item {
            margin-bottom: 0.35rem;
            font-size: 0.85rem;
        }

        .company-meta-item .meta-label {
            color: var(--muted);
            margin-right: 0.5rem;
        }

        .company-meta-item .meta-value {
            color: var(--text);
            font-weight: 500;
        }

        /* Company Contact Info */
        .company-contact-row {
            display: flex;
            gap: 1.5rem;
            align-items: center;
            margin-top: 0.75rem;
            flex-wrap: wrap;
        }

        .contact-item {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.85rem;
            color: var(--muted);
        }

        .contact-item .icon {
            font-size: 0.9rem;
        }

        .contact-item .value {
            color: var(--text);
        }

        .contact-item .value.empty {
            color: var(--muted);
            font-style: italic;
        }

        .contact-item a {
            color: var(--accent);
            text-decoration: none;
        }

        .contact-item a:hover {
            text-decoration: underline;
        }

        .company-description-row {
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
            margin-top: 0.75rem;
            font-size: 0.85rem;
            color: var(--muted);
        }

        .company-description-row .icon {
            font-size: 0.9rem;
            flex-shrink: 0;
        }

        .company-description-row .description-text {
            color: var(--text);
            line-height: 1.4;
        }

        .company-description-row .description-text.empty {
            color: var(--muted);
            font-style: italic;
        }

        .btn-edit-contact {
            background: none;
            border: none;
            color: var(--muted);
            cursor: pointer;
            padding: 0.25rem;
            font-size: 0.85rem;
            opacity: 0.7;
            transition: opacity 0.2s, color 0.2s;
        }

        .btn-edit-contact:hover {
            opacity: 1;
            color: var(--accent);
        }

        /* Contact Edit Modal */
        .contact-modal {
            width: 380px;
        }

        .contact-modal .form-group {
            margin-bottom: 1rem;
        }

        .contact-modal label {
            display: block;
            margin-bottom: 0.35rem;
            font-size: 0.85rem;
            color: var(--muted);
        }

        .contact-modal input {
            width: 100%;
            padding: 0.6rem 0.75rem;
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 6px;
            color: var(--text);
            font-size: 0.9rem;
        }

        .contact-modal input:focus {
            outline: none;
            border-color: var(--accent);
        }

        /* Officer Card Editable Fields */
        .officer-item {
            position: relative;
        }

        .officer-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.5rem;
        }

        .officer-edit-btn {
            background: none;
            border: none;
            color: var(--muted);
            cursor: pointer;
            padding: 0.25rem;
            font-size: 0.85rem;
            opacity: 0.7;
            transition: all 0.2s;
        }

        .officer-edit-btn:hover {
            color: var(--accent);
            opacity: 1;
        }

        .officer-fields {
            margin-top: 0.75rem;
            padding-top: 0.75rem;
            border-top: 1px solid var(--line);
        }

        .officer-field {
            display: grid;
            grid-template-columns: 70px 1fr;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
            font-size: 0.8rem;
            align-items: start;
        }

        .officer-field-label {
            color: var(--muted);
            white-space: nowrap;
        }

        .officer-field-value {
            color: var(--text);
            text-align: right;
            word-break: break-word;
        }

        .officer-field-value.empty {
            color: var(--muted);
            font-style: italic;
        }

        /* Officer Edit Modal */
        .officer-edit-form {
            display: grid;
            gap: 0.75rem;
        }

        .officer-edit-form .form-group {
            margin-bottom: 0;
        }

        .officer-edit-form label {
            display: block;
            font-size: 0.8rem;
            color: var(--muted);
            margin-bottom: 0.35rem;
        }

        .officer-edit-form input {
            width: 100%;
            padding: 0.6rem 0.75rem;
            font-size: 0.875rem;
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 6px;
            color: var(--text);
        }

        .officer-edit-form input:focus {
            outline: none;
            border-color: var(--accent);
        }

        .detail-section {
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 1.25rem;
            margin-bottom: 1rem;
        }

        .detail-section h3 {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--text);
        }

        /* Company Name Header (above tabs) */
        .company-name-header {
            background: var(--bg-card);
            padding: 0.75rem 1.25rem;
            border: 1px solid var(--line);
            border-bottom: none;
            border-radius: 10px 10px 0 0;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .company-name-text {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text);
        }

        .company-trading-name {
            font-size: 0.9rem;
            color: var(--accent);
            font-style: italic;
        }

        /* Company View Tabs */
        .company-tabs {
            display: flex;
            gap: 0;
            margin-bottom: 1.5rem;
            border-bottom: 2px solid var(--line);
            background: var(--bg-card);
            border-radius: 0;
            border-left: 1px solid var(--line);
            border-right: 1px solid var(--line);
            overflow: hidden;
        }

        .company-tab {
            flex: 1;
            padding: 1rem 1.5rem;
            background: transparent;
            border: none;
            color: var(--muted);
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            border-bottom: 3px solid transparent;
            margin-bottom: -2px;
        }

        .company-tab:hover {
            background: rgba(255, 255, 255, 0.05);
            color: var(--text);
        }

        .company-tab.active {
            color: var(--accent);
            border-bottom-color: var(--accent);
            background: rgba(251, 191, 36, 0.05);
        }

        .company-tab svg {
            width: 18px;
            height: 18px;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        /* Vault Styles */
        .vault-container {
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 1.5rem;
        }

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

        .vault-header h3 {
            margin: 0;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .vault-warning {
            background: rgba(251, 191, 36, 0.1);
            border: 1px solid rgba(251, 191, 36, 0.3);
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
        }

        .vault-warning-icon {
            color: var(--accent);
            flex-shrink: 0;
        }

        .vault-warning-text {
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        .vault-items {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .vault-item {
            background: var(--bg-input);
            border: 1px solid var(--line);
            border-radius: 8px;
            padding: 1rem;
        }

        .vault-item-header {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

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

        .vault-item-icon {
            width: 40px;
            height: 40px;
            background: rgba(251, 191, 36, 0.1);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            flex-shrink: 0;
        }

        .vault-item-name {
            font-weight: 600;
            color: var(--text);
            font-size: 0.95rem;
            margin-bottom: 0.25rem;
        }

        .vault-item-meta {
            font-size: 0.8rem;
            color: var(--muted);
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .vault-item-meta a {
            color: var(--accent);
            text-decoration: none;
        }

        .vault-item-meta a:hover {
            text-decoration: underline;
        }

        .vault-item-actions {
            display: flex;
            gap: 0.5rem;
            flex-shrink: 0;
        }

        .vault-btn {
            background: transparent;
            border: 1px solid var(--line);
            border-radius: 6px;
            padding: 0.5rem;
            cursor: pointer;
            color: var(--text-secondary);
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .vault-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
        }

        .vault-btn-delete:hover {
            border-color: #ef4444;
            color: #ef4444;
        }

        .vault-item-secret {
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid var(--line);
        }

        .vault-secret-label {
            font-size: 0.75rem;
            color: var(--muted);
            text-transform: uppercase;
            margin-bottom: 0.5rem;
        }

        .vault-secret-value {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            background: rgba(0, 0, 0, 0.2);
            padding: 0.75rem 1rem;
            border-radius: 6px;
            font-family: monospace;
        }

        .vault-secret-value code {
            flex: 1;
            color: var(--accent);
            word-break: break-all;
        }

        .vault-copy-btn {
            background: transparent;
            border: none;
            padding: 0.25rem;
            cursor: pointer;
            color: var(--muted);
            transition: color 0.2s;
        }

        .vault-copy-btn:hover {
            color: var(--accent);
        }

        .vault-item-notes {
            margin-top: 0.75rem;
            padding-top: 0.75rem;
            border-top: 1px dashed var(--line);
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        /* Vault Modal Styles */
        .vault-modal {
            max-width: 500px;
        }

        .password-input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .password-input-wrapper input {
            flex: 1;
            padding-right: 3rem;
        }

        .toggle-password {
            position: absolute;
            right: 0.75rem;
            background: transparent;
            border: none;
            padding: 0.5rem;
            cursor: pointer;
            color: var(--muted);
            transition: color 0.2s;
        }

        .toggle-password:hover {
            color: var(--accent);
        }

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

        .vault-empty svg {
            width: 48px;
            height: 48px;
            margin-bottom: 1rem;
            opacity: 0.5;
        }

        /* Vault Type Selector Styles */
        .vault-type-selector-modal {
            max-width: 800px;
        }

        .vault-type-subtitle {
            color: var(--muted);
            margin-bottom: 1.5rem;
            font-size: 0.9rem;
        }

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

        .vault-type-card {
            display: flex;
            align-items: flex-start;
            gap: 1rem;
            padding: 1rem;
            background: var(--bg-input);
            border: 2px solid var(--line);
            border-radius: 12px;
            cursor: pointer;
            text-align: left;
            transition: all 0.2s ease;
            width: 100%;
        }

        .vault-type-card:hover {
            border-color: var(--accent);
            background: rgba(94, 234, 212, 0.05);
            transform: translateY(-2px);
        }

        .vault-type-icon {
            width: 48px;
            height: 48px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            flex-shrink: 0;
        }

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

        .vault-type-name {
            font-weight: 600;
            color: var(--text);
            margin-bottom: 0.25rem;
            font-size: 0.95rem;
        }

        .vault-type-desc {
            font-size: 0.8rem;
            color: var(--muted);
            line-height: 1.4;
        }

        /* Vault Modal Enhancements */
        .modal-header-with-back {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .vault-back-btn {
            background: transparent;
            border: 1px solid var(--line);
            color: var(--text);
            width: 36px;
            height: 36px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .vault-back-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
        }

        .vault-modal-subtitle {
            font-size: 0.8rem;
            color: var(--muted);
            margin-top: 0.25rem;
        }

        .vault-field-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
        }

        .vault-field-row .form-group {
            margin-bottom: 0;
        }

        .sensitive-label {
            display: inline-block;
            font-size: 0.65rem;
            background: rgba(239, 68, 68, 0.15);
            color: #f87171;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            margin-left: 0.5rem;
            text-transform: uppercase;
        }

        /* Vault Fields Grid - Revealed Secret Display */
        .vault-fields-grid {
            display: grid;
            gap: 0.75rem;
            padding: 0.5rem 0;
        }

        .vault-field-item {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
            padding: 0.75rem;
            background: var(--bg-input);
            border-radius: 8px;
            border: 1px solid var(--line);
        }

        .vault-field-item.sensitive {
            border-color: rgba(239, 68, 68, 0.3);
            background: rgba(239, 68, 68, 0.05);
        }

        .vault-field-label {
            font-size: 0.7rem;
            color: var(--muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 500;
        }

        .vault-field-value {
            font-size: 0.95rem;
            color: var(--text);
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            word-break: break-all;
            white-space: pre-wrap;
        }

        .vault-field-item.sensitive .vault-field-label::after {
            content: 'SENSITIVE';
            margin-left: 0.5rem;
            font-size: 0.55rem;
            background: rgba(239, 68, 68, 0.2);
            color: #f87171;
            padding: 0.1rem 0.35rem;
            border-radius: 3px;
        }

        @media (max-width: 600px) {
            .vault-type-grid {
                grid-template-columns: 1fr;
            }
            .vault-field-row {
                grid-template-columns: 1fr;
            }
        }

        /* PDF Forms Styles */
        .forms-container {
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 1.5rem;
        }

        .forms-header h3 {
            margin: 0;
            color: var(--text);
            font-size: 1.25rem;
        }

        .forms-subtitle {
            color: var(--muted);
            font-size: 0.85rem;
            margin-top: 0.25rem;
        }

        .form-section {
            margin-top: 1.5rem;
            padding-top: 1.5rem;
            border-top: 1px solid var(--line);
        }

        .form-section:first-of-type {
            margin-top: 1rem;
            padding-top: 0;
            border-top: none;
        }

        .form-section h4 {
            margin: 0 0 1rem 0;
            font-size: 1rem;
            color: var(--text);
        }

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

        .template-card {
            background: var(--bg-input);
            border: 2px solid var(--line);
            border-radius: 10px;
            padding: 1.25rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .template-card:hover {
            border-color: var(--accent);
            background: rgba(94, 234, 212, 0.05);
        }

        .template-card.selected {
            border-color: var(--accent);
            background: rgba(94, 234, 212, 0.1);
        }

        .template-card-provider {
            font-size: 0.75rem;
            color: var(--accent);
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .template-card-name {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text);
            margin-top: 0.5rem;
        }

        .template-card-type {
            display: inline-block;
            margin-top: 0.75rem;
            padding: 0.25rem 0.75rem;
            background: rgba(94, 234, 212, 0.15);
            color: var(--accent);
            border-radius: 12px;
            font-size: 0.7rem;
            text-transform: uppercase;
        }

        /* Preview Section */
        .preview-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .preview-header h4 {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .preview-stats {
            display: flex;
            gap: 0.75rem;
        }

        .preview-stats .stat {
            padding: 0.25rem 0.75rem;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .preview-stats .stat.filled {
            background: rgba(34, 197, 94, 0.2);
            color: #4ade80;
        }

        .preview-stats .stat.missing {
            background: rgba(251, 191, 36, 0.2);
            color: #fbbf24;
        }

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

        .preview-content {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
            margin-top: 1.5rem;
        }

        @media (max-width: 768px) {
            .preview-content {
                grid-template-columns: 1fr;
            }
        }

        .preview-column {
            background: var(--bg-input);
            border-radius: 8px;
            padding: 1rem;
        }

        .column-header {
            margin: 0 0 1rem 0;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--line);
            font-size: 0.9rem;
        }

        .column-header.filled-header {
            color: #4ade80;
        }

        .column-header.missing-header {
            color: #fbbf24;
        }

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

        .field-item {
            padding: 0.5rem;
            border-radius: 6px;
            margin-bottom: 0.5rem;
            background: rgba(255, 255, 255, 0.03);
        }

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

        .field-item-section {
            font-size: 0.65rem;
            color: var(--muted);
            text-transform: uppercase;
            margin-bottom: 0.25rem;
        }

        .field-item-name {
            font-size: 0.85rem;
            color: var(--text);
            font-weight: 500;
        }

        .field-item-value {
            font-size: 0.8rem;
            color: var(--accent);
            margin-top: 0.25rem;
            font-family: monospace;
            word-break: break-all;
        }

        .field-item.missing {
            border-left: 3px solid #fbbf24;
        }

        .field-item.filled {
            border-left: 3px solid #4ade80;
        }

        /* Filled Forms History */
        .filled-forms-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .filled-form-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem;
            background: var(--bg-input);
            border: 1px solid var(--line);
            border-radius: 8px;
        }

        .filled-form-info {
            flex: 1;
        }

        .filled-form-name {
            font-weight: 600;
            color: var(--text);
        }

        .filled-form-meta {
            font-size: 0.8rem;
            color: var(--muted);
            margin-top: 0.25rem;
        }

        .filled-form-stats {
            display: flex;
            gap: 0.5rem;
            margin-left: 1rem;
        }

        .filled-form-status {
            padding: 0.25rem 0.75rem;
            border-radius: 12px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
        }

        .filled-form-status.draft { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
        .filled-form-status.ready { background: rgba(94, 234, 212, 0.2); color: var(--accent); }
        .filled-form-status.complete { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
        .filled-form-status.submitted { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
        .filled-form-status.approved { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
        .filled-form-status.rejected { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

        .empty-message {
            color: var(--muted);
            font-style: italic;
            text-align: center;
            padding: 2rem;
        }

        /* Editable Form Styles */
        .editable-form-container {
            margin-top: 1.5rem;
        }

        .form-section-group {
            background: var(--bg-input);
            border: 1px solid var(--line);
            border-radius: 10px;
            margin-bottom: 1.5rem;
            overflow: hidden;
        }

        .form-section-header {
            background: rgba(94, 234, 212, 0.1);
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--line);
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
        }

        .form-section-header:hover {
            background: rgba(94, 234, 212, 0.15);
        }

        .form-section-title {
            font-weight: 600;
            color: var(--text);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .form-section-stats {
            display: flex;
            gap: 0.5rem;
            font-size: 0.75rem;
        }

        .form-section-stats .filled-badge {
            background: rgba(34, 197, 94, 0.2);
            color: #4ade80;
            padding: 0.25rem 0.5rem;
            border-radius: 8px;
        }

        .form-section-stats .missing-badge {
            background: rgba(251, 191, 36, 0.2);
            color: #fbbf24;
            padding: 0.25rem 0.5rem;
            border-radius: 8px;
        }

        .form-section-body {
            padding: 1.25rem;
        }

        .form-section-body.collapsed {
            display: none;
        }

        .form-field-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .form-field-row:last-child {
            margin-bottom: 0;
        }

        .form-field {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .form-field label {
            font-size: 0.8rem;
            color: var(--muted);
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .form-field label .field-status {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }

        .form-field label .field-status.filled {
            background: #4ade80;
        }

        .form-field label .field-status.missing {
            background: #fbbf24;
        }

        .form-field input,
        .form-field select,
        .form-field textarea {
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 6px;
            padding: 0.625rem 0.875rem;
            font-size: 0.9rem;
            color: var(--text);
            transition: all 0.2s;
        }

        .form-field input:focus,
        .form-field select:focus,
        .form-field textarea:focus {
            border-color: var(--accent);
            outline: none;
            box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.15);
        }

        .form-field input.auto-filled,
        .form-field select.auto-filled,
        .form-field textarea.auto-filled {
            border-color: rgba(34, 197, 94, 0.4);
            background: rgba(34, 197, 94, 0.05);
        }

        .form-field input.missing-value,
        .form-field select.missing-value,
        .form-field textarea.missing-value {
            border-color: rgba(251, 191, 36, 0.4);
            background: rgba(251, 191, 36, 0.05);
        }

        .form-field textarea {
            min-height: 80px;
            resize: vertical;
        }

        .form-field .field-hint {
            font-size: 0.7rem;
            color: var(--muted);
            font-style: italic;
        }

        /* Individual section for officers/shareholders */
        .individual-section {
            background: rgba(255, 255, 255, 0.02);
            border: 1px dashed var(--line);
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1rem;
        }

        .individual-section:last-child {
            margin-bottom: 0;
        }

        .individual-header {
            font-weight: 600;
            color: var(--accent);
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--line);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .individual-role {
            font-size: 0.75rem;
            background: rgba(94, 234, 212, 0.15);
            color: var(--accent);
            padding: 0.25rem 0.5rem;
            border-radius: 6px;
        }

        /* Checkbox group for titles, roles */
        .checkbox-group {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
        }

        .checkbox-item {
            display: flex;
            align-items: center;
            gap: 0.375rem;
        }

        .checkbox-item input[type="checkbox"],
        .checkbox-item input[type="radio"] {
            width: 16px;
            height: 16px;
            accent-color: var(--accent);
        }

        .checkbox-item label {
            font-size: 0.85rem;
            color: var(--text);
            cursor: pointer;
        }

        /* Collapse toggle icon */
        .collapse-icon {
            transition: transform 0.2s;
        }

        .collapse-icon.collapsed {
            transform: rotate(-90deg);
        }

        /* Application Styles */
        .app-container {
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 1.5rem;
        }

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

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

        .app-card {
            background: var(--bg-input);
            border: 1px solid var(--line);
            border-radius: 8px;
            padding: 1.25rem;
        }

        .app-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 1rem;
        }

        .app-card-title {
            font-weight: 600;
            color: var(--text);
        }

        .app-status {
            padding: 0.25rem 0.75rem;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 500;
            text-transform: uppercase;
        }

        .app-status.draft { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
        .app-status.pending { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
        .app-status.submitted { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
        .app-status.under_review { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
        .app-status.approved { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
        .app-status.rejected { background: rgba(239, 68, 68, 0.2); color: #f87171; }
        .app-status.cancelled { background: rgba(107, 114, 128, 0.2); color: #6b7280; }

        .app-card-meta {
            font-size: 0.8rem;
            color: var(--muted);
            margin-bottom: 1rem;
        }

        .app-type {
            font-weight: 600;
            color: var(--text);
        }

        .app-card-body {
            font-size: 0.875rem;
            color: var(--text-secondary);
        }

        .app-card-body > div {
            margin-bottom: 0.5rem;
        }

        .app-card-body .app-notes {
            font-style: italic;
            color: var(--muted);
            margin-top: 0.75rem;
        }

        .app-card-actions {
            display: flex;
            gap: 0.5rem;
            padding-top: 1rem;
            margin-top: 1rem;
            border-top: 1px solid var(--line);
            align-items: center;
        }

        .app-status-select {
            flex: 1;
            background: var(--bg);
            border: 1px solid var(--line);
            color: var(--text);
            padding: 0.4rem 0.6rem;
            border-radius: 6px;
            font-size: 0.8rem;
            cursor: pointer;
        }

        .app-status-select:hover {
            border-color: var(--accent);
        }

        .app-btn {
            background: transparent;
            border: 1px solid var(--line);
            border-radius: 6px;
            padding: 0.4rem 0.6rem;
            cursor: pointer;
            color: var(--text-secondary);
            transition: all 0.2s;
        }

        .app-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
        }

        .app-btn-delete:hover {
            border-color: #ef4444;
            color: #ef4444;
        }

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

        /* Application Modal Styles */
        .application-modal {
            max-width: 500px;
        }

        .company-card-issues {
            background: #1f2937;
            border-radius: 10px;
            padding: 0.75rem;
            margin-top: 0.75rem;
            min-height: 50px;
        }

        .issue-line {
            display: flex;
            align-items: center;
            padding: 0.3rem 0;
            font-size: 0.75rem;
            color: #fbbf24;
        }

        .issue-line::before {
            content: "⚠";
            margin-right: 0.5rem;
            font-size: 0.7rem;
        }

        .no-issues {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            min-height: 35px;
            font-size: 0.75rem;
            color: #22c55e;
        }

        .no-issues::before {
            content: "✓";
            margin-right: 0.5rem;
        }

        .card-referral {
            display: block;
            font-size: 0.7rem;
            color: var(--accent);
            margin-top: 0.25rem;
            font-weight: 500;
        }

        .card-view-btn {
            margin-top: 0.75rem;
            float: right;
        }

        .status-select {
            flex: 1;
            min-width: 150px;
            background: var(--bg);
            border: 1px solid var(--line);
            color: var(--text);
            padding: 0.5rem 0.75rem;
            border-radius: 6px;
            font-size: 0.875rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .status-select:hover {
            border-color: var(--accent);
        }

        .status-select:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.1);
        }

        /* Buttons - KYC Style (soft fill, solid border) */
        .btn-sm {
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
            border-radius: 8px;
            font-weight: 500;
            transition: all 0.2s;
            cursor: pointer;
        }

        .btn-sm.btn-primary {
            background: rgba(94, 234, 212, 0.15);
            color: #d0fff8;
            border: 1px solid rgba(94, 234, 212, 0.4);
        }

        .btn-sm.btn-primary:hover {
            background: rgba(94, 234, 212, 0.25);
        }

        .btn-sm.btn-secondary {
            background: rgba(255, 255, 255, 0.03);
            color: var(--text);
            border: 1px solid var(--line);
        }

        .btn-sm.btn-secondary:hover {
            background: rgba(255, 255, 255, 0.06);
        }

        .btn-danger {
            background: rgba(251, 113, 133, 0.1);
            color: var(--danger);
            border: 1px solid rgba(251, 113, 133, 0.4);
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
            border-radius: 8px;
            font-weight: 500;
            transition: all 0.2s;
            cursor: pointer;
        }

        .btn-danger:hover {
            background: rgba(251, 113, 133, 0.2);
        }

        .btn-small {
            padding: 0.35rem 0.75rem;
            font-size: 0.75rem;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.06);
            color: var(--text);
            border: 1px solid var(--line);
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-small:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .btn-small.btn-primary {
            background: rgba(99, 102, 241, 0.2);
            color: #818cf8;
            border-color: rgba(99, 102, 241, 0.4);
        }

        .btn-small.btn-primary:hover {
            background: rgba(99, 102, 241, 0.3);
        }

        .btn-small.btn-danger {
            background: rgba(251, 113, 133, 0.1);
            color: var(--danger);
            border-color: rgba(251, 113, 133, 0.4);
        }

        .btn-small.btn-danger:hover {
            background: rgba(251, 113, 133, 0.25);
        }

        .btn-small.btn-accent {
            background: rgba(94, 234, 212, 0.2);
            color: var(--accent);
            border-color: rgba(94, 234, 212, 0.4);
        }

        .btn-small.btn-accent:hover {
            background: rgba(94, 234, 212, 0.3);
        }

        .btn-small.btn-send {
            background: rgba(34, 197, 94, 0.2);
            color: #4ade80;
            border-color: rgba(34, 197, 94, 0.4);
            font-weight: 600;
        }

        .btn-small.btn-send:hover {
            background: rgba(34, 197, 94, 0.3);
        }

        .documents-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 1rem;
            margin-top: 1rem;
        }

        .doc-card {
            background: var(--bg);
            border-radius: 8px;
            padding: 1rem;
            text-align: center;
            cursor: pointer;
            border: 1px solid var(--line);
            transition: all 0.2s ease;
        }

        .doc-card:hover {
            border-color: var(--accent);
            box-shadow: 0 4px 12px rgba(94, 234, 212, 0.1);
        }

        .doc-icon {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        .doc-icon.pdf { color: #f44336; }
        .doc-icon.image { color: #4caf50; }

        .doc-category {
            font-size: 0.8rem;
            color: var(--muted);
            margin-bottom: 0.25rem;
        }

        .doc-name {
            font-size: 0.85rem;
            word-break: break-word;
            color: var(--text);
        }

        /* Document ID Fields */
        .doc-id-info {
            margin-top: 0.5rem;
            padding-top: 0.5rem;
            border-top: 1px solid var(--line);
            font-size: 0.75rem;
            text-align: left;
        }

        .doc-id-info .id-field {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.25rem;
        }

        .doc-id-info .id-label {
            color: var(--muted);
        }

        .doc-id-info .id-value {
            color: var(--text);
            font-weight: 500;
        }

        .doc-id-info .id-value.empty {
            color: var(--muted);
            font-style: italic;
            font-weight: normal;
        }

        .doc-id-info .id-value.expired {
            color: var(--danger);
        }

        .doc-edit-btn {
            display: block;
            margin-top: 0.5rem;
            padding: 0.35rem 0.5rem;
            font-size: 0.7rem;
            background: rgba(94, 234, 212, 0.1);
            border: 1px solid rgba(94, 234, 212, 0.3);
            border-radius: 4px;
            color: var(--accent);
            cursor: pointer;
            transition: all 0.2s;
        }

        .doc-edit-btn:hover {
            background: rgba(94, 234, 212, 0.2);
        }

        /* Document Edit Modal */
        .doc-edit-form {
            display: grid;
            gap: 0.75rem;
        }

        .doc-edit-form .form-group {
            margin-bottom: 0;
        }

        .doc-edit-form label {
            display: block;
            font-size: 0.8rem;
            color: var(--muted);
            margin-bottom: 0.35rem;
        }

        .doc-edit-form input,
        .doc-edit-form select {
            width: 100%;
            padding: 0.6rem 0.75rem;
            font-size: 0.875rem;
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 6px;
            color: var(--text);
        }

        .doc-edit-form input:focus,
        .doc-edit-form select:focus {
            outline: none;
            border-color: var(--accent);
        }

        /* Upload Zone in Admin */
        .upload-zone {
            border: 2px dashed var(--line);
            border-radius: 12px;
            padding: 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-bottom: 1rem;
        }

        .upload-zone:hover,
        .upload-zone.dragover {
            border-color: var(--accent);
            background: rgba(94, 234, 212, 0.05);
        }

        .upload-zone-content {
            color: var(--muted);
        }

        .upload-icon-svg {
            width: 48px;
            height: 48px;
            margin-bottom: 1rem;
            opacity: 0.5;
        }

        .upload-zone-text {
            margin-bottom: 0.5rem;
        }

        .upload-browse {
            color: var(--accent);
            cursor: pointer;
        }

        .upload-zone-hint {
            font-size: 0.8rem;
            color: var(--muted);
        }

        /* File Preview List */
        .file-preview-list h4 {
            margin-bottom: 0.75rem;
            font-size: 0.9rem;
            color: var(--text);
        }

        .file-preview-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 8px;
            margin-bottom: 0.5rem;
        }

        .file-preview-item.uploading {
            opacity: 0.6;
            pointer-events: none;
        }

        .file-preview-thumb {
            width: 48px;
            height: 48px;
            border-radius: 6px;
            overflow: hidden;
            flex-shrink: 0;
            background: var(--bg-card);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .file-preview-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .file-preview-pdf {
            font-size: 0.7rem;
            font-weight: 600;
            color: #f44336;
        }

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

        .file-preview-name {
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .file-preview-size {
            font-size: 0.75rem;
            color: var(--muted);
            margin-bottom: 0.25rem;
        }

        .file-preview-category {
            width: 100%;
            padding: 0.35rem 0.5rem;
            font-size: 0.75rem;
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 4px;
            color: var(--text);
        }

        .file-preview-actions {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
        }

        .file-preview-actions .btn-sm {
            padding: 0.35rem 0.6rem;
            font-size: 0.7rem;
        }

        .file-preview-actions-all {
            margin-top: 0.75rem;
            text-align: right;
        }

        /* Document List View - Grouped by Category */
        .doc-category-group {
            margin-bottom: 1.5rem;
        }

        .doc-category-header {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--accent);
            margin-bottom: 0.75rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--line);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .doc-category-header .count {
            font-size: 0.7rem;
            font-weight: normal;
            color: var(--muted);
            background: var(--bg);
            padding: 0.15rem 0.5rem;
            border-radius: 10px;
        }

        .doc-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .doc-list-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 8px;
            transition: all 0.2s;
        }

        .doc-list-item:hover {
            border-color: var(--accent);
        }

        .doc-list-item.expired {
            background: rgba(239, 68, 68, 0.08);
        }

        .doc-list-item.expired:hover {
            border-color: #ef4444;
            background: rgba(239, 68, 68, 0.12);
        }

        .doc-list-meta .expired-badge {
            color: #ef4444;
            font-weight: 500;
        }

        .doc-list-item.outdated {
            background: rgba(239, 68, 68, 0.08);
        }

        .doc-list-item.outdated:hover {
            border-color: #ef4444;
            background: rgba(239, 68, 68, 0.12);
        }

        .doc-list-meta .outdated-badge {
            color: #ef4444;
            font-weight: 500;
        }

        .doc-list-icon {
            width: 48px;
            height: 48px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            flex-shrink: 0;
            overflow: hidden;
        }

        .doc-list-icon.pdf {
            background: rgba(244, 67, 54, 0.1);
            color: #f44336;
        }

        .doc-list-icon.image {
            background: rgba(76, 175, 80, 0.1);
            color: #4caf50;
        }

        .doc-list-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

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

        .doc-list-name {
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .doc-list-meta {
            font-size: 0.75rem;
            color: var(--muted);
            display: flex;
            gap: 0.75rem;
            margin-top: 0.25rem;
        }

        .doc-list-id-info {
            display: flex;
            gap: 1rem;
            margin-top: 0.35rem;
            font-size: 0.7rem;
            flex-wrap: wrap;
        }

        .doc-list-id-info span {
            display: flex;
            gap: 0.25rem;
        }

        .doc-list-id-info .label {
            color: var(--muted);
        }

        .doc-list-id-info .value {
            color: var(--text);
        }

        .doc-list-id-info .value.expired {
            color: var(--danger);
        }

        .doc-list-actions {
            display: flex;
            gap: 0.5rem;
            flex-shrink: 0;
        }

        .doc-list-actions .btn-icon {
            width: 32px;
            height: 32px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-icon.view {
            background: rgba(94, 234, 212, 0.1);
            border: 1px solid rgba(94, 234, 212, 0.3);
            color: var(--accent);
        }

        .btn-icon.view:hover {
            background: rgba(94, 234, 212, 0.2);
        }

        .btn-icon.edit {
            background: rgba(251, 191, 36, 0.1);
            border: 1px solid rgba(251, 191, 36, 0.3);
            color: #fbbf24;
        }

        .btn-icon.edit:hover {
            background: rgba(251, 191, 36, 0.2);
        }

        .btn-icon.delete {
            background: rgba(251, 113, 133, 0.1);
            border: 1px solid rgba(251, 113, 133, 0.3);
            color: var(--danger);
        }

        .btn-icon.delete:hover {
            background: rgba(251, 113, 133, 0.2);
        }

        .btn-icon.move {
            background: rgba(251, 191, 36, 0.1);
            border: 1px solid rgba(251, 191, 36, 0.3);
            color: #fbbf24;
        }

        .btn-icon.move:hover {
            background: rgba(251, 191, 36, 0.2);
        }

        .btn-icon.scan {
            background: rgba(139, 92, 246, 0.1);
            border: 1px solid rgba(139, 92, 246, 0.3);
            color: #8b5cf6;
        }

        .btn-icon.scan:hover {
            background: rgba(139, 92, 246, 0.2);
        }

        .btn-icon.scan.scanning {
            animation: pulse 1s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        /* Store Images Grid */
        .store-images-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 1rem;
            padding: 0.5rem 0;
        }

        .store-image-item {
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 8px;
            overflow: hidden;
            transition: all 0.2s;
        }

        .store-image-item:hover {
            border-color: var(--accent);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }

        .store-image-thumb {
            width: 100%;
            aspect-ratio: 1;
            overflow: hidden;
            cursor: pointer;
            background: var(--bg-card);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .store-image-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.2s;
        }

        .store-image-item:hover .store-image-thumb img {
            transform: scale(1.05);
        }

        .store-image-info {
            padding: 0.5rem;
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
        }

        .store-image-name {
            font-size: 0.7rem;
            color: var(--muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .store-image-actions {
            display: flex;
            gap: 0.35rem;
        }

        .store-image-actions .btn-icon {
            width: 26px;
            height: 26px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        /* OCR Document Type Badge */
        .ocr-doc-type-badge {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            background: rgba(139, 92, 246, 0.1);
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: 8px;
            margin-bottom: 1rem;
        }

        .ocr-doc-type-badge .badge-icon {
            font-size: 1.25rem;
        }

        .ocr-doc-type-badge .badge-text {
            font-size: 0.85rem;
            font-weight: 600;
            color: #a78bfa;
        }

        .ocr-doc-type-badge.poa {
            background: rgba(34, 197, 94, 0.1);
            border-color: rgba(34, 197, 94, 0.3);
        }

        .ocr-doc-type-badge.poa .badge-text {
            color: #4ade80;
        }

        .field-hint {
            display: block;
            font-size: 0.7rem;
            color: var(--muted);
            margin-top: 0.25rem;
        }

        /* OCR Progress indicator */
        .ocr-progress {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 8px;
            padding: 1rem 1.5rem;
            z-index: 9999;
            display: none;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }

        .ocr-progress.active {
            display: block;
        }

        .ocr-progress-text {
            font-size: 0.85rem;
            color: var(--text);
            margin-bottom: 0.5rem;
        }

        .ocr-progress-bar {
            width: 200px;
            height: 4px;
            background: var(--bg);
            border-radius: 2px;
            overflow: hidden;
        }

        .ocr-progress-fill {
            height: 100%;
            background: #8b5cf6;
            transition: width 0.2s;
            width: 0%;
        }

        /* Secure Document Viewer Modal */
        .doc-viewer-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .doc-viewer-modal.hidden {
            display: none;
        }

        .doc-viewer-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
        }

        .doc-viewer-container {
            position: relative;
            width: 90vw;
            height: 90vh;
            max-width: 1200px;
            display: flex;
            flex-direction: column;
            background: var(--bg-card);
            border-radius: 12px;
            border: 1px solid var(--line);
            overflow: hidden;
        }

        .doc-viewer-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1rem;
            background: var(--bg-alt);
            border-bottom: 1px solid var(--line);
        }

        .doc-viewer-header span {
            font-weight: 500;
            color: var(--text);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 50%;
        }

        .doc-viewer-controls {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .doc-viewer-controls .btn-icon {
            padding: 0.4rem 0.6rem;
            font-size: 0.9rem;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--line);
            border-radius: 6px;
            color: var(--muted);
            cursor: pointer;
            transition: all 0.2s;
        }

        .doc-viewer-controls .btn-icon:hover {
            background: rgba(255, 255, 255, 0.1);
            color: var(--text);
        }

        #docViewerZoom {
            min-width: 50px;
            text-align: center;
            font-size: 0.85rem;
            color: var(--muted);
        }

        .doc-viewer-body {
            flex: 1;
            overflow: auto;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            background: #111;
        }

        .doc-viewer-loading {
            color: var(--muted);
            font-size: 0.9rem;
        }

        .doc-viewer-image {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            transition: transform 0.2s;
            cursor: grab;
        }

        .doc-viewer-image:active {
            cursor: grabbing;
        }

        .doc-viewer-pdf {
            width: 100%;
            height: 100%;
            border: none;
            background: white;
        }

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

        .section-header h3 {
            margin: 0;
        }

        .btn-add {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.5rem 0.75rem;
            font-size: 0.8rem;
            background: rgba(94, 234, 212, 0.15);
            color: #d0fff8;
            border: 1px solid rgba(94, 234, 212, 0.4);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-add:hover {
            background: rgba(94, 234, 212, 0.25);
        }

        /* Upload Modal - wider */
        .modal-content.upload-modal {
            width: 500px;
        }

        /* Document ID Modal - Wide for OCR data */
        .modal-content.doc-id-modal {
            width: 800px;
            max-width: 95vw;
        }

        .doc-id-layout {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
        }

        .doc-id-fields {
            padding-right: 1rem;
            border-right: 1px solid var(--line);
        }

        .doc-id-ocr {
            padding-left: 0.5rem;
        }

        .ocr-hint {
            color: var(--muted);
            font-size: 0.8rem;
            font-style: italic;
            margin-bottom: 1rem;
        }

        .ocr-data-boxes {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            max-height: 400px;
            overflow-y: auto;
        }

        .ocr-data-item {
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
            padding: 0.6rem;
            background: rgba(139, 92, 246, 0.1);
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: 6px;
        }

        .ocr-data-item input[type="checkbox"] {
            margin-top: 0.25rem;
            width: 16px;
            height: 16px;
            accent-color: #8b5cf6;
        }

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

        .ocr-data-value-input {
            width: 100%;
            font-family: monospace;
            font-size: 0.85rem;
            color: var(--text);
            margin-bottom: 0.4rem;
            padding: 0.4rem 0.5rem;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(139, 92, 246, 0.4);
            border-radius: 4px;
            box-sizing: border-box;
        }

        .ocr-data-value-input:focus {
            outline: none;
            border-color: #8b5cf6;
            background: rgba(0, 0, 0, 0.4);
        }

        .ocr-data-value-input::placeholder {
            color: var(--muted);
        }

        .ocr-data-select {
            width: 100%;
            padding: 0.35rem 0.5rem;
            font-size: 0.75rem;
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 4px;
            color: var(--text);
        }

        .ocr-data-select option {
            background: var(--bg-card);
        }

        @media (max-width: 768px) {
            .doc-id-layout {
                grid-template-columns: 1fr;
            }
            .doc-id-fields {
                padding-right: 0;
                border-right: none;
                border-bottom: 1px solid var(--line);
                padding-bottom: 1rem;
                margin-bottom: 1rem;
            }
            .doc-id-ocr {
                padding-left: 0;
            }
        }

        .officers-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 1rem;
            margin-top: 1rem;
        }

        /* Bank Accounts Grid */
        .bank-accounts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 1rem;
            margin-top: 1rem;
        }

        .bank-account-item {
            background: rgba(30, 41, 59, 0.5);
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 1rem;
            transition: all 0.2s;
        }

        .bank-account-item:hover {
            border-color: var(--accent);
        }

        .bank-account-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.75rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--line);
        }

        .bank-account-name {
            font-weight: 600;
            color: var(--text);
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .primary-badge {
            font-size: 0.7rem;
            font-weight: 500;
            color: #10b981;
            background: rgba(16, 185, 129, 0.15);
            border: 1px solid rgba(16, 185, 129, 0.3);
            padding: 0.15rem 0.5rem;
            border-radius: 20px;
        }

        .bank-account-actions {
            display: flex;
            gap: 0.25rem;
        }

        .bank-account-actions .btn-icon {
            width: 28px;
            height: 28px;
            border: none;
            background: transparent;
            cursor: pointer;
            border-radius: 6px;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }

        .bank-account-actions .btn-icon:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .bank-account-actions .btn-icon.delete:hover {
            background: rgba(239, 68, 68, 0.2);
        }

        .bank-account-details {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
        }

        .bank-detail {
            font-size: 0.85rem;
            color: var(--text-dim);
        }

        .bank-label {
            color: var(--muted);
            margin-right: 0.25rem;
        }

        /* Bank Account Modal */
        .modal-content.bank-account-modal {
            width: 450px;
        }

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

        /* Modal Styles */
        .modal-content {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 9999;
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 12px;
            width: 400px;
            max-height: 85vh;
            overflow-y: auto;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        }

        .modal-content.hidden {
            display: none !important;
        }

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

        .modal-header h3 {
            margin: 0;
            font-size: 1.1rem;
            color: var(--text);
            font-weight: 600;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--muted);
            cursor: pointer;
            padding: 0;
            line-height: 1;
            transition: color 0.2s;
        }

        .modal-close:hover {
            color: var(--danger);
        }

        .modal-body {
            padding: 1rem;
        }

        /* Delete Confirmation Modal */
        .delete-modal {
            width: 420px;
        }

        .delete-modal .modal-header {
            background: rgba(239, 68, 68, 0.1);
            border-bottom-color: var(--danger);
        }

        .delete-modal .modal-header h3 {
            color: var(--danger);
        }

        .delete-warning {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid var(--danger);
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1rem;
        }

        .delete-warning p {
            margin: 0 0 0.5rem 0;
            color: var(--text);
            font-size: 0.9rem;
        }

        .delete-warning ul {
            margin: 0;
            padding-left: 1.25rem;
            color: var(--muted);
            font-size: 0.85rem;
        }

        .delete-warning li {
            margin: 0.25rem 0;
        }

        .delete-confirm-input {
            margin-top: 1rem;
        }

        .delete-confirm-input label {
            display: block;
            margin-bottom: 0.5rem;
            color: var(--text);
            font-size: 0.9rem;
        }

        .delete-confirm-input label strong {
            color: var(--danger);
            font-family: monospace;
            font-size: 1rem;
        }

        .delete-confirm-input input {
            width: 100%;
            padding: 0.75rem;
            background: var(--bg);
            border: 2px solid var(--line);
            border-radius: 6px;
            color: var(--text);
            font-size: 1rem;
            font-family: monospace;
            text-align: center;
            letter-spacing: 2px;
        }

        .delete-confirm-input input:focus {
            outline: none;
            border-color: var(--danger);
        }

        .delete-confirm-input input.valid {
            border-color: var(--success);
            background: rgba(34, 197, 94, 0.1);
        }

        .delete-modal .modal-actions {
            display: flex;
            gap: 0.75rem;
            margin-top: 1.25rem;
        }

        .delete-modal .btn-delete-confirm {
            flex: 1;
            background: var(--muted);
            cursor: not-allowed;
            opacity: 0.6;
        }

        .delete-modal .btn-delete-confirm.enabled {
            background: var(--danger);
            cursor: pointer;
            opacity: 1;
        }

        .delete-modal .btn-delete-confirm.enabled:hover {
            background: #dc2626;
        }

        /* ========================================
           ZEUS MODE STYLES
           ======================================== */

        /* Zeus Mode Indicator */
        .zeus-indicator {
            color: #fbbf24;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 500;
            margin-left: 0.5rem;
            animation: zeusGlow 2s ease-in-out infinite;
        }

        .zeus-indicator:hover {
            color: #f59e0b;
        }

        @keyframes zeusGlow {
            0%, 100% { text-shadow: 0 0 5px rgba(251, 191, 36, 0.3); }
            50% { text-shadow: 0 0 15px rgba(251, 191, 36, 0.6); }
        }

        /* Zeus Mode Active State */
        body.zeus-mode .logo {
            color: #fbbf24 !important;
            text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
        }

        /* Zeus Hidden Company Card - golden border only */
        .company-card.zeus-hidden {
            border: 2px solid #fbbf24;
            position: relative;
        }

        .company-card.zeus-hidden::before {
            content: '⚡';
            position: absolute;
            top: 8px;
            right: 8px;
            font-size: 14px;
            color: #fbbf24;
        }

        .company-card.zeus-hidden:hover {
            border-color: #f59e0b;
        }

        .company-card.zeus-hidden h3 {
            color: #fbbf24;
        }

        /* Zeus Hidden Company Detail View - golden borders on inner sections */
        .zeus-company-view .detail-section {
            border-color: #fbbf24;
        }

        .zeus-company-view .company-tabs {
            border-bottom-color: #fbbf24;
        }

        /* Zeus Divider */
        .zeus-divider {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin: 1.5rem 0;
            color: #fbbf24;
            font-size: 0.85rem;
            font-weight: 500;
        }

        .zeus-divider::before,
        .zeus-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: linear-gradient(90deg, transparent, #fbbf24, transparent);
        }

        /* Zeus Hidden Checkbox (only visible in Zeus mode) */
        .zeus-hidden-toggle {
            display: none;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            background: rgba(251, 191, 36, 0.1);
            border: 1px solid rgba(251, 191, 36, 0.3);
            border-radius: 6px;
            color: #fbbf24;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .zeus-hidden-toggle:hover {
            background: rgba(251, 191, 36, 0.2);
        }

        .zeus-hidden-toggle input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: #fbbf24;
        }

        body.zeus-mode .zeus-hidden-toggle {
            display: flex;
        }

        /* Zeus Mode PIN Modal */
        .zeus-modal {
            max-width: 320px;
            text-align: center;
            background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 100%);
            border: 1px solid #fbbf24;
        }

        .zeus-modal h3 {
            color: #fbbf24;
            margin-bottom: 0.5rem;
        }

        .zeus-pin-boxes {
            display: flex;
            gap: 12px;
            justify-content: center;
            margin: 20px 0;
        }

        .zeus-pin-box {
            width: 52px;
            height: 60px;
            text-align: center;
            font-size: 24px;
            border: 2px solid var(--line);
            border-radius: 10px;
            background: rgba(0, 0, 0, 0.3);
            color: var(--text);
        }

        .zeus-pin-box:focus {
            border-color: #fbbf24;
            outline: none;
        }

        .zeus-pin-box.filled {
            background: rgba(251, 191, 36, 0.15);
            border-color: #fbbf24;
        }

        .zeus-error {
            color: #ef4444;
            font-size: 13px;
            min-height: 20px;
            margin-bottom: 10px;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .company-cards {
                grid-template-columns: 1fr;
            }

            .company-meta {
                grid-template-columns: 1fr;
            }

            .company-card-footer {
                flex-direction: column;
                align-items: stretch;
            }

            .status-select {
                width: 100%;
            }

            .company-header-section {
                flex-direction: column;
                gap: 1rem;
            }

            .company-header-right {
                text-align: left;
            }
        }

        /* ========================================
           OCR Scanner Modal - Full Screen Layout
           ======================================== */
        .ocr-scanner-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 10000;
            background: var(--bg);
            display: flex;
            flex-direction: column;
        }

        .ocr-scanner-modal.hidden {
            display: none;
        }

        .ocr-scanner-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1.25rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--line);
        }

        .ocr-scanner-header-left {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .ocr-back-btn {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--line);
            border-radius: 6px;
            color: var(--text);
            cursor: pointer;
            font-size: 0.875rem;
            transition: all 0.2s;
        }

        .ocr-back-btn:hover {
            background: var(--accent);
            border-color: var(--accent);
        }

        .ocr-scanner-title {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text);
        }

        .ocr-scanner-subtitle {
            font-size: 0.8rem;
            color: var(--muted);
        }

        .ocr-scanner-body {
            flex: 1;
            display: flex;
            overflow: hidden;
        }

        /* Left Panel - Form Fields */
        .ocr-panel-left {
            width: 320px;
            min-width: 320px;
            background: var(--bg-card);
            border-right: 1px solid var(--line);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .ocr-panel-header {
            padding: 1rem;
            border-bottom: 1px solid var(--line);
            background: rgba(0, 0, 0, 0.2);
        }

        .ocr-panel-header h3 {
            margin: 0;
            font-size: 0.9rem;
            color: var(--text);
        }

        .ocr-panel-content {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }

        .ocr-field-group {
            margin-bottom: 1rem;
        }

        .ocr-field-group label {
            display: block;
            font-size: 0.7rem;
            color: var(--muted);
            margin-bottom: 0.3rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .ocr-field-group input,
        .ocr-field-group select,
        .ocr-field-group textarea {
            width: 100%;
            padding: 0.6rem 0.75rem;
            font-size: 0.875rem;
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 6px;
            color: var(--text);
        }

        .ocr-field-group input:focus,
        .ocr-field-group select:focus,
        .ocr-field-group textarea:focus {
            outline: none;
            border-color: #8b5cf6;
        }

        .ocr-field-group.highlight input,
        .ocr-field-group.highlight select {
            border-color: #8b5cf6;
            background: rgba(139, 92, 246, 0.1);
        }

        /* Document List */
        .ocr-doc-list {
            border-top: 1px solid var(--line);
            padding: 0.75rem;
            background: rgba(0, 0, 0, 0.1);
            margin-top: auto;
        }

        .ocr-doc-list-title {
            font-size: 0.7rem;
            color: var(--muted);
            text-transform: uppercase;
            margin-bottom: 0.5rem;
        }

        .ocr-doc-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem;
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 4px;
            margin-bottom: 0.3rem;
            cursor: pointer;
            font-size: 0.75rem;
            color: var(--text);
        }

        .ocr-doc-item:hover {
            border-color: #8b5cf6;
        }

        .ocr-doc-item.active {
            background: rgba(139, 92, 246, 0.2);
            border-color: #8b5cf6;
        }

        .ocr-doc-item .doc-name {
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .ocr-doc-item .doc-status {
            font-size: 0.65rem;
            padding: 0.15rem 0.4rem;
            border-radius: 3px;
            background: rgba(94, 234, 212, 0.2);
            color: #5eead4;
        }

        .ocr-panel-footer {
            padding: 0.75rem 1rem;
            border-top: 1px solid var(--line);
            background: rgba(0, 0, 0, 0.2);
        }

        .ocr-save-btn {
            width: 100%;
            padding: 0.6rem;
            font-size: 0.85rem;
            border-radius: 6px;
            cursor: pointer;
            border: none;
            background: #8b5cf6;
            color: white;
        }

        .ocr-save-btn:hover {
            background: #7c4dff;
        }

        /* Center Panel - Document Viewer */
        .ocr-panel-center {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: #1a1a2e;
            overflow: hidden;
        }

        .ocr-viewer-toolbar {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            background: rgba(0, 0, 0, 0.3);
            border-bottom: 1px solid var(--line);
        }

        .ocr-viewer-toolbar .doc-title {
            flex: 1;
            font-size: 0.875rem;
            color: var(--text);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .ocr-viewer-toolbar button {
            padding: 0.4rem 0.75rem;
            font-size: 0.75rem;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid var(--line);
            border-radius: 4px;
            color: var(--text);
            cursor: pointer;
        }

        .ocr-viewer-toolbar button:hover {
            background: rgba(255, 255, 255, 0.15);
        }

        .ocr-viewer-toolbar button.primary {
            background: #8b5cf6;
            border-color: #8b5cf6;
        }

        .ocr-viewer-toolbar button.primary:hover {
            background: #7c4dff;
        }

        .ocr-viewer-container {
            flex: 1;
            overflow: auto;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        .ocr-viewer-container img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            transition: transform 0.2s;
            border-radius: 4px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
            cursor: grab;
        }

        .ocr-viewer-container img:active {
            cursor: grabbing;
        }

        /* Zoom levels handled by JavaScript applyOcrPan() for pan+zoom combination */

        .ocr-viewer-placeholder {
            text-align: center;
            color: var(--muted);
        }

        .ocr-viewer-placeholder svg {
            width: 80px;
            height: 80px;
            opacity: 0.3;
            margin-bottom: 1rem;
        }

        /* OCR Progress in Modal */
        .ocr-modal-progress {
            padding: 0.75rem;
            background: rgba(139, 92, 246, 0.1);
            border-top: 1px solid var(--line);
            display: none;
        }

        .ocr-modal-progress.active {
            display: block;
        }

        .ocr-modal-progress .progress-bar {
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
            margin-bottom: 0.5rem;
        }

        .ocr-modal-progress .progress-fill {
            height: 100%;
            background: #8b5cf6;
            width: 0%;
            transition: width 0.3s;
        }

        .ocr-modal-progress .progress-text {
            font-size: 0.7rem;
            color: var(--muted);
            text-align: center;
        }

        /* Right Panel - Raw OCR Data */
        .ocr-panel-right {
            width: 350px;
            min-width: 350px;
            background: var(--bg-card);
            border-left: 1px solid var(--line);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .ocr-raw-item {
            display: flex;
            gap: 0.5rem;
            padding: 0.5rem;
            background: rgba(139, 92, 246, 0.08);
            border: 1px solid rgba(139, 92, 246, 0.2);
            border-radius: 6px;
            margin-bottom: 0.5rem;
        }

        .ocr-raw-item input[type="checkbox"] {
            margin-top: 0.4rem;
            width: 16px;
            height: 16px;
            accent-color: #8b5cf6;
            flex-shrink: 0;
        }

        .ocr-raw-item-content {
            flex: 1;
            min-width: 0;
        }

        .ocr-raw-item-value {
            width: 100%;
            padding: 0.4rem 0.5rem;
            font-family: monospace;
            font-size: 0.8rem;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: 4px;
            color: var(--text);
            margin-bottom: 0.3rem;
        }

        .ocr-raw-item-value:focus {
            outline: none;
            border-color: #8b5cf6;
        }

        .ocr-raw-item-select {
            width: 100%;
            padding: 0.3rem 0.5rem;
            font-size: 0.7rem;
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 4px;
            color: var(--text);
        }

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

        .ocr-empty-state svg {
            width: 48px;
            height: 48px;
            opacity: 0.3;
            margin-bottom: 0.5rem;
        }

        @media (max-width: 1200px) {
            .ocr-panel-left { width: 280px; min-width: 280px; }
            .ocr-panel-right { width: 280px; min-width: 280px; }
        }

        /* Share Company Page View */
        #shareView {
            padding: 0;
        }

        .share-page-content {
            padding: 1.5rem;
            background: var(--bg-card);
            border-radius: 12px;
            margin-top: 1rem;
        }

        .share-steps {
            display: flex;
            gap: 1rem;
            margin-bottom: 2rem;
            padding: 1rem;
            background: var(--bg);
            border-radius: 12px;
            border: 1px solid var(--line);
        }

        .share-step {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 1rem 1.25rem;
            background: transparent;
            border: 2px solid var(--line);
            border-radius: 10px;
            color: var(--muted);
            font-size: 0.9rem;
            transition: all 0.2s ease;
        }

        .share-step .step-number {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--line);
            color: var(--muted);
            font-weight: 600;
            font-size: 0.85rem;
        }

        .share-step .step-label {
            font-weight: 500;
        }

        .share-step.active {
            background: rgba(94, 234, 212, 0.1);
            border-color: var(--accent);
            color: var(--text);
        }

        .share-step.active .step-number {
            background: var(--accent);
            color: var(--bg);
        }

        .share-step.completed {
            background: rgba(34, 197, 94, 0.1);
            border-color: #22c55e;
            color: #22c55e;
        }

        .share-step.completed .step-number {
            background: #22c55e;
            color: white;
        }

        .share-step-content {
            animation: fadeIn 0.3s ease;
        }

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

        .share-sections-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
        }

        @media (max-width: 900px) {
            .share-sections-grid {
                grid-template-columns: 1fr;
            }
            .share-steps {
                flex-direction: column;
            }
        }

        .share-section {
            padding: 1.25rem;
            background: var(--bg);
            border-radius: 10px;
            border: 1px solid var(--line);
        }

        .share-section-full {
            grid-column: 1 / -1;
        }

        .share-section h4 {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin: 0 0 1rem 0;
            font-size: 1rem;
            color: var(--text);
            font-weight: 600;
        }

        .share-section h4 svg {
            width: 20px;
            height: 20px;
            color: var(--accent);
        }

        .share-info-grid {
            display: flex;
            flex-direction: column;
            gap: 0.6rem;
            font-size: 0.9rem;
        }

        .share-info-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            background: rgba(255,255,255,0.02);
            border-radius: 8px;
            border: 2px solid var(--line);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .share-info-item:hover {
            border-color: var(--accent);
            background: rgba(94, 234, 212, 0.05);
        }

        .share-info-item.selected {
            border-color: var(--accent);
            background: rgba(94, 234, 212, 0.1);
        }

        .share-info-item input[type="checkbox"] {
            width: 20px;
            height: 20px;
            accent-color: var(--accent);
            flex-shrink: 0;
            cursor: pointer;
        }

        .share-info-label {
            color: var(--muted);
            min-width: 140px;
            font-size: 0.85rem;
            font-weight: 500;
        }

        .share-info-value {
            color: var(--text);
            flex: 1;
        }

        .share-select-all {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
            padding: 0.75rem 1rem;
            background: rgba(94, 234, 212, 0.1);
            border-radius: 8px;
            border: 2px solid var(--accent);
        }

        .share-select-all input[type="checkbox"] {
            width: 20px;
            height: 20px;
            accent-color: var(--accent);
            cursor: pointer;
        }

        .share-select-all label {
            font-size: 0.9rem;
            color: var(--text);
            font-weight: 500;
            cursor: pointer;
            user-select: none;
            margin: 0;
        }

        .share-officer-card {
            background: rgba(255,255,255,0.02);
            border-radius: 8px;
            padding: 0.75rem;
            margin-bottom: 0.75rem;
            border: 1px solid var(--line);
        }

        .share-officer-card:last-child {
            margin-bottom: 0;
        }

        .share-officer-name {
            font-weight: 600;
            color: var(--text);
            margin-bottom: 0.5rem;
            font-size: 0.9rem;
        }

        .share-officer-details {
            font-size: 0.8rem;
            color: var(--muted);
            line-height: 1.6;
        }

        /* Document Selection Grid */
        .select-all-label {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            cursor: pointer;
            font-weight: 500;
            color: var(--text);
        }

        .select-all-label input {
            width: 20px;
            height: 20px;
            accent-color: var(--accent);
        }

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

        .doc-select-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem;
            background: rgba(255,255,255,0.02);
            border-radius: 10px;
            border: 2px solid var(--line);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .doc-select-item:hover {
            border-color: var(--accent);
            background: rgba(94, 234, 212, 0.05);
        }

        .doc-select-item.selected {
            border-color: var(--accent);
            background: rgba(94, 234, 212, 0.1);
        }

        .doc-select-item input[type="checkbox"] {
            width: 20px;
            height: 20px;
            accent-color: var(--accent);
            flex-shrink: 0;
        }

        .doc-select-preview {
            width: 48px;
            height: 48px;
            border-radius: 8px;
            object-fit: cover;
            background: var(--bg);
            flex-shrink: 0;
        }

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

        .doc-select-name {
            font-size: 0.9rem;
            color: var(--text);
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .doc-select-type {
            font-size: 0.8rem;
            color: var(--muted);
            margin-top: 0.25rem;
        }

        /* Recipient & Service Step */
        .share-form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
        }

        @media (max-width: 800px) {
            .share-form-grid {
                grid-template-columns: 1fr;
            }
        }

        .section-hint {
            font-size: 0.85rem;
            color: var(--muted);
            margin: 0 0 1rem 0;
        }

        .services-radio-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .service-radio-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem;
            background: rgba(255,255,255,0.02);
            border-radius: 10px;
            border: 2px solid var(--line);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .service-radio-item:hover {
            border-color: var(--accent);
        }

        .service-radio-item.selected {
            border-color: var(--accent);
            background: rgba(94, 234, 212, 0.1);
        }

        .service-radio-item input[type="radio"] {
            width: 20px;
            height: 20px;
            accent-color: var(--accent);
        }

        .service-radio-info {
            flex: 1;
        }

        .service-radio-name {
            font-weight: 500;
            color: var(--text);
        }

        .service-radio-desc {
            font-size: 0.8rem;
            color: var(--muted);
            margin-top: 0.25rem;
        }

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

        .contact-suggestions {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-top: none;
            border-radius: 0 0 10px 10px;
            max-height: 200px;
            overflow-y: auto;
            z-index: 100;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }

        .contact-suggestion {
            padding: 0.75rem 1rem;
            cursor: pointer;
            font-size: 0.9rem;
            border-bottom: 1px solid var(--line);
        }

        .contact-suggestion:last-child {
            border-bottom: none;
        }

        .contact-suggestion:hover {
            background: rgba(94, 234, 212, 0.1);
        }

        .contact-suggestion-name {
            color: var(--text);
            font-weight: 500;
        }

        .contact-suggestion-email {
            font-size: 0.8rem;
            color: var(--muted);
        }

        /* Preview Step */
        .preview-grid {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 1.5rem;
        }

        @media (max-width: 900px) {
            .preview-grid {
                grid-template-columns: 1fr;
            }
        }

        .preview-section {
            min-height: 400px;
        }

        .email-meta {
            margin-bottom: 1rem;
            padding: 0.75rem;
            background: var(--bg);
            border-radius: 8px;
        }

        .email-meta-row {
            display: flex;
            gap: 0.75rem;
            padding: 0.4rem 0;
        }

        .meta-label {
            font-weight: 600;
            color: var(--muted);
            min-width: 70px;
        }

        .meta-value {
            color: var(--text);
        }

        .email-preview-box {
            background: #fff;
            color: #333;
            padding: 1.5rem;
            border-radius: 10px;
            font-family: Arial, sans-serif;
            max-height: 500px;
            overflow-y: auto;
            font-size: 0.9rem;
            line-height: 1.6;
        }

        .attachments-section {
            max-height: 400px;
            overflow-y: auto;
        }

        .attachments-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .attachment-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            background: var(--bg);
            border-radius: 8px;
            font-size: 0.85rem;
        }

        .attachment-icon {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(94, 234, 212, 0.1);
            border-radius: 6px;
            color: var(--accent);
        }

        .attachment-name {
            flex: 1;
            color: var(--text);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Navigation Buttons */
        .share-nav-btns {
            display: flex;
            gap: 1rem;
            margin-top: 2rem;
            padding-top: 1.5rem;
            border-top: 1px solid var(--line);
        }

        .share-nav-btns .nav-spacer {
            flex: 1;
        }

        .btn-success {
            background: linear-gradient(135deg, #22c55e, #16a34a);
            color: white;
            border: none;
        }

        .btn-success:hover {
            background: linear-gradient(135deg, #16a34a, #15803d);
        }

        .hero-icon {
            width: 20px;
            height: 20px;
            stroke: currentColor;
            stroke-width: 1.5;
            fill: none;
        }

        .hero-icon-sm {
            width: 16px;
            height: 16px;
        }

        /* ========================================
           Expected Business Section Styles
        ======================================== */
        .expected-business-section {
            margin-top: 1.5rem;
        }

        .expected-business-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
            gap: 1.5rem;
            margin-top: 1rem;
        }

        .expected-business-card {
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 1.25rem;
            transition: all 0.2s;
        }

        .expected-business-card:hover {
            border-color: var(--accent);
        }

        .expected-business-card-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--line);
        }

        .expected-business-card-header h4 {
            margin: 0;
            font-size: 1rem;
            font-weight: 600;
            color: var(--text);
            flex: 1;
        }

        .expected-business-icon {
            font-size: 1.5rem;
        }

        .expected-business-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.75rem;
        }

        .expected-business-item {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }

        .expected-business-item.full-width {
            grid-column: 1 / -1;
        }

        .eb-label {
            font-size: 0.75rem;
            color: var(--muted);
            font-weight: 500;
        }

        .eb-value {
            font-size: 0.9rem;
            color: var(--text);
            font-weight: 500;
        }

        .eb-value .not-set {
            color: var(--muted);
            font-style: italic;
            font-weight: 400;
        }

        /* Expected Business Modal */
        .expected-business-modal {
            max-width: 700px;
        }

        .expected-business-modal .form-row {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }

        .expected-business-modal .form-group {
            margin-bottom: 1rem;
        }

        .expected-business-modal .form-hint {
            display: block;
            margin-top: 0.25rem;
            font-size: 0.75rem;
            color: var(--accent);
        }

        .expected-business-modal .form-section h4 {
            font-size: 1rem;
        }

        @media (max-width: 768px) {
            .expected-business-container {
                grid-template-columns: 1fr;
            }

            .expected-business-grid {
                grid-template-columns: 1fr;
            }

            .expected-business-modal .form-row {
                grid-template-columns: 1fr;
            }
        }

        /* ========================================
           Signature Section Styles
           ======================================== */

        .signature-section {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .signatory-block {
            background: var(--card-bg);
            border: 1px solid var(--line);
            border-radius: 8px;
            padding: 1.25rem;
        }

        .signatory-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--line);
        }

        .signatory-title {
            font-weight: 600;
            color: var(--text);
        }

        .signatory-role {
            font-size: 0.8rem;
            color: var(--muted);
            background: var(--surface);
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
        }

        .signature-fields {
            display: grid;
            grid-template-columns: 1fr 2fr 1fr;
            gap: 1rem;
            align-items: start;
        }

        .signature-field {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .signature-field label {
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--muted);
        }

        .signature-input {
            padding: 0.6rem 0.75rem;
            border: 1px solid var(--line);
            border-radius: 6px;
            background: var(--surface);
            color: var(--text);
            font-size: 0.9rem;
        }

        .signature-input.auto-filled {
            border-color: var(--success);
            background: rgba(16, 185, 129, 0.05);
        }

        .signature-box {
            min-height: 80px;
            border: 2px dashed var(--line);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            background: #ffffff;
            padding: 0.5rem;
        }

        .signature-box:hover {
            border-color: var(--accent);
            background: #f8f9fa;
        }

        .signature-box .signature-placeholder {
            color: #6c757d;
            font-size: 0.85rem;
        }

        .signature-box .signature-image {
            max-width: 100%;
            max-height: 70px;
            object-fit: contain;
            background: #ffffff;
        }

        /* Signature Style Picker Modal */
        .signature-style-picker {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            backdrop-filter: blur(4px);
        }

        .style-picker-content {
            background: var(--card-bg);
            border-radius: 12px;
            padding: 1.5rem;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        }

        .style-picker-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .style-picker-header h4 {
            margin: 0;
            font-size: 1.1rem;
            color: var(--text);
        }

        .style-picker-header .close-btn {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--muted);
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }

        .style-picker-header .close-btn:hover {
            color: var(--text);
        }

        .style-picker-name {
            font-size: 0.9rem;
            color: var(--muted);
            margin-bottom: 1.25rem;
            padding: 0.5rem;
            background: var(--surface);
            border-radius: 6px;
        }

        .signature-styles-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 1rem;
        }

        .style-option {
            border: 2px solid var(--line);
            border-radius: 8px;
            padding: 1rem;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
        }

        .style-option:hover {
            border-color: var(--accent);
            background: rgba(99, 102, 241, 0.05);
            transform: translateY(-2px);
        }

        .style-preview {
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 0.5rem;
            background: #ffffff;
            border-radius: 4px;
            overflow: hidden;
            padding: 0.5rem;
        }

        .style-preview svg {
            max-width: 100%;
            max-height: 50px;
            display: block;
        }

        .style-preview .loading-sig {
            font-size: 0.75rem;
            color: var(--muted);
        }

        .style-preview .sig-error {
            font-size: 0.75rem;
            color: var(--error);
        }

        .style-option span {
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text);
        }

        @media (max-width: 768px) {
            .signature-fields {
                grid-template-columns: 1fr;
            }

            .signature-styles-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        /* ========================================
           USER DROPDOWN MENU
           ======================================== */

        .user-menu {
            position: relative;
        }

        .user-menu-trigger {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.875rem;
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 8px;
            color: var(--text);
            cursor: pointer;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s;
        }

        .user-menu-trigger:hover {
            background: var(--bg-input);
            border-color: var(--accent);
        }

        .user-menu-trigger .chevron {
            transition: transform 0.2s;
        }

        .user-menu.open .user-menu-trigger .chevron {
            transform: rotate(180deg);
        }

        .user-menu-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            min-width: 200px;
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 10px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.2s;
            z-index: 1000;
            overflow: hidden;
        }

        .user-menu.open .user-menu-dropdown {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            color: var(--text);
            text-decoration: none;
            font-size: 0.875rem;
            transition: all 0.15s;
        }

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

        .dropdown-item svg {
            color: var(--muted);
        }

        .dropdown-item:hover svg {
            color: var(--accent);
        }

        .dropdown-item-danger {
            color: #f87171;
        }

        .dropdown-item-danger svg {
            color: #f87171 !important;
        }

        .dropdown-item-danger:hover {
            background: rgba(248, 113, 113, 0.1);
        }

        .dropdown-divider {
            height: 1px;
            background: var(--line);
            margin: 0.25rem 0;
        }

        /* ========================================
           FIELD INSERT DROPDOWN
           ======================================== */

        .field-insert-dropdown {
            position: relative;
            display: inline-block;
        }

        .field-dropdown-menu {
            position: absolute;
            top: 100%;
            left: 0;
            z-index: 1000;
            min-width: 280px;
            max-height: 400px;
            overflow-y: auto;
            background: var(--bg-card);
            border: 1px solid var(--line);
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            padding: 8px 0;
            margin-top: 4px;
        }

        .field-dropdown-category {
            padding: 8px 12px 4px;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .field-dropdown-item {
            padding: 6px 12px 6px 20px;
            cursor: pointer;
            font-size: 0.875rem;
            color: var(--text);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .field-dropdown-item:hover {
            background: var(--bg-input);
        }

        .field-dropdown-item code {
            font-size: 0.75rem;
            color: var(--accent);
            font-family: monospace;
            background: var(--bg-input);
            padding: 2px 6px;
            border-radius: 3px;
        }

        .field-dropdown-item:hover code {
            background: var(--bg-card);
        }
