body { font-family: system-ui, Arial, sans-serif; background: #f6f7f9; }
.container { max-width: 1400px; margin: 0 auto; padding: 20px; }
.login-container { max-width: 420px; margin: 64px auto; padding: 24px; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
label { display: block; margin-top: 12px; color: #333; }
input { width: 100%; padding: 10px; margin-top: 6px; border: 1px solid #ddd; border-radius: 6px; }
button { margin-top: 16px; padding: 10px 16px; background: #0b6cff; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.error { margin: 10px 0; padding: 8px 12px; background: #ffefef; color: #b10000; border: 1px solid #ffcccc; border-radius: 6px; }

/* Layout global (sidebar/topbar) */
.sidebar { position: fixed; left: 0; top: 0; width: 280px; height: 100vh; background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); color: #fff; z-index: 1000; transition: transform 0.3s ease; overflow-y: auto; }
.sidebar.collapsed { transform: translateX(-280px); }
.sidebar-header { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-header h2 { font-size: 24px; font-weight: 600; margin-bottom: 5px; }
.sidebar-header p { font-size: 14px; opacity: 0.8; }
.sidebar-nav { padding: 20px 0; }
.nav-item { display: block; padding: 12px 20px; color: #fff; text-decoration: none; transition: all 0.3s ease; border-left: 3px solid transparent; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,0.1); border-left-color: #3498db; }
.nav-item i { width: 20px; margin-right: 10px; }

.main-content { margin-left: 280px; min-height: 100vh; transition: margin-left 0.3s ease; }
.main-content.expanded { margin-left: 0; }

.top-bar { background: #fff; padding: 15px 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); display: flex; justify-content: space-between; align-items: center; }
.menu-toggle { background: none; border: none; font-size: 20px; cursor: pointer; color: #666; }
.user-menu { display: flex; align-items: center; gap: 15px; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #3498db, #2980b9); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; }

.btn { display: inline-flex; align-items: center; padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; transition: all 0.3s ease; }
.btn-primary { background: linear-gradient(135deg, #3498db, #2980b9); color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, #2980b9, #21618c); transform: translateY(-1px); }
.btn i { margin-right: 8px; }

@media (max-width: 768px) {
  .main-content { margin-left: 0; }
}

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 2000; }
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 2000; }
.modal.show { display: flex; align-items: center; justify-content: center; }
.modal-content { background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); width: 90%; max-width: 640px; overflow: hidden; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid #e9ecef; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid #e9ecef; display: flex; gap: 10px; justify-content: flex-end; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #666; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; color: #666; }
.form-input { width: 100%; padding: 10px; border: 1px solid #e9ecef; border-radius: 8px; font-size: 14px; }
.form-select { width: 100%; padding: 10px; border: 1px solid #e9ecef; border-radius: 8px; font-size: 14px; background: #fff; }
.form-checkbox { width: auto; }

.foreign-key-container { display: flex; gap: 8px; align-items: center; }
.add-related-btn { padding: 8px 12px; border: none; border-radius: 6px; background: #6c757d; color: #fff; cursor: pointer; }
.add-related-btn:hover { background: #545b62; }
