/* CSS Variables - ロボスタディオン風カラースキーム */
:root {
  --primary: #0099cc;
  --primary-hover: #007baa;
  --primary-light: #e0f4fb;
  --success: #22c55e;
  --success-light: #dcfce7;
  --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;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--gray-800); background: var(--gray-50); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 20px; border: none; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; cursor: pointer; text-align: center; transition: all 0.2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; color: white; }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-outline { background: white; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; padding: 0; font-size: inherit; }
.full-width { width: 100%; }
.btn-primary-sm { background: var(--primary); color: white; padding: 6px 14px; border-radius: var(--radius); font-size: 13px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--gray-700); font-size: 14px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius);
  font-size: 14px; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light);
}
.checkbox-group label { display: flex; align-items: center; gap: 8px; font-weight: normal; }
.checkbox-group input[type="checkbox"] { width: auto; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.alert-error { background: var(--danger-light); color: #b91c1c; border: 1px solid #fca5a5; }
.alert-success { background: var(--success-light); color: #166534; border: 1px solid #86efac; }
.alert-warning { background: var(--warning-light); color: #92400e; border: 1px solid #fcd34d; }
.alert-info { background: var(--primary-light); color: #1e40af; border: 1px solid #93c5fd; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  font-size: 11px; font-weight: 600; background: var(--danger); color: white;
}
.badge-pending { background: var(--warning); }
.badge-approved { background: var(--success); }
.badge-rejected { background: var(--danger); }

/* Status */
.status-pending { color: var(--warning); }
.status-approved { color: var(--success); }
.status-rejected { color: var(--danger); }

/* Cards */
.card {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 16px;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h3 { font-size: 16px; font-weight: 600; }

/* Tables */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--gray-200); font-size: 14px; }
th { background: var(--gray-50); font-weight: 600; color: var(--gray-600); }
tr:hover { background: var(--gray-50); }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--gray-900); }
.stat-card .stat-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

/* Storage bar */
.storage-bar { background: var(--gray-200); border-radius: 4px; height: 8px; overflow: hidden; }
.storage-bar-fill { background: var(--primary); height: 100%; border-radius: 4px; transition: width 0.3s; }
.storage-bar-fill.warning { background: var(--warning); }
.storage-bar-fill.danger { background: var(--danger); }

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 13px; }
.inline-form { display: inline; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Media grid */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.media-item {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; transition: transform 0.2s;
}
.media-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.media-item .thumbnail {
  width: 100%; aspect-ratio: 9/16; object-fit: cover; background: var(--gray-200);
}
.media-item .media-info { padding: 10px; }
.media-item .media-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-item .media-meta { font-size: 11px; color: var(--gray-500); margin-top: 4px; }
.media-item .media-actions { display: flex; gap: 4px; margin-top: 8px; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--gray-300); border-radius: var(--radius); padding: 40px;
  text-align: center; cursor: pointer; transition: all 0.2s;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: var(--primary-light); }
.upload-zone input[type="file"] { display: none; }

/* Progress bar */
.progress-bar { background: var(--gray-200); border-radius: 4px; height: 6px; overflow: hidden; margin-top: 8px; }
.progress-bar-fill { background: var(--primary); height: 100%; width: 0; transition: width 0.3s; }
