/* Reusable Component Styles */

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.btn-warning {
    background: linear-gradient(45deg, #ffa726, #ff9800);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.3);
}

.btn-danger {
    background: linear-gradient(45deg, #ff6b6b, #f44336);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.card-title {
    margin: 0;
    color: #4ecdc4;
    font-size: 1.3rem;
    font-weight: 600;
}

.card-subtitle {
    margin: 0.5rem 0 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4ecdc4;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.form-select option {
    background: #2a2a2a;
    color: white;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: auto;
    margin: 0;
}

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

.form-error {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-help {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Tables */
.table-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table th {
    background: rgba(255, 255, 255, 0.05);
    color: #4ecdc4;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    color: rgba(255, 255, 255, 0.9);
}

.table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
}

.badge-success {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    color: white;
}

.badge-warning {
    background: linear-gradient(45deg, #ffa726, #ff9800);
    color: white;
}

.badge-danger {
    background: linear-gradient(45deg, #ff6b6b, #f44336);
    color: white;
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Progress Bars */
.progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
    text-align: center;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-success {
    background: rgba(78, 205, 196, 0.1);
    border-color: #4ecdc4;
    color: #4ecdc4;
}

.alert-warning {
    background: rgba(255, 167, 38, 0.1);
    border-color: #ffa726;
    color: #ffa726;
}

.alert-danger {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.alert-info {
    background: rgba(69, 183, 209, 0.1);
    border-color: #45b7d1;
    color: #45b7d1;
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.pagination-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-color: transparent;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0 1rem;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Responsive Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 { 
        grid-template-columns: 1fr; 
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table {
        min-width: 600px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-1 { flex: 1; }
.flex-center { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* Enhanced Photo Management Styles */
.photo-manager-container {
    padding: 1rem;
}

.photo-controls {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filters-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.advanced-filters {
    animation: slideDown 0.3s ease-out;
}

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

.search-input-container {
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.view-controls button {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sort-controls {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.bulk-actions {
    animation: slideDown 0.3s ease-out;
}

.comparison-mode {
    animation: slideDown 0.3s ease-out;
}

/* Photo Grid Enhancements */
.photo-grid-container .grid {
    gap: 1.5rem;
}

.photo-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.photo-card.selected {
    border: 2px solid #4ecdc4;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
}

.photo-card.comparison-selected {
    border: 2px solid #ffa726;
    box-shadow: 0 0 20px rgba(255, 167, 38, 0.3);
}

.photo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
}

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

.photo-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.photo-preview {
    position: relative;
    height: 250px;
    overflow: hidden;
    cursor: pointer;
}

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

.photo-card:hover .photo-preview img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 2rem;
}

.photo-preview:hover .photo-overlay {
    opacity: 1;
}

.photo-tags {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.tag {
    background: rgba(78, 205, 196, 0.2);
    color: #4ecdc4;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

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

/* List View Styles */
.photo-list-container .table {
    background: rgba(255, 255, 255, 0.02);
}

.photo-row.selected {
    background: rgba(78, 205, 196, 0.1);
}

.photo-row.comparison-selected {
    background: rgba(255, 167, 38, 0.1);
}

.photo-thumbnail {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.photo-thumbnail:hover {
    transform: scale(1.1);
}

.photo-title-cell {
    min-width: 200px;
}

.equipment-info,
.technical-info,
.status-info {
    font-size: 0.85rem;
    line-height: 1.4;
}

.photo-tags-compact {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.tag-small {
    background: rgba(78, 205, 196, 0.2);
    color: #4ecdc4;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-size: 0.6rem;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

/* Comparison Styles */
.comparison-btn {
    border: 1px solid #ffa726;
    color: #ffa726;
    background: transparent;
}

.comparison-btn.active {
    background: #ffa726;
    color: white;
}

.comparison-grid {
    gap: 1rem;
}

.comparison-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
}

.comparison-details {
    line-height: 1.4;
}

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

/* Duplicates Viewer */
.duplicates-viewer {
    max-width: 800px;
}

.duplicate-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Photo Details Modal */
.photo-details-viewer {
    max-width: 900px;
}

.photo-preview-large {
    text-align: center;
}

.metadata-sections {
    max-height: 400px;
    overflow-y: auto;
}

.metadata-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 1rem;
}

.metadata-grid {
    display: grid;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.metadata-grid > div {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.metadata-grid > div:last-child {
    border-bottom: none;
}

/* Pagination Enhancements */
.pagination-container {
    margin-top: 2rem;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    padding: 0 1rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .photo-controls {
        padding: 1rem;
    }
    
    .filters-row .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-controls .d-flex {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-controls {
        justify-content: center;
        margin: 1rem 0;
    }
    
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .photo-card-header {
        position: static;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .photo-preview {
        height: 200px;
    }
    
    .bulk-actions .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .bulk-actions .d-flex:last-child {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr !important;
    }
    
    .photo-details-viewer .row {
        flex-direction: column;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table {
        min-width: 800px;
    }
}

@media (max-width: 480px) {
    .photo-actions {
        justify-content: center;
    }
    
    .photo-actions .btn {
        flex: 1;
        min-width: 0;
        padding: 0.5rem;
    }
    
    .pagination {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pagination-info {
        order: -1;
    }
}

/* Loading States */
.photo-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.photo-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Utility Classes for Photo Management */
.bg-primary.bg-opacity-10 {
    background: rgba(78, 205, 196, 0.1) !important;
}

.bg-info.bg-opacity-10 {
    background: rgba(69, 183, 209, 0.1) !important;
}

.text-primary {
    color: #4ecdc4 !important;
}

.flex-wrap {
    flex-wrap: wrap;
}
/* Category
 and Tag Management Styles */
.category-manager-container {
    padding: 1rem;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.nav-tab {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px 8px 0 0;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-tab.active {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Overview Section */
.overview-grid {
    animation: fadeIn 0.5s ease-out;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #4ecdc4;
    line-height: 1;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.category-stats-list,
.tag-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-item-name {
    font-weight: 500;
    color: white;
}

.stat-item-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.stat-item-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.stat-item-fill {
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.tag-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.tag-name {
    color: white;
    font-weight: 500;
}

.tag-usage {
    color: #4ecdc4;
    font-weight: 600;
    font-size: 0.9rem;
}

/* View Headers */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.view-header h2 {
    color: #4ecdc4;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

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

/* Sortable Categories */
.sortable-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sortable-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: move;
}

.sortable-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sortable-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.drag-handle {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    cursor: grab;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-main {
    flex: 1;
}

.item-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.item-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

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

.item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Tag Management */
.tag-search {
    position: relative;
}

.tag-search input {
    padding-left: 2.5rem;
}

.tag-search::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    z-index: 1;
}

.sort-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.sort-controls label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.sort-controls select {
    min-width: 120px;
}

.tag-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.tag-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.tag-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag-main {
    flex: 1;
}

.tag-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.25rem;
}

.tag-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tag-select {
    margin-right: 0.5rem;
}

/* Bulk Operations */
.bulk-operations-view {
    animation: fadeIn 0.5s ease-out;
}

.photo-filters {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 1rem;
}

.photo-selection-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
}

.selected-count {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.bulk-action-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 1rem;
}

.bulk-action-section h5 {
    color: #4ecdc4;
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.tag-selector {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
}

.tag-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.tag-checkbox:hover {
    color: white;
}

.tag-checkbox input {
    margin: 0;
}

/* Analytics View */
.analytics-view {
    animation: fadeIn 0.5s ease-out;
}

.analytics-table {
    max-height: 400px;
    overflow-y: auto;
}

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

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    color: #4ecdc4;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Import/Export View */
.import-export-view {
    animation: fadeIn 0.5s ease-out;
}

.export-options,
.import-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.export-options .form-group,
.import-options .form-group {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 1rem;
}

.export-options label,
.import-options label {
    display: block;
    color: #4ecdc4;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.form-check {
    margin: 0.5rem 0;
}

.form-check-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design for Category Management */
@media (max-width: 1024px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
    
    .view-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .view-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .nav-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .nav-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .tag-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .tag-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .sort-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .sort-controls select {
        width: 100%;
    }
    
    .bulk-action-section .form-group {
        margin-bottom: 1rem;
    }
    
    .tag-selector {
        max-height: 150px;
    }
}

@media (max-width: 480px) {
    .category-manager-container {
        padding: 0.5rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .view-header h2 {
        font-size: 1.5rem;
    }
    
    .view-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .view-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .sortable-item {
        padding: 0.75rem;
    }
    
    .item-title {
        font-size: 1rem;
    }
    
    .item-actions .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Loading States */
.category-content-area.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.category-content-area.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

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

/* Icon styles */
.icon-plus::before { content: '+'; }
.icon-edit::before { content: '✏️'; }
.icon-trash::before { content: '🗑️'; }
.icon-merge::before { content: '🔀'; }
.icon-cleanup::before { content: '🧹'; }
.icon-download::before { content: '⬇️'; }
.icon-upload::before { content: '⬆️'; }

/* Text utilities */
.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.text-success {
    color: #4ecdc4 !important;
}

.text-warning {
    color: #ffa726 !important;
}

.text-danger {
    color: #ff6b6b !important;
}

/* Settings Manager Styles */
.settings-manager-container {
    padding: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-title h2 {
    margin: 0;
    color: #4ecdc4;
    font-size: 1.8rem;
    font-weight: 600;
}

.settings-title p {
    margin: 0.5rem 0 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.settings-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.settings-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.settings-tab {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.settings-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.settings-tab.active {
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.3), rgba(78, 205, 196, 0.3));
    color: white;
}

.settings-content {
    position: relative;
}

.settings-tab-content {
    display: none;
}

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

.settings-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.settings-section-title {
    margin: 0 0 1.5rem 0;
    color: #4ecdc4;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-section-title i {
    font-size: 1.1rem;
    opacity: 0.8;
}

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

.input-group {
    display: flex;
    align-items: center;
}

.input-suffix {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    min-width: 60px;
    text-align: center;
}

.input-group .form-control {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.settings-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    position: sticky;
    bottom: 2rem;
    z-index: 10;
}

.form-actions-left {
    flex: 1;
}

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

.unsaved-changes-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffa726;
    font-size: 0.9rem;
    font-weight: 500;
}

.unsaved-changes-indicator i {
    font-size: 1rem;
}

/* Form Control Enhancements */
.form-control.error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.form-error {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-error::before {
    content: '⚠';
    font-size: 0.9rem;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.75rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: #ff6b6b;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.strength-level {
    font-weight: 600;
}

.strength-requirements {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.strength-requirements ul {
    margin: 0.25rem 0 0 0;
    padding-left: 1rem;
    list-style: none;
}

.strength-requirements li {
    margin: 0.1rem 0;
    transition: color 0.3s ease;
}

.strength-requirements li::before {
    content: '○';
    margin-right: 0.5rem;
}

/* Settings Preview Modal */
.settings-preview {
    max-width: 600px;
}

.changes-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.change-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.change-label {
    font-weight: 600;
    color: #4ecdc4;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.change-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.old-value,
.new-value {
    font-size: 0.85rem;
}

.old-value .label,
.new-value .label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.old-value .value {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: line-through;
}

.new-value .value {
    color: #4ecdc4;
    font-weight: 500;
}

/* Restore Settings Modal */
.restore-settings-modal {
    max-width: 500px;
}

.file-input-container {
    margin: 1rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .settings-actions {
        justify-content: stretch;
    }

    .settings-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .settings-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }

    .settings-tab {
        justify-content: center;
    }

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

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .settings-form-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .form-actions-right {
        justify-content: stretch;
    }

    .form-actions-right .btn {
        flex: 1;
        justify-content: center;
    }

    .change-values {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Loading States */
.settings-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    color: rgba(255, 255, 255, 0.6);
}

.settings-loading i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

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

/* Icon placeholders for when icon font is not available */
.icon-globe::before { content: '🌐'; }
.icon-upload::before { content: '📤'; }
.icon-eye::before { content: '👁'; }
.icon-shield::before { content: '🛡'; }
.icon-database::before { content: '💾'; }
.icon-download::before { content: '⬇'; }
.icon-refresh::before { content: '🔄'; }
.icon-save::before { content: '💾'; }
.icon-warning::before { content: '⚠'; }
.icon-link::before { content: '🔗'; }
.icon-grid::before { content: '⊞'; }
.icon-palette::before { content: '🎨'; }
.icon-lock::before { content: '🔒'; }
.icon-key::before { content: '🔑'; }
.icon-settings::before { content: '⚙'; }}


/* Settings Manager Styles */
.settings-manager-container {
    padding: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-title h2 {
    margin: 0;
    color: #4ecdc4;
    font-size: 1.8rem;
    font-weight: 600;
}

.settings-title p {
    margin: 0.5rem 0 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.settings-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.settings-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.settings-tab {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.settings-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.settings-tab.active {
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.3), rgba(78, 205, 196, 0.3));
    color: white;
}

.settings-content {
    position: relative;
}

.settings-tab-content {
    display: none;
}

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

.settings-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.settings-section-title {
    margin: 0 0 1.5rem 0;
    color: #4ecdc4;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-section-title i {
    font-size: 1.1rem;
    opacity: 0.8;
}

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

.input-group {
    display: flex;
    align-items: center;
}

.input-suffix {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    min-width: 60px;
    text-align: center;
}

.input-group .form-control {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.settings-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    position: sticky;
    bottom: 2rem;
    z-index: 10;
}

.form-actions-left {
    flex: 1;
}

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

.unsaved-changes-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffa726;
    font-size: 0.9rem;
    font-weight: 500;
}

.unsaved-changes-indicator i {
    font-size: 1rem;
}

/* Settings Preview Modal */
.settings-preview {
    max-width: 600px;
}

.changes-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.change-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.change-label {
    font-weight: 600;
    color: #4ecdc4;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.change-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.old-value,
.new-value {
    font-size: 0.85rem;
}

.old-value .label,
.new-value .label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.old-value .value {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: line-through;
}

.new-value .value {
    color: #4ecdc4;
    font-weight: 500;
}

/* Restore Settings Modal */
.restore-settings-modal {
    max-width: 500px;
}

.file-input-container {
    margin: 1rem 0;
}

/* Icon placeholders for when icon font is not available */
.icon-globe::before { content: '🌐'; }
.icon-upload::before { content: '📤'; }
.icon-eye::before { content: '👁'; }
.icon-shield::before { content: '🛡'; }
.icon-database::before { content: '💾'; }
.icon-download::before { content: '⬇'; }
.icon-refresh::before { content: '🔄'; }
.icon-save::before { content: '💾'; }
.icon-warning::before { content: '⚠'; }
.icon-link::before { content: '🔗'; }
.icon-grid::before { content: '⊞'; }
.icon-palette::before { content: '🎨'; }
.icon-lock::before { content: '🔒'; }
.icon-key::before { content: '🔑'; }
.icon-settings::before { content: '⚙'; }

/* Responsive Design */
@media (max-width: 768px) {
    .settings-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .settings-actions {
        justify-content: stretch;
    }

    .settings-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .settings-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }

    .settings-tab {
        justify-content: center;
    }

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

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .settings-form-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .form-actions-right {
        justify-content: stretch;
    }

    .form-actions-right .btn {
        flex: 1;
        justify-content: center;
    }

    .change-values {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}