* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #dbeafe 0%, #ffffff 50%, #faf5ff 100%);
    color: #374151;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

/* Modern Navigation Header */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 40;
}

.nav-brand {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.875rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb 0%, #9333ea 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.brand-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container {
    position: relative;
}

.search-input {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    width: 320px;
    background: white;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    border-color: transparent;
    box-shadow: 0 0 0 2px #3b82f6;
}

.search-container::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.username-btn {
    background: none;
    border: none;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.username-btn:hover {
    background-color: #f3f4f6;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    min-width: 250px;
    z-index: 50;
    margin-top: 0.5rem;
}

.dropdown-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.profile-info {
    position: relative;
}

.dropdown-settings-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    font-size: 1rem;
}

.dropdown-settings-btn:hover {
    background-color: #f3f4f6;
}

.profile-info p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
}

/* Dropdown arrow styling */
.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.username-btn[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown actions section */
.dropdown-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dropdown-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    width: 100%;
    text-align: left;
}

.dropdown-action-btn:hover {
    background-color: #f3f4f6;
}

.dropdown-action-btn.settings-btn {
    color: #374151;
}

.dropdown-action-btn.admin-btn {
    color: #7c3aed;
}

.dropdown-action-btn.admin-btn:hover {
    background-color: #ede9fe;
}

.dropdown-action-btn.logout-btn {
    color: #dc2626;
}

.dropdown-action-btn.logout-btn:hover {
    background-color: #fee2e2;
}

.logout-btn {
    background-color: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: #b91c1c;
}

.settings-btn {
    background: none;
    border: none;
    color: #374151;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background-color: #f3f4f6;
    transform: rotate(90deg);
}

.settings-icon {
    font-size: 1.2rem;
}

/* Forms */
.form-container {
    background: white;
    max-width: 400px;
    margin: 3rem auto;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1f2937;
    font-weight: 600;
}

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Password input with show/hide button */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 3rem;
}

.show-password-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #6b7280;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.show-password-btn:hover {
    color: #374151;
}

.show-password-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke: currentColor;
}

.show-password-btn:hover svg {
    fill: #374151;
    stroke: #374151;
}

/* Shared users display */
.shared-with {
    color: #6b7280;
    font-size: 0.875rem;
}

