/* ========================================
   FLYING BOOK - SLIDES EDITOR STYLES
   ======================================== */

:root {
    --primary-color: #667eea;
    --primary-dark: #5a6fd8;
    --primary-light: #e0e7ff;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-card: #ffffff;
    --bg-dark: #374151;
    --bg-overlay: rgba(0, 0, 0, 0.7);
    
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --border-focus: #667eea;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --sidebar-width: 280px;
    --properties-width: 320px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

/* ========================================
   HEADER
   ======================================== */

.editor-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1.5rem;
    gap: 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.back-btn {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.back-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(-2px);
}

.project-info h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.project-meta .status {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: capitalize;
    font-weight: 500;
}

.project-meta .status.draft {
    background: var(--warning-color);
    color: white;
}

.project-meta .status.published {
    background: var(--success-color);
    color: white;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    min-height: 2.25rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    min-height: 1.875rem;
}

.btn-block {
    width: 100%;
}

/* ========================================
   DROPDOWN
   ======================================== */

.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    margin-left: 0.5rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
    margin-top: 0.5rem;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.875rem;
}

.dropdown-menu a:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* ========================================
   EDITOR LAYOUT
   ======================================== */

.editor-layout {
    display: flex;
    height: 100vh;
    padding-top: var(--header-height);
}

/* ========================================
   SLIDES SIDEBAR
   ======================================== */

.slides-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slides-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.slide-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    position: relative;
}

.slide-item:hover {
    border-color: var(--primary-light);
    background: var(--primary-light);
}

.slide-item.active {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.slide-item.sortable-ghost {
    opacity: 0.5;
}

.slide-item.sortable-drag {
    transform: rotate(5deg);
    box-shadow: var(--shadow-lg);
}

.slide-thumbnail {
    width: 60px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.slide-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-thumbnail,
.video-thumbnail,
.media-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.25rem;
}

.video-thumbnail {
    background: var(--bg-dark);
    color: white;
}

.slide-number {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--bg-dark);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
}

.slide-info {
    flex: 1;
    min-width: 0;
}

.slide-info h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slide-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.slide-duration {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.slide-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0;
    transition: var(--transition);
}

.slide-item:hover .slide-actions {
    opacity: 1;
}

.action-btn {
    width: 1.5rem;
    height: 1.5rem;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.action-btn.delete:hover {
    background: var(--error-color);
    color: white;
}

.drag-handle {
    cursor: grab;
    color: var(--text-light);
    padding: 0.25rem;
}

.drag-handle:active {
    cursor: grabbing;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   EDITOR MAIN
   ======================================== */

.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    overflow: hidden;
}

.editor-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: auto;
}

.empty-editor {
    text-align: center;
    color: var(--text-secondary);
}

.empty-editor i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.empty-editor h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.slide-editor {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 100%;
    width: 100%;
    max-height: 100%;
    overflow: hidden;
}

.slide-preview {
    aspect-ratio: 16/9;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-preview img,
.slide-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-preview .placeholder {
    color: var(--text-light);
    font-size: 3rem;
}

.slide-controls {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   PROPERTIES PANEL
   ======================================== */

.properties-panel {
    width: var(--properties-width);
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
}

.properties-panel.collapsed {
    width: 50px;
}

.properties-panel.collapsed .panel-content {
    display: none;
}

.panel-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.panel-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.properties-panel.collapsed .panel-toggle i {
    transform: rotate(180deg);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.property-group {
    margin-bottom: 1.5rem;
}

.property-group:last-child {
    margin-bottom: 0;
}

.property-group h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.media-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.media-type-btn {
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.media-type-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
}

.media-type-btn:hover {
    border-color: var(--primary-light);
}

.media-type-btn i {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

/* ========================================
   MODALS
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 2000;
    padding: 1rem;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal.fullscreen {
    padding: 0;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal.fullscreen .modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* ========================================
   UPLOAD MODAL
   ======================================== */

.upload-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.upload-tab {
    display: none;
}

.upload-tab.active {
    display: block;
}

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.upload-zone.dragover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.upload-icon {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.upload-zone h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-zone p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.upload-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}

.upload-zone small {
    color: var(--text-light);
    font-size: 0.75rem;
}

.upload-progress {
    margin-top: 1rem;
}

.progress-files {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.progress-file {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.progress-file-info {
    flex: 1;
}

.progress-file-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.progress-file-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.progress-bar {
    width: 100px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-status {
    width: 20px;
    text-align: center;
}

.progress-status .fas {
    font-size: 1rem;
}

.progress-status .fa-check {
    color: var(--success-color);
}

.progress-status .fa-times {
    color: var(--error-color);
}

/* ========================================
   MEDIA LIBRARY
   ======================================== */

.media-library {
    max-height: 400px;
    overflow-y: auto;
}

.empty-library {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-library i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.media-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.media-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.media-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.file-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-light);
    font-size: 2rem;
}

.media-info {
    padding: 0.5rem;
}

.media-info h5 {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-info p {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   URL INPUT
   ======================================== */

.url-input {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.url-input label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.url-input input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.url-examples {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.url-examples h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.url-examples ul {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: 1rem;
}

.url-examples li {
    margin-bottom: 0.25rem;
}

/* ========================================
   PREVIEW MODAL
   ======================================== */

.preview-header {
    background: var(--bg-dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.preview-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.preview-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slide-indicator {
    font-size: 0.875rem;
    color: var(--text-light);
}

.preview-content {
    background: var(--bg-dark);
    height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preview-slide {
    max-width: 90%;
    max-height: 90%;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    :root {
        --sidebar-width: 250px;
        --properties-width: 280px;
    }
}

@media (max-width: 1024px) {
    .editor-layout {
        flex-direction: column;
    }
    
    .slides-sidebar {
        width: 100%;
        max-height: 200px;
        order: 2;
    }
    
    .editor-main {
        order: 1;
        min-height: 300px;
    }
    
    .properties-panel {
        width: 100%;
        max-height: 200px;
        order: 3;
    }
    
    .slides-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.5rem;
    }
    
    .slide-item {
        min-width: 200px;
        margin-right: 0.5rem;
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
        gap: 1rem;
    }
    
    .project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .editor-content {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.uploading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading {
    position: relative;
    color: transparent !important;
}

.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.hidden { display: none !important; }
.visible { display: block !important; }

.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    box-shadow: var(--shadow-lg);
}

.sortable-drag {
    transform: rotate(5deg);
    z-index: 1000;
}