/* AssetGuard - Creative License Compliance Tracker */
/* Design System: Professional, trustworthy, protective */

:root {
    /* Colors */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Layout */
    --sidebar-width: 260px;
}

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

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-800);
    background: var(--gray-50);
}

/* Layout */
.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--gray-900);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    padding: var(--space-6);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.logo-icon {
    font-size: 1.75rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    color: var(--gray-400);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s ease;
}

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

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-icon {
    font-size: 1.1rem;
}

.badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.sidebar-footer {
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.header {
    background: white;
    padding: var(--space-6) var(--space-8);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.search-box {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--gray-100);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    width: 280px;
}

.search-icon {
    color: var(--gray-400);
}

.search-input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-size: 0.875rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.content {
    padding: var(--space-8);
    flex: 1;
}

.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-50);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-small {
    padding: var(--space-2) var(--space-3);
    font-size: 0.75rem;
}

.btn-full {
    width: 100%;
}

/* Compliance Banner */
.compliance-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    display: flex;
    align-items: center;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.compliance-score {
    text-align: center;
}

.score-ring {
    width: 100px;
    height: 100px;
    position: relative;
}

.score-ring svg {
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 8;
}

.score-fill {
    fill: none;
    stroke: white;
    stroke-width: 8;
    stroke-linecap: round;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
}

.score-label {
    margin-top: var(--space-2);
    font-size: 0.875rem;
    opacity: 0.9;
}

.compliance-details h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-2);
}

.compliance-details p {
    opacity: 0.9;
    margin-bottom: var(--space-3);
}

.link {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.fonts {
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
}

.stat-icon.images {
    background: #dbeafe;
}

.stat-icon.audio {
    background: #ede9fe;
}

.stat-icon.video {
    background: #fce7f3;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.link-small {
    font-size: 0.75rem;
    color: var(--primary);
    text-decoration: none;
}

.link-small:hover {
    text-decoration: underline;
}

.card-body {
    padding: var(--space-4) var(--space-6);
}

/* Expiring List */
.expiring-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.expiring-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: var(--gray-50);
}

.expiring-item.warning {
    background: var(--warning-light);
}

.expiring-item.caution {
    background: var(--gray-100);
}

.expiring-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.expiring-info {
    flex: 1;
}

.expiring-name {
    font-weight: 500;
    color: var(--gray-800);
    font-size: 0.875rem;
}

.expiring-project {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.days-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    background: var(--gray-200);
    color: var(--gray-600);
}

.days-badge.warning {
    background: var(--warning);
    color: white;
}

.days-badge.caution {
    background: var(--gray-300);
    color: var(--gray-700);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.activity-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.activity-icon.add {
    background: var(--success-light);
    color: var(--success);
    font-weight: 700;
}

.activity-icon.link {
    background: var(--primary-light);
}

.activity-icon.check {
    background: var(--success-light);
    color: var(--success);
}

.activity-icon.verify {
    background: var(--primary-light);
}

.activity-text {
    font-size: 0.875rem;
    color: var(--gray-700);
}

.activity-text strong {
    color: var(--gray-900);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Projects Table */
.projects-table {
    display: flex;
    flex-direction: column;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 0.5fr 1fr 1fr 0.75fr;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 0.5fr 1fr 1fr 0.75fr;
    gap: var(--space-4);
    padding: var(--space-4);
    align-items: center;
    border-bottom: 1px solid var(--gray-100);
}

.table-row:last-child {
    border-bottom: none;
}

.project-name {
    font-weight: 500;
    color: var(--gray-800);
}

.issue-badge {
    font-size: 0.75rem;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.issue-badge.warning {
    background: var(--warning-light);
    color: #b45309;
}

.issue-badge.danger {
    background: var(--danger-light);
    color: #b91c1c;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

.status-badge.success {
    background: var(--success-light);
    color: #047857;
}

.status-badge.caution {
    background: var(--warning-light);
    color: #b45309;
}

.status-badge.danger {
    background: var(--danger-light);
    color: #b91c1c;
}

/* Assets View */
.assets-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.filter-tabs {
    display: flex;
    gap: var(--space-2);
    background: white;
    padding: var(--space-1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.filter-tab {
    padding: var(--space-2) var(--space-4);
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-tab:hover {
    color: var(--gray-700);
}

.filter-tab.active {
    background: var(--primary);
    color: white;
}

.view-toggle {
    display: flex;
    gap: var(--space-1);
}

.view-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    color: var(--gray-400);
}

.view-btn.active {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Assets Grid */
.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-6);
}

.asset-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.asset-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.asset-preview {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-preview {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.font-preview.warning {
    background: linear-gradient(135deg, var(--warning-light) 0%, #fcd34d 100%);
}

.font-sample {
    font-size: 3rem;
    font-weight: 700;
    color: #92400e;
}

.image-preview {
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
}

.image-placeholder {
    font-size: 3rem;
}

.audio-preview {
    background: linear-gradient(135deg, #ede9fe 0%, #c4b5fd 100%);
}

.audio-icon {
    font-size: 3rem;
}

.video-preview {
    background: linear-gradient(135deg, #fce7f3 0%, #f9a8d4 100%);
}

.video-icon {
    font-size: 3rem;
}

.asset-info {
    padding: var(--space-4);
}

.asset-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.asset-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: var(--space-2);
}

.asset-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.75rem;
    color: var(--gray-600);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
}

.status-dot.success {
    background: var(--success);
}

.status-dot.warning {
    background: var(--warning);
}

.status-dot.danger {
    background: var(--danger);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    border-radius: var(--radius-md);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.input,
.select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.input:focus,
.select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.type-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}

.type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.15s ease;
}

.type-option:hover {
    border-color: var(--primary-light);
}

.type-option input {
    display: none;
}

.type-option input:checked + .type-icon {
    transform: scale(1.1);
}

.type-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.type-icon {
    font-size: 1.5rem;
    transition: transform 0.15s ease;
}

.type-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
}

.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-2);
}

.upload-zone p {
    color: var(--gray-600);
    margin-bottom: var(--space-1);
}

.upload-hint {
    font-size: 0.75rem;
    color: var(--gray-400);
}

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

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main {
        margin-left: 0;
    }
    
    .header {
        flex-direction: column;
        gap: var(--space-4);
        align-items: flex-start;
    }
    
    .header-right {
        width: 100%;
    }
    
    .search-box {
        flex: 1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }
    
    .table-header {
        display: none;
    }
}