.shared-users-more {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.shared-users-more:hover {
    background-color: #e5f3ff;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    width: 100%;
    margin-bottom: 1rem;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    width: 100%;
    margin-bottom: 1rem;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-icon-only {
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 2.5rem;
    height: 2.5rem;
}

.btn-icon-only:hover {
    background-color: #2563eb;
    transform: scale(1.05);
}

.form-container p {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.form-container a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.form-container a:hover {
    text-decoration: underline;
}

.form-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.invite-notice {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    background-color: #f9fafb;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    margin-top: 1rem;
}

.invitation-info {
    margin-bottom: 1.5rem;
}

.info-card {
    background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 100%);
    border: 1px solid #3b82f6;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.info-card h4 {
    color: #1e40af;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.info-card p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #374151;
}

/* Dashboard */
.dashboard {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.library-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Library Tabs */
.library-tabs {
    display: flex;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 2rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: #374151;
    background: rgba(59, 130, 246, 0.05);
}

.tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: white;
}

/* Controls Section */
.controls-section {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.control-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.control-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.results-count {
    font-size: 0.875rem;
    color: #6b7280;
}

.upload-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.upload-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.upload-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.view-toggle {
    display: flex;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    overflow: hidden;
}

.view-btn {
    background: white;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    color: #6b7280;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background-color: #f3f4f6;
}

.view-btn.active {
    background-color: #dbeafe;
    color: #2563eb;
}

/* Upload Progress */
.upload-progress {
    padding: 1rem 2rem;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Media Grid */
.media-grid {
    padding: 2rem;
    min-height: 400px;
}

.media-grid[data-view="grid"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.media-grid[data-view="list"] {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.media-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
    group: hover;
}

.media-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.media-grid[data-view="list"] .media-item {
    display: flex;
    align-items: center;
}

.media-preview {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.media-grid[data-view="list"] .media-preview {
    width: 200px;
    flex-shrink: 0;
    aspect-ratio: 16/9;
}

.media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-item:hover .media-preview img {
    transform: scale(1.05);
}

.media-preview .file-icon {
    font-size: 3rem;
    color: #9ca3af;
}

.media-type-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.media-item:hover .media-overlay {
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
}

.view-btn-overlay {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.view-btn-overlay:hover {
    background: white;
}

.media-info {
    padding: 1rem;
    flex: 1;
}

.media-grid[data-view="list"] .media-info {
    padding: 1rem 1.5rem;
}

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

.media-title {
    font-weight: 600;
    color: #111827;
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
}

.media-actions {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    padding: 4px 8px;
}

.media-preview {
    position: relative;
}

.action-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.action-btn:hover {
    color: #374151;
    background-color: #f3f4f6;
}

.action-btn.like:hover {
    color: #dc2626;
}

.action-btn.download:hover {
    color: #2563eb;
}

.action-btn.share:hover {
    color: #059669;
}

.action-btn.info:hover {
    color: #7c3aed;
}

.media-actions .action-icon {
    width: 15px;
    height: 15px;
    color: #ffffff;
    transition: all 0.2s ease;
}

.action-icon {
    width: 15px;
    height: 15px;
    color: #9ca3af;
    transition: all 0.2s ease;
}

.action-btn:hover .action-icon {
    color: inherit;
}

.media-actions .action-btn {
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.media-actions .action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.media-actions .action-btn.share:hover .action-icon {
    color: #10b981;
}

.media-actions .action-btn.delete:hover .action-icon {
    color: #ef4444;
}

.media-actions .action-btn.info:hover .action-icon {
    color: #3b82f6;
}

/* Info Panel Modal Styles */
.info-panel-modal {
    max-width: 500px;
    width: 90%;
}

.info-section {
    padding: 0;
}

.info-header h4 {
    color: #374151;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    word-break: break-word;
}

.info-content {
    margin-bottom: 1.5rem;
}

.info-row {
    margin-bottom: 1rem;
}

.info-row label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.description-display {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.75rem;
    min-height: 60px;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.description-edit {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 60px;
}

.description-edit:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.download-checkbox {
    margin-right: 0.5rem;
    width: 16px;
    height: 16px;
}

.info-row label:has(.download-checkbox) {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
}

.info-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.save-btn, .cancel-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.save-btn {
    background-color: #10b981;
    color: white;
}

.save-btn:hover {
    background-color: #059669;
}

.cancel-btn {
    background-color: #f3f4f6;
    color: #6b7280;
}

.cancel-btn:hover {
    background-color: #e5e7eb;
    color: #374151;
}

/* Ownership Indicator Styles */
.ownership-indicator {
    margin-top: 0.5rem;
}

.owner-badge, .viewer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.owner-badge {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.viewer-badge {
    background-color: #e5e7eb;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.owner-icon, .viewer-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.dark-theme .owner-badge {
    background-color: #451a03;
    color: #fbbf24;
    border-color: #92400e;
}

.dark-theme .viewer-badge {
    background-color: #374151;
    color: #9ca3af;
    border-color: #4b5563;
}

/* Hide actions container when empty */
.info-actions:empty {
    display: none !important;
}

.media-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

.media-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.media-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.media-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #dbeafe;
    color: #1e40af;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

/* Empty State */
.empty-state {
    text-align: left;
    padding: 1.5rem 2rem;
    color: #6b7280;
    margin-top: 1rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6b7280;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: #6b7280;
    font-style: italic;
}

.loading-spinner::before {
    content: '⏳';
    margin-right: 0.5rem;
    animation: spin 2s linear infinite;
}

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

/* Message Display */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem;
    border-radius: 0.5rem;
    max-width: 350px;
    z-index: 1000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.message.show {
    transform: translateX(0);
    opacity: 1;
}

.message.success {
    background-color: #10b981;
    color: white;
}

.message.error {
    background-color: #ef4444;
    color: white;
}

.message.info {
    background-color: #3b82f6;
    color: white;
}

/* Login Error */
.login-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.875rem;
    animation: slideIn 0.3s ease-out;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-input {
        width: 100%;
        max-width: 300px;
    }
    
    .controls-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .control-filters {
        justify-content: center;
    }
    
    .control-actions {
        justify-content: space-between;
    }
    
    .media-grid[data-view="grid"] {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .media-grid[data-view="list"] .media-item {
        flex-direction: column;
    }
    
    .media-grid[data-view="list"] .media-preview {
        width: 100%;
    }
    
    .dashboard {
        padding: 1rem;
    }
    
    .form-container {
        margin: 1rem auto;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 1.5rem;
    }
    
    .brand-subtitle {
        font-size: 0.75rem;
    }
    
    .media-grid[data-view="grid"] {
        grid-template-columns: 1fr;
    }
}

/* Share Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 1.5rem;
}

.share-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.share-info p {
    margin: 0;
    color: #475569;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

/* ========== Enhanced Upload Modal Styles ========== */
.upload-files-list {
    max-height: 200px;
    overflow-y: auto;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f9fafb;
}

.upload-file-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
}

.upload-file-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.upload-file-info {
    flex: 1;
}

.upload-file-name {
    font-weight: 500;
    color: #374151;
}

.upload-file-size {
    font-size: 0.875rem;
    color: #6b7280;
}

.upload-options {
    margin-bottom: 1rem;
}

.upload-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.upload-option:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.upload-option input[type="checkbox"]:checked + .checkmark + .option-text {
    color: #1d4ed8;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
}

.upload-option input[type="checkbox"] {
    display: none;
}

.upload-option input[type="checkbox"]:checked + .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.upload-option input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    position: absolute;
    top: -2px;
    left: 3px;
    font-size: 14px;
}

.option-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.option-text small {
    color: #6b7280;
    font-size: 0.875rem;
}

.upload-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
}

.info-label {
    color: #6b7280;
    font-weight: 500;
}

/* ========== Enhanced Media Viewer Modal ========== */
.media-viewer-modal {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
}

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

.viewer-btn {
    padding: 0.5rem;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-btn:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

.viewer-btn .btn-icon {
    font-size: 1rem;
}

.media-viewer-body {
    padding: 0;
}

.media-viewer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    max-height: 60vh;
    overflow: auto;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
}

.media-viewer-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.media-viewer-container video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    /* Disable text selection and drag */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Disable dragging */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    /* Disable pointer events on video to prevent right-click */
    pointer-events: auto;
}

.media-viewer-container audio {
    width: 100%;
    max-width: 400px;
    /* Disable text selection and drag for audio */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Disable dragging */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.media-viewer-info {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.media-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-label {
    font-weight: 500;
    color: #6b7280;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    background: #dcfce7;
    color: #16a34a;
}

.status-encrypted {
    color: #dc2626;
    font-weight: 600;
}

.encryption-indicator {
    background: #fef2f2;
    border-radius: 6px;
    padding: 0.5rem !important;
    border: 1px solid #fecaca !important;
}

.viewer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6b7280;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* ========== Settings Modal Styles ========== */
.settings-modal {
    max-width: 800px;
    max-height: 80vh;
}

.settings-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.settings-tab {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.settings-tab:hover {
    color: #374151;
    background: rgba(59, 130, 246, 0.05);
}

.settings-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.settings-content h4 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.network-actions {
    margin-bottom: 1.5rem;
}

/* Theme Selector */
.theme-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    min-width: 120px;
}

.theme-option:hover {
    border-color: #3b82f6;
}

.theme-option input[type="radio"] {
    display: none;
}

.theme-option input[type="radio"]:checked + .theme-preview {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.theme-preview {
    width: 60px;
    height: 40px;
    border-radius: 0.25rem;
    border: 2px solid #e5e7eb;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.default-theme {
    background: linear-gradient(135deg, #dbeafe 0%, #ffffff 50%, #faf5ff 100%);
}

.dark-theme {
    background: linear-gradient(135deg, #1f2937 0%, #111827 50%, #0f172a 100%);
}

.theme-label {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

/* Dark Theme Styles */
body.dark-theme {
    background: linear-gradient(135deg, #1f2937 0%, #111827 50%, #0f172a 100%);
    color: #f3f4f6;
}

.dark-theme .navbar {
    background: rgba(31, 41, 55, 0.8);
    border-bottom-color: #374151;
}

.dark-theme .brand-title {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dark-theme .brand-subtitle {
    color: #9ca3af;
}

.dark-theme .search-input {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.dark-theme .search-input:focus {
    border-color: #3b82f6;
}

.dark-theme .username-btn {
    color: #f3f4f6;
}

.dark-theme .username-btn:hover {
    background-color: #374151;
}

.dark-theme .settings-btn {
    color: #f3f4f6;
}

.dark-theme .settings-btn:hover {
    background-color: #374151;
}

.dark-theme .user-dropdown {
    background: #374151;
    border-color: #4b5563;
}

.dark-theme .profile-info p {
    color: #e5e7eb;
}

/* Dark theme dropdown styles */
.dark-theme .dropdown-actions {
    border-top-color: #4b5563;
}

.dark-theme .dropdown-action-btn {
    color: #e5e7eb;
}

.dark-theme .dropdown-action-btn:hover {
    background-color: #4b5563;
}

.dark-theme .dropdown-action-btn.settings-btn {
    color: #e5e7eb;
}

.dark-theme .dropdown-action-btn.logout-btn {
    color: #f87171;
}

.dark-theme .dropdown-action-btn.logout-btn:hover {
    background-color: #4b5563;
}

.dark-theme .form-container {
    background: #374151;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.dark-theme .form-container h2 {
    color: #f3f4f6;
}

.dark-theme .form-group input {
    background: #4b5563;
    border-color: #6b7280;
    color: #f3f4f6;
}

.dark-theme .form-group input:focus {
    border-color: #3b82f6;
}

.dark-theme .library-container {
    background: #374151;
}

.dark-theme .library-tabs {
    background: #4b5563;
    border-bottom-color: #6b7280;
}

.dark-theme .tab-btn {
    color: #9ca3af;
}

.dark-theme .tab-btn:hover {
    color: #e5e7eb;
    background: rgba(59, 130, 246, 0.1);
}

.dark-theme .tab-btn.active {
    color: #60a5fa;
    background: #374151;
    border-bottom-color: #60a5fa;
}

.dark-theme .controls-section {
    border-bottom-color: #4b5563;
}

.dark-theme .filter-select {
    background: #4b5563;
    border-color: #6b7280;
    color: #f3f4f6;
}

.dark-theme .media-item {
    background: #4b5563;
    border-color: #6b7280;
}

.dark-theme .media-title {
    color: #f3f4f6;
}

.dark-theme .media-description {
    color: #d1d5db;
}

.dark-theme .modal-content {
    background: #374151;
}

.dark-theme .modal-header h3 {
    color: #f3f4f6;
}

.dark-theme .settings-tabs {
    border-bottom-color: #4b5563;
}

.dark-theme .settings-tab {
    color: #9ca3af;
}

.dark-theme .settings-tab:hover {
    color: #e5e7eb;
}

.dark-theme .settings-tab.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

.dark-theme .settings-content h4 {
    color: #f3f4f6;
}

.dark-theme .theme-description {
    color: #9ca3af;
}

.dark-theme .theme-option {
    border-color: #4b5563;
}

.dark-theme .theme-option:hover {
    border-color: #6b7280;
    background: rgba(59, 130, 246, 0.1);
}

.dark-theme .theme-option.active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.dark-theme .theme-label {
    color: #f3f4f6;
}

/* Additional Theme Styles */
.theme-selector {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.theme-option:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.theme-option.active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.theme-option input[type="radio"] {
    display: none;
}

.theme-preview {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
}

.theme-preview.default-theme {
    background: linear-gradient(135deg, #dbeafe 0%, #ffffff 50%, #faf5ff 100%);
}

.theme-preview.dark-theme {
    background: linear-gradient(135deg, #1f2937 0%, #111827 50%, #0f172a 100%);
}

.theme-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 1rem;
    text-align: center;
}

/* Profile Form Styles */
.readonly-field {
    background-color: #f9fafb !important;
    color: #6b7280 !important;
    cursor: not-allowed !important;
}

.readonly-field:focus {
    box-shadow: none !important;
    border-color: #d1d5db !important;
}

.field-note {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    display: block;
}

.profile-value {
    font-weight: 500;
    color: #374151;
}

/* Dark theme profile styles */
.dark-theme .readonly-field {
    background-color: #374151 !important;
    color: #9ca3af !important;
    border-color: #4b5563 !important;
}

.dark-theme .field-note {
    color: #9ca3af;
}

.dark-theme .profile-value {
    color: #f3f4f6;
}

.dark-theme .form-group label {
    color: #f3f4f6;
}

/* Network Management Styles */
.network-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #e9ecef;
}

.networks-list {
    margin-top: 1.5rem;
}

.network-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.network-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.1);
}

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

.network-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    margin: 0;
}

.network-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.network-description {
    color: #666;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.network-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.network-stats {
    display: flex;
    gap: 1rem;
}

.network-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.network-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.network-actions .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.network-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.network-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.network-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.network-modal-header h4 {
    margin: 0;
    color: #333;
}

.network-modal-body {
    padding: 1.5rem;
}

.network-info {
    margin-bottom: 2rem;
}

.network-info h5 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
}

.info-label {
    font-weight: 600;
    color: #666;
}

.info-value {
    color: #333;
}

.network-members h5 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.member-info {
    display: flex;
    flex-direction: column;
}

.member-name {
    font-weight: 600;
    color: #333;
}

.member-email {
    color: #666;
    font-size: 0.9rem;
}

.member-role {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.member-role.owner {
    background: #dc3545;
    color: white;
}

.member-role.admin {
    background: #fd7e14;
    color: white;
}

.member-role.member {
    background: #6c757d;
    color: white;
}

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

.member-actions .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.add-member-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #e9ecef;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.network-owner-badge {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.network-member-badge {
    background: #6c757d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.empty-networks {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.empty-networks-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

/* Dark theme network styles */
.dark-theme .network-form {
    background: #374151;
    border-color: #4b5563;
}

.dark-theme .network-card {
    background: #374151;
    border-color: #4b5563;
}

.dark-theme .network-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 2px 8px rgba(96,165,250,0.1);
}

.dark-theme .network-name {
    color: #f3f4f6;
}

.dark-theme .network-description {
    color: #d1d5db;
}

.dark-theme .network-meta {
    color: #9ca3af;
}

.dark-theme .network-modal-content {
    background: #374151;
}

.dark-theme .network-modal-header {
    border-bottom-color: #4b5563;
}

.dark-theme .network-modal-header h4 {
    color: #f3f4f6;
}

.dark-theme .network-info h5 {
    color: #f3f4f6;
}

.dark-theme .info-label {
    color: #d1d5db;
}

.dark-theme .info-value {
    color: #f3f4f6;
}

.dark-theme .network-members h5 {
    color: #f3f4f6;
}

.dark-theme .member-item {
    background: #4b5563;
    border-color: #6b7280;
}

.dark-theme .member-name {
    color: #f3f4f6;
}

.dark-theme .member-email {
    color: #d1d5db;
}

.dark-theme .add-member-form {
    background: #4b5563;
    border-color: #6b7280;
}

.dark-theme .empty-networks {
    color: #9ca3af;
}

.dark-theme .empty-networks-icon {
    color: #6b7280;
}

/* Contact Picker Styles */
.contact-search-container {
    margin: 1rem 0;
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.contact-suggestions {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contact-item {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.contact-item:hover {
    background-color: #f8f9fa;
}

.contact-item.selected {
    background-color: #e3f2fd;
    border-left: 3px solid #007bff;
}

.contact-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    margin-right: 0.75rem;
    vertical-align: middle;
}

.contact-info {
    display: inline-block;
    vertical-align: middle;
}

.contact-name {
    font-weight: 600;
    color: #333;
    display: block;
}

.contact-email {
    color: #666;
    font-size: 0.85rem;
    display: block;
}

.recent-contacts, .selected-contacts {
    margin: 1rem 0;
}

.recent-contacts h6, .selected-contacts h6 {
    margin: 0 0 0.75rem 0;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
}

.contacts-list {
    max-height: 150px;
    overflow-y: auto;
}

.selected-contact-item {
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 6px;
    padding: 0.75rem;
}

.selected-contact-item .contact-item {
    padding: 0;
    border: none;
    cursor: default;
}

.selected-contact-item .contact-item:hover {
    background: transparent;
}

.remove-contact-btn {
    float: right;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
}

.remove-contact-btn:hover {
    background: #c82333;
}

.empty-contacts {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.no-results {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-style: italic;
}

/* Dark theme contact picker */
.dark-theme .search-box input {
    background: #4b5563;
    border-color: #6b7280;
    color: #f3f4f6;
}

.dark-theme .search-box input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96,165,250,0.1);
}

.dark-theme .search-icon {
    color: #d1d5db;
}

.dark-theme .contact-suggestions {
    background: #374151;
    border-color: #4b5563;
}

.dark-theme .contact-item {
    border-bottom-color: #4b5563;
}

.dark-theme .contact-item:hover {
    background-color: #4b5563;
}

.dark-theme .contact-item.selected {
    background-color: #1e3a8a;
    border-left-color: #60a5fa;
}

.dark-theme .contact-name {
    color: #f3f4f6;
}

.dark-theme .contact-email {
    color: #d1d5db;
}

.dark-theme .recent-contacts h6, .dark-theme .selected-contacts h6 {
    color: #d1d5db;
}

.dark-theme .selected-contact-item {
    background: #065f46;
    border-color: #10b981;
}

.dark-theme .empty-contacts, .dark-theme .no-results {
    color: #9ca3af;
}
