/* Admin Portal Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #666;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --background-color: #f5f5f5;
    --surface-color: #ffffff;
    --text-color: #333;
    --border-color: #ddd;
    --header-height: 60px;
    --nav-height: 50px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.login-logo {
    max-width: 150px;
    margin-bottom: 1.5rem;
}

.login-container h1 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.login-container p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 1rem;
    border: 1px solid #f5c6cb;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 1rem;
    border: 1px solid #c3e6cb;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.025em;
}

.btn-primary {
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    color: #1f2937;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background-color: #10b981;
    color: white;
    border: none;
}

.btn-success:hover {
    background-color: #059669;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Header */
.app-header {
    background-color: var(--surface-color);
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Navigation */
.app-nav {
    background-color: var(--surface-color);
    height: var(--nav-height);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 999;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    gap: 2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    text-decoration: none;
    color: var(--secondary-color);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: var(--primary-color);
}

.nav-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Main Content */
.app-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    margin-top: calc(var(--header-height) + var(--nav-height) + 2rem);
    min-height: calc(100vh - var(--header-height) - var(--nav-height) - 4rem);
}

/* Cards */
.card {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 0.5rem 0;
}

/* Grid Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--secondary-color);
    font-size: 1rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--background-color);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tr:hover {
    background-color: var(--background-color);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-primary {
    background-color: #cce5ff;
    color: #004085;
}

.badge-secondary {
    background-color: #e2e3e5;
    color: #383d41;
}

/* File Links */
.file-link {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.file-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.file-link a:hover {
    text-decoration: underline;
}

/* Status History */
.status-history {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-entry {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-left: 3px solid #dee2e6;
    border-radius: 4px;
}

.status-date {
    font-size: 0.85rem;
    color: #666;
    margin-left: 0.5rem;
}

.status-note {
    margin-top: 0.5rem;
    font-style: italic;
    color: #555;
}

/* Status Update Controls */
.status-update-section {
    border-top: 2px solid #dee2e6;
    padding-top: 1rem !important;
    margin-top: 1rem !important;
}

.status-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-controls select,
.status-controls input {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Action Buttons */
.action-btn {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.action-btn-view {
    background-color: var(--primary-color);
    color: white;
}

.action-btn-view:hover {
    background-color: #0052a3;
}

.action-btn-delete {
    background-color: var(--danger-color);
    color: white;
}

.action-btn-delete:hover {
    background-color: #c82333;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal.modal-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background-color: var(--surface-color);
    border-radius: 8px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: var(--background-color);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.detail-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row label {
    font-weight: 600;
    color: var(--secondary-color);
}

.detail-row div {
    word-break: break-word;
}

.detail-multiline {
    white-space: pre-wrap;
    font-family: inherit;
}

/* Form Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
    overflow-y: auto;
}

.modal-form {
    background: var(--surface-color);
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-form .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-form .modal-header h3 {
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--background-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

.modal-form form {
    padding: 1.5rem;
}

/* Role Builder Cards */
#roles-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.role-card {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
}

.role-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.role-card-header h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 0;
}

.btn-remove {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.role-card .form-group {
    margin-bottom: 1rem;
}

.role-card .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.role-card input[type="text"],
.role-card select,
.role-card textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
}

.role-card textarea {
    resize: vertical;
    min-height: 60px;
}

.role-card label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content,
    .nav-content,
    .app-content {
        padding: 0 1rem;
    }

    .nav-content {
        gap: 1rem;
    }

    .nav-item {
        padding: 0 0.5rem;
        font-size: 0.875rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .user-name {
        display: none;
    }

    .table-container {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.5rem;
    }

    .modal.modal-open {
        padding: 1rem;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .detail-row label {
        font-size: 0.875rem;
    }
}

/* Media Gallery Styles */
.media-gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.media-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    background: #f9fafb;
}

.media-label {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.media-preview {
    position: relative;
    margin-bottom: 0.5rem;
}

.media-preview img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid #e5e7eb;
}

.media-preview img:hover {
    transform: scale(1.02);
    border-color: var(--primary-color);
}

.media-link {
    display: inline-block;
    position: relative;
}

.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.2s;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.media-link:hover .media-overlay {
    opacity: 1;
}

.video-preview video {
    border-radius: 6px;
    border: 2px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.pdf-preview iframe {
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.file-icon {
    font-size: 2rem;
}

.btn-download {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: var(--dark-bg);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-download:hover {
    opacity: 0.9;
}

/* Media Lightbox */
.media-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.status-by {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
    margin-top: 0.25rem;
}

/* Workflow Pipeline Styles */
.submission-detail-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.workflow-section {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

.workflow-section h4 {
    margin: 0 0 1rem 0;
    color: var(--dark-bg);
    font-size: 1.1rem;
}

.workflow-pipeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.workflow-stage {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    opacity: 0.4;
    transition: all 0.3s;
}

.workflow-stage.active {
    opacity: 1;
    border-color: var(--primary-color);
    background: #fff7ed;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.workflow-stage.completed {
    opacity: 1;
    border-color: #10b981;
    background: #f0fdf4;
}

.workflow-stage.terminal-inactive {
    opacity: 0.3;
}

.stage-icon {
    font-size: 2rem;
    line-height: 1;
}

.stage-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: var(--dark-bg);
    line-height: 1.2;
}

.workflow-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.workflow-controls label {
    font-weight: 600;
    color: var(--dark-bg);
    font-size: 0.9rem;
}

/* Internal Notes Styles */
.internal-notes-section {
    background: #fefce8;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #fde047;
}

.internal-notes-section h4 {
    margin: 0 0 1rem 0;
    color: var(--dark-bg);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.internal-notes-section h4::before {
    content: '🔒';
    font-size: 1.2rem;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.note-entry {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.note-author {
    font-weight: 600;
    color: var(--dark-bg);
    font-size: 0.9rem;
}

.note-date {
    font-size: 0.75rem;
    color: #6b7280;
}

.note-content {
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
}

.no-notes {
    color: #6b7280;
    font-style: italic;
    margin: 1rem 0;
}

.add-note-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed #fde047;
}

.add-note-section textarea {
    resize: vertical;
    min-height: 80px;
}

/* CRM-Style Submissions View */
.submissions-crm-header {
    margin-bottom: 2rem;
}

.submissions-crm-header h2 {
    margin: 0 0 1rem 0;
}

.submissions-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-bg);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.submissions-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.toggle-btn {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.toggle-btn:hover {
    border-color: var(--primary-color);
    background: #fff7ed;
}

.toggle-btn.active {
    background: var(--primary-color);
    color: var(--dark-bg);
    border-color: var(--primary-color);
}

/* Card Grid View */
.submissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.submission-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}

.submission-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-header-section {
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 2px solid #f3f4f6;
    position: relative;
}

.applicant-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #fbbf24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-bg);
    flex-shrink: 0;
    overflow: hidden;
}

.applicant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.applicant-info {
    flex: 1;
    min-width: 0;
}

.applicant-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-bg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.applicant-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.stage-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-body-section {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.info-label {
    font-weight: 600;
    color: #6b7280;
    min-width: 80px;
    flex-shrink: 0;
}

.info-value {
    color: var(--dark-bg);
    flex: 1;
    word-break: break-word;
}

.card-footer-section {
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-top: 2px solid #f3f4f6;
    display: flex;
    gap: 0.75rem;
}

.card-action-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.card-action-btn.primary {
    background: var(--primary-color);
    color: white;
}

.card-action-btn.primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-action-btn.secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.card-action-btn.secondary:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
    color: var(--primary-color);
}

/* List View */
.submissions-list {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.list-view-container {
    width: 100%;
}

.list-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr 0.5fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.list-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr 0.5fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.list-row:hover {
    background: #f9fafb;
}

.list-col-name {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.list-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #fbbf24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-bg);
    flex-shrink: 0;
    overflow: hidden;
}

.list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-name {
    font-weight: 600;
    color: var(--dark-bg);
}

.list-email {
    font-size: 0.875rem;
    color: #6b7280;
}

.list-col-roles {
    color: var(--dark-bg);
    font-size: 0.875rem;
}

.stage-badge-small {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.list-col-date {
    color: #6b7280;
    font-size: 0.875rem;
}

.list-col-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.icon-btn {
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: scale(1.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: var(--dark-bg);
}

.empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .submissions-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .submissions-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .view-toggle {
        margin-left: 0;
        width: 100%;
    }

    .toggle-btn {
        flex: 1;
    }

    .submissions-grid {
        grid-template-columns: 1fr;
    }

    .list-header {
        display: none;
    }

    .list-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
    }

    .list-col-name {
        grid-column: 1;
    }

    .list-col-roles,
    .list-col-date {
        font-size: 0.8rem;
    }

    .stage-badge {
        position: static;
        margin-top: 0.5rem;
        display: inline-block;
    }
}

/* Submission Detail Page - Full Page View */
.submission-detail-page {
    min-height: 100vh;
    background: #f9fafb;
}

.detail-page-header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -2rem -2rem 2rem -2rem;
}

.back-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.back-btn:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.header-actions .btn-secondary {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.header-actions .btn-secondary:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
    color: var(--primary-color);
}

.detail-page-content {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(400px, 2fr) minmax(300px, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.detail-left-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-center-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-right-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Applicant Card */
.applicant-card {
    background: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    overflow: hidden;
}

.applicant-header {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
}

.applicant-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #fbbf24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-bg);
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.applicant-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.applicant-identity h1 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    color: var(--dark-bg);
}

.preferred-name {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.applicant-quick-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.contact-section,
.production-section {
    padding: 1.25rem 1.5rem;
    border-top: 2px solid #f3f4f6;
}

.contact-section h3,
.production-section h3 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.contact-item,
.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.contact-label,
.detail-label {
    font-weight: 600;
    color: #6b7280;
    min-width: 80px;
    font-size: 0.8125rem;
}

.contact-item a {
    color: var(--dark-bg);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.detail-item code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

/* Media Section */
.media-section {
    background: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 1.25rem;
}

.media-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    color: var(--dark-bg);
}

.no-media {
    color: #6b7280;
    font-style: italic;
}

.media-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.media-item h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    color: var(--dark-bg);
    font-weight: 600;
}

.media-image-preview {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.media-image-preview img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.2s;
}

.media-image-preview:hover img {
    transform: scale(1.02);
}

.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.media-image-preview:hover .media-overlay {
    opacity: 1;
}

.media-item video {
    width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.media-item iframe {
    width: 100%;
    height: 400px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.file-download {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

.file-icon {
    font-size: 2rem;
}

.btn-download {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: var(--dark-bg);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-download:hover {
    opacity: 0.9;
}

/* Application Details Section */
.application-details-section {
    background: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.application-details-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    color: var(--dark-bg);
}

.detail-block {
    margin-bottom: 1.5rem;
}

.detail-block:last-child {
    margin-bottom: 0;
}

.detail-block h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-block p {
    margin: 0;
    color: var(--dark-bg);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Workflow Section - Full Page */
.workflow-section-full {
    background: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 1.25rem;
}

.workflow-section-full h3,
.workflow-section-full h4 {
    margin: 0 0 0.75rem 0;
    color: var(--dark-bg);
    font-size: 1rem;
}

.workflow-progress {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 1rem 0.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    opacity: 0.4;
    transition: all 0.3s;
    text-align: center;
}

.workflow-step.current {
    opacity: 1;
    border-color: var(--primary-color);
    background: var(--stage-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.workflow-step.completed {
    opacity: 1;
    border-color: #10b981;
    background: #f0fdf4;
}

.workflow-step.terminal {
    opacity: 0.3;
}

.step-icon {
    font-size: 2rem;
    line-height: 1;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dark-bg);
}

.current-indicator {
    font-size: 0.6875rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 0.125rem;
}

.workflow-actions {
    margin-bottom: 1.25rem;
    padding-top: 1.25rem;
    border-top: 2px solid #f3f4f6;
}

.stage-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
}

.stage-btn {
    padding: 1rem;
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.stage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #f9fafb;
    border-color: #d1d5db;
}

.stage-btn.active {
    background: #eff6ff;
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.quick-actions {
    padding-top: 2rem;
    border-top: 2px solid #f3f4f6;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.quick-actions h4 {
    grid-column: 1 / -1;
    margin-bottom: 0.5rem;
}

.action-btn {
    padding: 1rem;
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.action-btn:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
    color: var(--primary-color);
}

.action-btn.danger {
    border-color: #fecaca;
    color: #dc2626;
    background: white;
}

.action-btn.danger:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

/* Internal Notes - Full Page */
.internal-notes-full {
    background: #fefce8;
    border-radius: 8px;
    border: 2px solid #fde047;
    padding: 1.25rem;
}

.internal-notes-full h3 {
    margin: 0 0 0.375rem 0;
    font-size: 1rem;
    color: var(--dark-bg);
}

.notes-description {
    margin: 0 0 1rem 0;
    font-size: 0.8125rem;
    color: #6b7280;
}

.notes-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.note-item {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.note-time {
    font-size: 0.75rem;
    color: #6b7280;
}

.note-text {
    color: #374151;
    line-height: 1.5;
    font-size: 0.875rem;
    white-space: pre-wrap;
}

.add-note-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed #fde047;
}

.add-note-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
}

.add-note-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--dark-bg);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    font-size: 0.9rem;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* Status History - Full Page */
.status-history-full {
    background: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 2rem;
}

.status-history-full h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    color: var(--dark-bg);
}

.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
}

.history-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.history-content {
    flex: 1;
}

.history-status {
    font-weight: 700;
    color: var(--dark-bg);
    margin-bottom: 0.25rem;
}

.history-time {
    font-size: 0.8rem;
    color: #6b7280;
}

.history-author {
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
}

.history-note {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.detail-page-error {
    text-align: center;
    padding: 4rem 2rem;
}

.detail-page-error h2 {
    margin: 0 0 1rem 0;
    color: var(--dark-bg);
}

.detail-page-error p {
    margin: 0 0 2rem 0;
    color: #6b7280;
}

/* Email History Section */
.email-history-section {
    background: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 1.25rem;
}

.email-history-section h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: var(--dark-bg);
}

.email-history-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.email-history-item {
    background: #f9fafb;
    padding: 0.875rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.email-history-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.email-icon {
    font-size: 1.125rem;
}

.email-subject {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--dark-bg);
    flex: 1;
}

.email-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.email-timestamp {
    font-size: 0.6875rem;
    color: #9ca3af;
}

.no-email-history {
    color: #6b7280;
    font-style: italic;
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
}

/* Status History Section */
.status-history-section {
    background: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 1.25rem;
}

.status-history-section h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: var(--dark-bg);
}

.status-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-item {
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #e5e7eb;
}

.status-change {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--dark-bg);
    margin-bottom: 0.25rem;
}

.status-timestamp {
    font-size: 0.75rem;
    color: #6b7280;
}

@media (max-width: 1400px) {
    .detail-page-content {
        grid-template-columns: minmax(250px, 1fr) minmax(350px, 1.5fr) minmax(250px, 1fr);
    }
}

@media (max-width: 1024px) {
    .detail-page-content {
        grid-template-columns: 1fr;
    }
    
    .workflow-progress {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

/* === CLEAN SUBMISSION DETAIL PAGE === */

.submission-detail-page {
    background: #f9fafb;
    min-height: 100vh;
}

.detail-page-header {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.back-btn {
    padding: 0.625rem 1.25rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    color: #374151;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.025em;
    display: inline-flex;
    align-items: center;
}

.back-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-icon {
    font-size: 1rem;
}

.status-label {
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-secondary,
.btn-primary {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.025em;
}

.btn-secondary {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-primary {
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    border: none;
    color: #1f2937;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle::after {
    content: '';
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown.show .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.875rem 1.25rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
}

.dropdown-menu a:hover {
    background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding-left: 1.5rem;
}

.detail-page-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 1.5rem;
}

.detail-main-column,
.detail-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.info-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    color: #111827;
    font-weight: 600;
}

.info-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.profile-photo-compact {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-photo-compact.placeholder {
    background: linear-gradient(135deg, var(--primary-color) 0%, #fbbf24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-bg);
}

.info-header-text h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    color: #111827;
    font-weight: 600;
}

.text-muted {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 0.625rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
}

.info-table td.label {
    width: 140px;
    color: #6b7280;
    font-weight: 500;
}

.info-table td.value {
    color: #111827;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 0;
}

.info-table td.value a {
    color: var(--primary-color);
    text-decoration: none;
}

.info-table td.value a:hover {
    text-decoration: underline;
}

.info-table td.value code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
}

.media-grid-simple {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.media-item-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
}

.media-item-compact img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
}

.media-item-compact img:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.media-item-compact video {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.media-item-compact.document {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.media-item-compact span {
    font-size: 0.75rem;
    color: #374151;
}

.file-icon {
    font-size: 2rem;
}

.btn-link {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Media Gallery Modal */
#mediaGalleryModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-large {
    background: white;
    border-radius: 12px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #111827;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #111827;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
}

.gallery-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.gallery-item.video,
.gallery-item.document {
    cursor: default;
}

.gallery-item-label {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background: white;
}

.doc-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    min-height: 250px;
}

.doc-preview .doc-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.doc-preview .doc-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-align: center;
}

.btn-gallery-action {
    display: block;
    padding: 0.875rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    color: #1f2937;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border-top: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.btn-gallery-action:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Email Composer Modal */
.email-composer-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

.form-control {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-control textarea {
    resize: vertical;
    min-height: 200px;
    font-family: inherit;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Email History Timeline */
.email-history-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.email-history-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.125rem;
    color: #111827;
}

.email-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
    transition: all 0.2s;
}

.email-item:hover {
    background: #f3f4f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.email-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.email-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.email-subject {
    font-weight: 600;
    font-size: 0.875rem;
    color: #111827;
}

.email-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.email-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.email-template {
    font-size: 0.75rem;
    color: #f59e0b;
    background: #fef3c7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
}

/* Role Applications Section */
.role-applications-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.role-applications-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.role-applications-section .section-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: #111827;
}

.role-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.role-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s;
}

.role-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.role-card.cast {
    background: #d1fae5;
    border-color: #10b981;
}

.role-card.rejected {
    background: #fee2e2;
    border-color: #ef4444;
}

.role-card.callback {
    background: #fef3c7;
    border-color: #f59e0b;
}

.role-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.role-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.role-info h4 {
    margin: 0;
    font-size: 1.125rem;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.applied-badge {
    background: #dbeafe;
    color: #1e40af;
}

.considered-badge {
    background: #fef3c7;
    color: #92400e;
}

.role-type-badge {
    background: #f3e8ff;
    color: #6b21a8;
}

.role-status-dropdown {
    position: relative;
}

.status-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    background: white;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-btn:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-btn.considering {
    color: #6b7280;
    border-color: #d1d5db;
}

.status-btn.callback {
    color: #f59e0b;
    border-color: #fbbf24;
    background: #fef3c7;
}

.status-btn.cast {
    color: #10b981;
    border-color: #34d399;
    background: #d1fae5;
}

.status-btn.rejected {
    color: #ef4444;
    border-color: #f87171;
    background: #fee2e2;
}

.status-btn.withdrawn {
    color: #8b5cf6;
    border-color: #a78bfa;
    background: #ede9fe;
}

.role-description {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    font-size: 0.875rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.role-description p {
    margin: 0.5rem 0 0 0;
    color: #6b7280;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.cast-as-info,
.role-notes,
.rejection-reason {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    font-size: 0.875rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.role-notes p,
.rejection-reason p {
    margin: 0.5rem 0 0 0;
    color: #6b7280;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.role-card-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.role-timestamp {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6b7280;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

/* Role Selector Modal */
.role-selector-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.role-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.available-roles h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.role-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.role-option:hover {
    background: #f3f4f6;
    border-color: #f59e0b;
}

.role-option input[type="radio"] {
    margin-top: 0.25rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #f59e0b;
}

.role-option input[type="radio"]:checked ~ .role-option-content {
    color: #111827;
}

.role-option-content {
    flex: 1;
}

.role-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.role-option-desc {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.role-detail {
    display: inline-block;
    margin-right: 1rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.custom-role-input {
    margin-top: 0.75rem;
    padding-left: 2rem;
}

.help-text {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
}

@media (max-width: 1280px) {
    .detail-page-content {
        grid-template-columns: 1fr;
    }
    
    .media-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}


/* Callback Scheduling Styles */
.callbacks-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.callbacks-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.callbacks-section .section-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: #111827;
}

.btn-icon {
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.callbacks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.callback-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s;
}

.callback-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.callback-card.upcoming {
    background: #fef3c7;
    border-color: #fbbf24;
}

.callback-card.past {
    background: #fee2e2;
    border-color: #f87171;
    opacity: 0.8;
}

.callback-card.completed {
    background: #d1fae5;
    border-color: #10b981;
}

.callback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.callback-type {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

.callback-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.callback-status.upcoming {
    background: #fef3c7;
    color: #92400e;
}

.callback-status.past {
    background: #fee2e2;
    color: #991b1b;
}

.callback-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.callback-datetime {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.callback-duration,
.callback-roles,
.callback-location {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.callback-link {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: #4f46e5;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.callback-link:hover {
    background: #4338ca;
    transform: translateX(4px);
}

.callback-notes {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #6b7280;
    white-space: pre-wrap;
}

.callback-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn-text {
    background: none;
    border: none;
    color: #f59e0b;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.btn-text:hover {
    color: #d97706;
    text-decoration: underline;
}

.btn-text.danger {
    color: #ef4444;
}

.btn-text.danger:hover {
    color: #dc2626;
}

/* Callback Scheduler Modal */
.callback-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #f59e0b;
    cursor: pointer;
}

.text-muted {
    color: #9ca3af;
    font-style: italic;
}

.modal-large {
    max-width: 900px;
}

.modal-medium {
    max-width: 700px;
}

/* Spinner animation for conflict checker */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* DOCUMENT MANAGEMENT STYLES */

/* Document Templates Page */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.template-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.template-card.inactive {
    opacity: 0.6;
    background: #f9f9f9;
}

.template-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.template-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.template-info {
    flex: 1;
}

.template-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.template-actions {
    display: flex;
    align-items: center;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active {
    background: var(--success-color);
}

.status-dot.inactive {
    background: var(--secondary-color);
}

.template-description {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.template-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.detail-item i {
    color: var(--primary-color);
    width: 16px;
}

.merge-fields-preview {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fff3cd;
    border-radius: 4px;
    font-size: 0.85rem;
}

.field-tag {
    display: inline-block;
    background: #ffc107;
    color: #333;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    margin: 0.2rem;
    font-size: 0.8rem;
    font-family: monospace;
}

.template-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Merge Field & Signer Rows */
.merge-field-row,
.signer-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.merge-field-row input[type="text"],
.merge-field-row select,
.signer-row input,
.signer-row select {
    flex: 1;
}

.merge-field-row .checkbox-label {
    white-space: nowrap;
}

/* Document Cards in Submission Detail */
.document-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.document-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.document-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.document-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.document-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.document-roles {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.signers-status {
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.signer-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.signer-item i {
    color: var(--secondary-color);
}

.signer-item.signed i {
    color: var(--success-color);
}

.signer-item span {
    flex: 1;
}

.signer-item small {
    color: var(--secondary-color);
}

.document-dates {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.date-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-item i {
    color: var(--secondary-color);
    width: 14px;
}

.document-notes {
    margin: 0.75rem 0;
    padding: 0.5rem;
    background: #fff3cd;
    border-radius: 4px;
    font-size: 0.85rem;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* Info boxes */
.info-box {
    margin: 1rem 0;
    padding: 1rem;
    background: #e7f3ff;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.info-box ul {
    margin: 0.5rem 0 0 1.5rem;
}

.info-box code {
    background: #fff;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-family: monospace;
}

