/* CopyrightChains Shared Theme
   Common styles used by both Admin Dashboard and Creator Portal
   Version: 9.4 */

/* CSS Variables */
:root {
    --nim-primary: #0674bb;
    --nim-primary-light: #0891d4;
    --nim-primary-dark: #055a94;
    --nim-primary-muted: rgba(6, 116, 187, 0.15);
    --grey-50: #fafafa;
    --grey-100: #f4f4f5;
    --grey-200: #e4e4e7;
    --grey-300: #d4d4d8;
    --grey-400: #a1a1aa;
    --grey-500: #71717a;
    --grey-600: #52525b;
    --grey-700: #3f3f46;
    --grey-800: #27272a;
    --grey-850: #1f1f23;
    --grey-900: #18181b;
    --grey-950: #0f0f11;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-body);
    background: var(--grey-950);
    color: var(--grey-100);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Selection & Scrollbar */
::selection { background: rgba(6, 116, 187, 0.4); color: white; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--grey-900); }
::-webkit-scrollbar-thumb { background: var(--grey-700); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--grey-600); }

/* Icon System */
.icon { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }

/* Cards */
.card { background: var(--grey-900); border: 1px solid var(--grey-800); border-radius: 12px; padding: 24px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--grey-100);
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-title .icon { color: var(--nim-primary); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, var(--nim-primary) 0%, var(--nim-primary-light) 100%); color: white; }
.btn-primary:hover { box-shadow: 0 0 20px rgba(6, 116, 187, 0.3); filter: brightness(1.1); }
.btn-secondary { background: var(--grey-850); color: var(--grey-100); border: 1px solid var(--grey-700); }
.btn-secondary:hover { background: var(--grey-800); border-color: var(--grey-600); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Badges */
.type-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.type-badge.musical-work { background: var(--nim-primary-muted); color: var(--nim-primary-light); }
.type-badge.recording { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.type-badge.orphan { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.status-badge.confirmed, .status-badge.verified, .status-badge.completed { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-badge.pending, .status-badge.processing { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-badge.failed { background: rgba(239, 68, 68, 0.15); color: var(--error); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--grey-300);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.form-label .required { color: var(--error); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    background: var(--grey-850);
    border: 1px solid var(--grey-700);
    border-radius: 6px;
    color: var(--grey-100);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--nim-primary);
    box-shadow: 0 0 0 3px var(--nim-primary-muted);
}
.form-input::placeholder { color: var(--grey-600); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--grey-500); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { color: var(--error); font-size: 12px; margin-top: 4px; }

/* File Upload */
.file-upload {
    border: 2px dashed var(--grey-700);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}
.file-upload:hover { border-color: var(--nim-primary); background: var(--nim-primary-muted); }
.file-upload.has-file { border-color: var(--success); border-style: solid; }
.file-upload.dragover { border-color: var(--nim-primary); background: var(--nim-primary-muted); }
.file-upload-icon { color: var(--grey-500); margin-bottom: 8px; }
.file-upload-text { font-size: 13px; color: var(--grey-400); }
.file-upload-text strong { color: var(--nim-primary-light); }
.file-upload-hint { font-size: 11px; color: var(--grey-600); margin-top: 4px; }
.file-upload input[type="file"] { display: none; }
.file-info { margin-top: 12px; padding: 10px; background: var(--grey-850); border-radius: 6px; text-align: left; }
.file-info-name { font-size: 13px; color: var(--grey-100); margin-bottom: 4px; }
.file-info-hash { font-family: var(--font-mono); font-size: 11px; color: var(--success); word-break: break-all; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.modal-content {
    background: var(--grey-900);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--grey-800);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--grey-800);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--grey-400);
    transition: all 0.2s;
    z-index: 10;
}
.modal-close:hover { background: var(--grey-700); color: var(--grey-100); }
.modal-body { padding: 24px; }

/* Spinner */
.spinner { width: 14px; height: 14px; border: 2px solid var(--grey-700); border-top-color: var(--nim-primary); border-radius: 50%; animation: spin 0.6s linear infinite; }
.spinner-lg { width: 24px; height: 24px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Hash Links */
.hash-link { color: var(--nim-primary); text-decoration: none; font-family: var(--font-mono); font-size: 12px; }
.hash-link:hover { text-decoration: underline; color: var(--nim-primary-light); }

/* Empty State */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon { width: 48px; height: 48px; margin: 0 auto 16px; color: var(--grey-600); }
.empty-state-title { font-family: var(--font-display); font-size: 16px; color: var(--grey-400); margin-bottom: 4px; }
.empty-state-text { font-size: 13px; color: var(--grey-500); }

/* Utility Classes */
.text-center { text-align: center; }
.text-mono { font-family: var(--font-mono); }
.text-sm { font-size: 12px; }
.text-muted { color: var(--grey-500); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }
