* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f5f7fa; color: #333; min-height: 100vh; }

/* Header */
.header { background: #1a365d; color: white; padding: 0 20px; height: 56px; display: flex; align-items: center; }
.header-inner { width: 100%; max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.logo { color: white; text-decoration: none; font-size: 18px; font-weight: bold; }
.header-right { display: flex; align-items: center; gap: 16px; }
.user-name { font-size: 14px; opacity: 0.9; }

/* Main */
.main { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }

/* Page Header */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-header h1 { font-size: 24px; color: #1a365d; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border: none; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; transition: background 0.2s; }
.btn-primary { background: #2d5a87; color: white; }
.btn-primary:hover { background: #1a365d; }
.btn-outline { background: transparent; border: 1px solid #ccc; color: #555; }
.btn-outline:hover { background: #f0f0f0; }
.btn-danger { background: #e53e3e; color: white; }
.btn-danger:hover { background: #c53030; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* Project Grid */
.project-grid { display: grid; gap: 16px; }
.project-card { background: white; border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.project-card.inactive { opacity: 0.6; }
.project-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.project-name { font-size: 18px; color: #1a365d; }
.project-school { color: #666; font-size: 14px; margin-bottom: 8px; }
.project-url { margin: 12px 0; font-size: 13px; }
.project-url .label { color: #888; }
.project-url a { color: #2d5a87; word-break: break-all; }
.project-meta { font-size: 13px; color: #888; margin-bottom: 12px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Badge */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-active { background: #c6f6d5; color: #276749; }
.badge-inactive { background: #fed7d7; color: #9b2c2c; }

/* Forms */
.form-card { background: white; border-radius: 10px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); max-width: 600px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; color: #555; margin-bottom: 6px; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: #2d5a87; box-shadow: 0 0 0 2px rgba(45,90,135,0.2); }
.form-group input[type="file"] { font-size: 14px; }
.form-help { display: block; margin-top: 4px; font-size: 12px; color: #888; }
.required { color: #e53e3e; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }

/* Image Preview */
.image-preview { margin-top: 8px; }
.image-preview img { max-width: 200px; max-height: 200px; border-radius: 6px; border: 1px solid #ddd; }

/* QR */
.qr-preview { margin: 8px 0; }
.qr-image { max-width: 150px; }
.qr-actions { margin-bottom: 12px; }
.qr-controls { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.or-divider { color: #888; font-size: 13px; }
.inline-upload { display: flex; align-items: center; gap: 8px; }

/* URL */
.url-display { padding: 10px 12px; background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 6px; }
.url-display a { color: #2d5a87; word-break: break-all; }

/* Alert */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fed7d7; color: #9b2c2c; }

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; color: #888; }

/* Login */
.login-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #1a365d, #2d5a87); padding: 20px; }
.login-card { background: white; border-radius: 12px; padding: 40px; width: 100%; max-width: 400px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.login-title { text-align: center; color: #1a365d; margin-bottom: 30px; font-size: 22px; }

/* Inline form */
.inline-form { display: inline; }

/* Form row (side by side) */
.form-row { display: flex; gap: 16px; }
.form-half { flex: 1; }
.form-group input[type="date"] { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }

/* Drop zone */
.drop-zone { border: 3px dashed #a0b4cc; border-radius: 12px; padding: 40px 20px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; background: #f7fafd; }
.drop-zone::before { content: "\1F4C1"; display: block; font-size: 40px; margin-bottom: 12px; }
.drop-zone p { color: #556; font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.drop-zone-or { font-size: 12px; color: #aaa; margin: 10px 0; }
.drop-zone:hover { border-color: #2d5a87; background: #eef3fa; }
.drop-zone.drag-over { border-color: #2d5a87; background: #dde8f5; border-style: solid; }

/* Project period */
.project-period { font-size: 13px; color: #666; margin-bottom: 8px; }

@media (min-width: 768px) {
    .project-grid { grid-template-columns: repeat(2, 1fr); }
}
